Tom Browder wrote:
It is not pretty but in my make files have a tarball target which tars up the code & spec file. I then have an rpm target which will build this tarball. Below is part of my makefile from a tool called arrghpm.I've read Maximum RPM fairly closely, but I haven't found an example of someone using rpm as a source developer (i.e., the packager is the source developer, too). The examples assume the "pristine" source is in an archive somewhere and can be placed in the SOURCES directory.
Can someone point to an example of a source tree that produces a binary source rpm (in its development directory) as part of its ordinary build?
This follows the same procedure as you will see for building 3rd party tarballs, just in this case I make sure that the tarball contains a working .spec file.
get-release.sh is a shell script which auto increments the build number.
VERSION=`cat version` APP=arrghpm RELEASE=`./get-release.sh`
version.h: version echo "#define VERSION \""$(VERSION)"\"" > version.h
arrghpm.spec: arrghpm.spec.in version dummy echo "%define ver $(VERSION)" > arrghpm.spec echo "%define rel $(RELEASE)" >> arrghpm.spec
cat arrghpm.spec.in >> arrghpm.spec
tarball: clean arrghpm.spec
if [ -L ../$(APP)-$(VERSION) ] ; then rm ../$(APP)-$(VERSION) ; fi
ln -s $(APP) ../$(APP)-$(VERSION)
tar -chzf ../$(APP)-$(VERSION).tgz -C ../ $(APP)-$(VERSION) --exclude CVS
if [ -L ../$(APP)-$(VERSION) ] ; then rm ../$(APP)-$(VERSION) ; fi
rpm: tarball rpmbuild -ta ../$(APP)-$(VERSION).tgz
Thanks.
Tom Browder
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list
-- John Newbigin Computer Systems Officer Faculty of Information and Communication Technologies Swinburne University of Technology Melbourne, Australia http://www.it.swin.edu.au/staff/jnewbigin
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list