aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2002-01-20 23:05:25 +0000
committerGerald Combs <gerald@wireshark.org>2002-01-20 23:05:25 +0000
commitb11f1955e4408e47dcc7b01605e3754852cca3ba (patch)
treeec6ae78c36932364514ded0a84f2673eb5ee5f44 /Makefile.am
parent287425df9c99c3d2fad493b23ee3a646eb7bff25 (diff)
Revamp the RPM building process. For versions of rpm that support
"--define", we now build the RPM and SRPM packages in packages/rpm. As a result, one need not be root to build RPM-based packages. Move the specfile to packaging/rpm/SPECS. Update the INSTALL document to include the various packaging makefile targets. svn path=/trunk/; revision=4581
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am30
1 files changed, 18 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
index 0002a5cfd2..6ff3cfd98a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
# Makefile.am
# Automake file for Ethereal
#
-# $Id: Makefile.am,v 1.404 2002/01/10 01:28:43 guy Exp $
+# $Id: Makefile.am,v 1.405 2002/01/20 23:05:22 gerald Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@ethereal.com>
@@ -969,24 +969,30 @@ svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
solaris-package: svr4-package
-specfile=$(top_srcdir)/packaging/rpm/ethereal.spec
-
+rpm_topdir=`cd $(top_srcdir) && pwd`/packaging/rpm
rpm-package: dist
- if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
- cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
- rpm -bb --clean --rmsource $(specfile) ; \
+ if test x$(HAVE_RPM) = xyes ; then \
+ cd $(rpm_topdir) ; \
+ mkdir BUILD RPMS SOURCES ; \
+ cd SOURCES ; \
+ ln -s ../../../$(distdir).tar.gz ; \
+ cd .. ; \
+ rpm --define "_topdir `cd . && pwd`" -bb SPECS/ethereal.spec && \
+ echo "Package successfully built in `pwd`/RPMS." ; \
else \
echo "Error: RPM executable and/or source directory not found." ; \
- echo "Package build abandoned." ; \
fi
-
srpm-package: dist
- if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
- cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
- rpm -bs --clean --rmsource $(specfile) ; \
+ if test x$(HAVE_RPM) = xyes ; then \
+ cd $(rpm_topdir) ; \
+ mkdir BUILD SRPMS SOURCES ; \
+ cd SOURCES ; \
+ ln -s ../../../$(distdir).tar.gz ; \
+ cd .. ; \
+ rpm --define "_topdir `cd . && pwd`" -bs SPECS/ethereal.spec && \
+ echo "Package successfully built in `pwd`/SRPMS." ; \
else \
echo "Error: RPM executable and/or source directory not found." ; \
- echo "Package build abandoned." ; \
fi
debian-package: debian/rules