diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-08-11 16:26:36 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-08-18 12:28:18 -0400 |
commit | 8a55c780d1a3d22b27e3746158322ff0de64b572 (patch) | |
tree | 18cdc33b9e3b5c3a0f3ffc4f8cd9f5fa1d275744 /collection/Makefile.am | |
parent | 88a0a472f61c1301ca31f9d443647d11f05c06d0 (diff) | |
download | ding-libs-8a55c780d1a3d22b27e3746158322ff0de64b572.tar.gz ding-libs-8a55c780d1a3d22b27e3746158322ff0de64b572.tar.xz ding-libs-8a55c780d1a3d22b27e3746158322ff0de64b572.zip |
collection: add RPM build targets
Diffstat (limited to 'collection/Makefile.am')
-rw-r--r-- | collection/Makefile.am | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/collection/Makefile.am b/collection/Makefile.am index 1d9e98c..0aff10e 100644 --- a/collection/Makefile.am +++ b/collection/Makefile.am @@ -26,7 +26,7 @@ dist_include_HEADERS = \ collection_queue.h \ collection_stack.h -dist_noinst_DATA = m4 +dist_noinst_DATA = m4 contrib/libcollection.spec.in # Build library lib_LTLIBRARIES = libcollection.la @@ -71,3 +71,30 @@ tests: all $(check_PROGRAMS) clean-local: rm -Rf doc + + +builddir ?= . +RPMBUILD ?= $(PWD)/rpmbuild + +rpmroot: + mkdir -p $(RPMBUILD)/BUILD + mkdir -p $(RPMBUILD)/RPMS + mkdir -p $(RPMBUILD)/SOURCES + mkdir -p $(RPMBUILD)/SPECS + mkdir -p $(RPMBUILD)/SRPMS + +rpms: dist-gzip rpmroot + cp $(builddir)/contrib/libcollection.spec $(RPMBUILD)/SPECS + cp $(distdir).tar.gz $(RPMBUILD)/SOURCES + cd $(RPMBUILD); \ + rpmbuild --define "_topdir $(RPMBUILD)" -ba SPECS/libcollection.spec + +# make srpms will use the old digest algorithm to be compatible +# with RHEL5 +srpm: dist-gzip rpmroot + cp $(builddir)/contrib/libcollection.spec $(RPMBUILD)/SPECS + cp $(distdir).tar.gz $(RPMBUILD)/SOURCES + cd $(RPMBUILD); \ + rpmbuild --define "_topdir $(RPMBUILD)" \ + --define _source_filedigest_algorithm=1 \ + -bs SPECS/libcollection.spec |