diff options
author | Micah Anderson <micah@riseup.net> | 2006-08-11 13:46:57 +0000 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2006-08-11 13:46:57 +0000 |
commit | 28338e91c351bef21a856f4280b762b9ee0dc2aa (patch) | |
tree | 7222f64f2f5259c6a5e7a8bee5479ed78d817b88 /Makefile.am | |
parent | 6764e88373674c4d1f0a0ba8f09d508b5a634b4d (diff) | |
download | backupninja-28338e91c351bef21a856f4280b762b9ee0dc2aa.tar.gz backupninja-28338e91c351bef21a856f4280b762b9ee0dc2aa.tar.bz2 |
Added RPM patches submitted by Robert Napier
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am index 34ab32a..7339f0c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,34 +6,40 @@ EXTRA_DIST = README COPYING AUTHORS INSTALL NEWS ChangeLog \ SUBDIRS = etc examples handlers lib man src -rpm_topdir=`cd $(top_srcdir) && pwd`/rpm +local_rpm_topdir=`cd $(top_srcdir) && pwd`/rpm rpm-package: dist if test x$(HAVE_RPM) = xyes ; then \ - mkdir -p $(rpm_topdir) ; \ - cd $(rpm_topdir) ; \ + mkdir -p $(local_rpm_topdir) ; \ + cd $(local_rpm_topdir) ; \ mkdir -p BUILD RPMS SOURCES SPECS ; \ cd SOURCES ; \ - ln -sf ../../$(distdir).tar.gz ; \ + $(LN_S) ../../$(distdir).tar.gz ; \ cd .. ; \ cd SPECS ; \ - ln -sf ../../backupninja.spec . ; \ - cd .. ; \ + $(LN_S) ../../backupninja.spec . ; \ + cd .. ; \ rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/backupninja.spec && \ echo "Package successfully built in `pwd`/RPMS." ; \ else \ echo "Error: RPM executable and/or source directory not found." ; \ fi + srpm-package: dist - if test x$(HAVE_RPM) = xyes ; then \ - cd $(rpm_topdir) ; \ + if test x$(HAVE_RPM) = xyes ; then \ + mkdir -p $(local_rpm_topdir) ; \ + cd $(local_rpm_topdir) ; \ mkdir -p BUILD SRPMS SOURCES SPECS ; \ cd SOURCES ; \ - ln -s ../../$(distdir).tar.gz ; \ + $(LN_S) ../../$(distdir).tar.gz ; \ cd .. ; \ cd SPECS ; \ - ln -sf ../../backupninja.spec . + $(LN_S) ../../backupninja.spec . \ + cd .. ; \ rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/backupninja.spec && \ echo "Package successfully built in `pwd`/SRPMS." ; \ else \ - echo "Error: RPM executable and/or source directory not found." ; \ - fi + echo "Error: RPM executable and/or source directory not found." ; \ + fi + +clean-local: + -rm -rf $(local_rpm_topdir) |