Re: building devel packages



On Sat, 02 Sep 2006 17:38:53 -0700, J. Horta wrote:

On Sun, 03 Sep 2006 01:24:42 +0100, David Bolt wrote:

On Sat, 2 Sep 2006, J. Horta <bite@xxxxxxx> wrote:-

Hum, the spec file is already configured for a devel subpackage
since it contains a tag

%package devel

followed by all the pesky .h files and static libs. OK I'll bite,
how does one use this spec file to make a blabla-devel-0.xxx.rpm
file like the rpm docs suggest?

http://www.rpm.org/max-rpm/s1-rpm-inside-package-directive.html

Have you tried rpmbuild?

If I was building the package, and the source was a .src.rpm or .spm,
I'd follow this sequence:

1, cp <source.archive> /usr/src/packages/SOURCES
2, cd /usr/src/packages/SOURCES
3, rpmbuild --rebuild <source.archive>

OTOH, if the source archive is a .tgz, .tar.gz or .tar.bz2, I'd do this
instead:

1, cp <source.archive> /usr/src/packages/SOURCES
2, cd /usr/src/packages/SOURCES
3, rpmbuild -ta <source.archive>

If the spec file has the required bits to build a devel package, you
should end up with three RPMs build:

/usr/src/packages/SRPMS/$NAME-$VERSION-$RELEASE.src.rpm
/usr/src/packages/RPMS/$ARCH/$NAME-$VERSION-$RELEASE.$ARCH.rpm
/usr/src/packages/RPMS/$ARCH/$NAME-devel-$VERSION-$RELEASE.$ARCH.rpm


Regards,
David Bolt

Thanks

No I didn't (well, I tried but couldn't figure it out). With this
added info I'll give it a go. BTW I did do a ./configure bla bla
and a make followed by a checkinstall as root. This had the effect
of building a single rpm that included the devel package files in
addition to the regular install. I then (of course) forced an install
and broke my dependancies. I'll give the above a shot and let u know.


Success!! The above didn't work as advertized exactly. rpmbuild complained
of some fields being blank in the spec file. So I unpacked the tar ball,
configured the package (changing the --prefix and the package name)
re-tared the mess and followed the steps above. This work perfectly
producing separate rpm's. Thanks again.

.



Relevant Pages

  • RV: How can I install a Agere NIC in my laptop?
    ... The solution for this request for info say to me fix a spec file or post ... Package already exists: %package debuginfo ... BuildRequires: kernel-source kernel-syms ... Kernelmodule for Agere ET131x network cards ...
    (Fedora)
  • Re: Where do I get info on how a rpm (httpd) is build?
    ... >>You can always fetch the SRC.RPM package and inspect the spec file. ... >>instructions how the source code should builld and included additional ... While the .spec file is text in nature, it isn't a set of instructions as ...
    (Fedora)
  • Re: Program to produce spec files
    ... >> Go back and move the files into the right section of the spec file you ... Perhaps the package you're building does not support DESTDIR ... clobber any existing root-owned files when you try the install. ...
    (Fedora)
  • Re: Experienced package builders: please test my first RPM
    ... as the man package itself doesn't seem to include it). ... >of the script files: ... >of the spec file aren't all aligned in my editor. ... Replacing the tabs ...
    (Fedora)
  • Re: building devel packages
    ... Have you tried rpmbuild? ... If I was building the package, and the source was a .src.rpm or .spm, ... If the spec file has the required bits to build a devel package, ...
    (alt.os.linux.suse)