diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-08-11 12:10:19 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-08-18 12:28:18 -0400 |
commit | 169aef0315b86c1a66e6d792c2a533fafc91dd53 (patch) | |
tree | 394f67407501d1a808b3895e435ce72020ce88c5 /dhash/Makefile.am | |
parent | e30512271d235f5812d4ca9ab26a9d5c8bbbca79 (diff) | |
download | ding-libs2-169aef0315b86c1a66e6d792c2a533fafc91dd53.tar.gz ding-libs2-169aef0315b86c1a66e6d792c2a533fafc91dd53.tar.xz ding-libs2-169aef0315b86c1a66e6d792c2a533fafc91dd53.zip |
dhash: Add targets for RPM build
Diffstat (limited to 'dhash/Makefile.am')
-rw-r--r-- | dhash/Makefile.am | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/dhash/Makefile.am b/dhash/Makefile.am index d5a5618..cf73d80 100644 --- a/dhash/Makefile.am +++ b/dhash/Makefile.am @@ -10,7 +10,7 @@ ACLOCAL_AMFLAGS = -I m4 pkgconfigdir = $(libdir)/pkgconfig dist_pkgconfig_DATA = dhash.pc -dist_noinst_DATA = m4 +dist_noinst_DATA = m4 contrib/libdhash.spec.in dist_include_HEADERS = dhash.h @@ -33,3 +33,30 @@ dist_examples_DATA = examples/dhash_test.c examples/dhash_example.c dist_doc_DATA = README tests: all $(check_PROGRAMS) + +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/libdhash.spec $(RPMBUILD)/SPECS + cp $(distdir).tar.gz $(RPMBUILD)/SOURCES + cd $(RPMBUILD); \ + rpmbuild --define "_topdir $(RPMBUILD)" -ba SPECS/libdhash.spec + +# make srpms will use the old digest algorithm to be compatible +# with RHEL5 +srpm: dist-gzip rpmroot + cp $(builddir)/contrib/libdhash.spec $(RPMBUILD)/SPECS + cp $(distdir).tar.gz $(RPMBUILD)/SOURCES + cd $(RPMBUILD); \ + rpmbuild --define "_topdir $(RPMBUILD)" \ + --define _source_filedigest_algorithm=1 \ + -bs SPECS/libdhash.spec + |