From e43e79220c01267a5eed4eb77bb8d0b37806b885 Mon Sep 17 00:00:00 2001 From: mike Date: Sun, 13 Nov 2005 06:14:46 +0000 Subject: [PATCH] Fix RPM spec file and man page installation. Add makesrcdist script and use it to create the snapshot for testrpm. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4836 7a7537e8-13f0-0310-91df-b6672ffda945 --- Makedefs.in | 2 +- man/Makefile | 14 ++++----- packaging/cups.spec.in | 20 ++---------- tools/makesrcdist | 71 ++++++++++++++++++++++++++++++++++++++++++ tools/testrpm | 40 ++++++------------------ 5 files changed, 91 insertions(+), 56 deletions(-) create mode 100755 tools/makesrcdist diff --git a/Makedefs.in b/Makedefs.in index 5fbc5de20..eb2505a26 100644 --- a/Makedefs.in +++ b/Makedefs.in @@ -183,7 +183,7 @@ PAMFILE = @PAMFILE@ $(LN) $< $@ .man.1.gz .man.1m.gz .man.5.gz .man.8.gz .man.gz: - echo Compressing $<... + echo -n Compressing $<... $(RM) $@ gzip -v9 <$< >$@ diff --git a/man/Makefile b/man/Makefile index b2bac9788..c5fb0c126 100644 --- a/man/Makefile +++ b/man/Makefile @@ -96,15 +96,15 @@ install: all echo Installing $$file in $(MANDIR)/man5...; \ $(INSTALL_MAN) $$file $(MANDIR)/man5; \ done - $(INSTALL_DIR) $(AMANDIR)/man$(MAN8EXT) + $(INSTALL_DIR) $(AMANDIR)/man$(MAN8DIR) for file in $(MAN8); do \ - echo Installing $$file in $(AMANDIR)/man$(MAN8EXT)...; \ - $(INSTALL_MAN) $$file $(AMANDIR)/man$(MAN8EXT); \ + echo Installing $$file in $(AMANDIR)/man$(MAN8DIR)...; \ + $(INSTALL_MAN) $$file $(AMANDIR)/man$(MAN8DIR); \ done - $(RM) $(AMANDIR)/man$(MAN8EXT)/reject.$(MAN8EXT) - $(LN) accept.$(MAN8EXT) $(AMANDIR)/man$(MAN8EXT)/reject.$(MAN8EXT) - $(RM) $(AMANDIR)/man$(MAN8EXT)/cupsdisable.$(MAN8EXT) - $(LN) cupsenable.$(MAN8EXT) $(AMANDIR)/man$(MAN8EXT)/cupsdisable.$(MAN8EXT) + $(RM) $(AMANDIR)/man$(MAN8DIR)/reject.$(MAN8EXT) + $(LN) accept.$(MAN8EXT) $(AMANDIR)/man$(MAN8DIR)/reject.$(MAN8EXT) + $(RM) $(AMANDIR)/man$(MAN8DIR)/cupsdisable.$(MAN8EXT) + $(LN) cupsenable.$(MAN8EXT) $(AMANDIR)/man$(MAN8DIR)/cupsdisable.$(MAN8EXT) # diff --git a/packaging/cups.spec.in b/packaging/cups.spec.in index 77c7eab6d..772955a96 100644 --- a/packaging/cups.spec.in +++ b/packaging/cups.spec.in @@ -194,20 +194,6 @@ rm -rf $RPM_BUILD_ROOT %dir /usr/share/locale /usr/share/locale/* -%dir /usr/share/man/cat1 -/usr/share/man/cat1/cancel.1 -/usr/share/man/cat1/cupstestppd.1 -/usr/share/man/cat1/lp.1 -/usr/share/man/cat1/lpoptions.1 -/usr/share/man/cat1/lppasswd.1 -/usr/share/man/cat1/lpq.1 -/usr/share/man/cat1/lpr.1 -/usr/share/man/cat1/lprm.1 -/usr/share/man/cat1/lpstat.1 -%dir /usr/share/man/cat5 -/usr/share/man/cat5/* -%dir /usr/share/man/cat8 -/usr/share/man/cat8/* %dir /usr/share/man/man1 /usr/share/man/man1/cancel.1.gz /usr/share/man/man1/cupstestppd.1.gz @@ -224,12 +210,14 @@ rm -rf $RPM_BUILD_ROOT /usr/share/man/man8/accept.8.gz /usr/share/man/man8/cupsaddsmb.8.gz /usr/share/man/man8/cupsd.8.gz +/usr/share/man/man8/cupsdisable.8.gz /usr/share/man/man8/cupsenable.8.gz /usr/share/man/man8/cups-polld.8.gz /usr/share/man/man8/lpadmin.8.gz /usr/share/man/man8/lpc.8.gz /usr/share/man/man8/lpinfo.8.gz /usr/share/man/man8/lpmove.8.gz +/usr/share/man/man8/reject.8.gz %dir /var/cache/cups %dir /var/cache/cups/ppd @@ -241,10 +229,6 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root) -%dir /usr/share/man/cat1 -/usr/share/man/cat1/backend.1 -/usr/share/man/cat1/cups-config.1 -/usr/share/man/cat1/filter.1 %dir /usr/share/man/man1 /usr/share/man/man1/backend.1.gz /usr/share/man/man1/cups-config.1.gz diff --git a/tools/makesrcdist b/tools/makesrcdist new file mode 100755 index 000000000..b0cb5dfe1 --- /dev/null +++ b/tools/makesrcdist @@ -0,0 +1,71 @@ +#!/bin/sh +# +# "$Id$" +# +# makesrcdist - make a source distribution of CUPS. +# + +# Make sure we are running in the right directory... +if test ! -f tools/makesrcdist; then + echo "Run this script from the top-level CUPS source directory, e.g.:" + echo "" + echo " tools/makesrcdist $*" + echo "" + exit 1 +fi + +if test $# = 0; then + echo Updating for snapshot... + svn up + rev=`svnversion . | sed -e '1,$s/[a-zA-Z]//g'` + version="1.2svn" + fileversion="1.2svn-r$rev" + fileurl="ftp://ftp.easysw.com/pub/cups/test/cups-$fileversion-source.tar.bz2" + url="." +else + echo Creating tag for release... + rev="1" + version=$1 + fileversion=$1 + fileurl="ftp://ftp.easysw.com/pub/cups/$version/cups-$fileversion-source.tar.bz2" + url="https://svn.easysw.com/public/cups/tags/release-$version" + + svn copy https://svn.easysw.com/public/cups/trunk "$url" \ + -m "Tag $version" || exit 1 +fi + +echo Exporting $fileversion... +rm -rf /tmp/cups-$version +svn export $url /tmp/cups-$version + +echo Updating version information... +cd /tmp/cups-$version/config-scripts + +sed -e '1,$s/^CUPS_VERSION=.*/CUPS_VERSION='$version'/' \ + cups-common.m4.new +mv cups-common.m4.new cups-common.m4 +cd .. +fileurl=`echo $fileurl | sed -e '1,$s/\\//\\\\\\//g'` +sed -e '1,$s/@CUPS_VERSION@/'$version'/' \ + -e '1,$s/^Release:.*/Release: '$rev'/' \ + -e '1,$s/^Source:.*/Source: '$fileurl'/' \ + packaging/cups.spec + +echo Configuring... +autoconf -f +rm -rf autom4te*.cache +rm -rf standards +rm -rf tools +cd .. + +echo -n Archiving...gz +tar czf cups-$version-r$rev-source.tar.gz cups-$version +echo -n ...bz2 +tar cjf cups-$version-r$rev-source.tar.bz2 cups-$version +echo "..." + +echo "Done!" + +# +# End of "$Id$". +# diff --git a/tools/testrpm b/tools/testrpm index db39fc826..047200ef7 100755 --- a/tools/testrpm +++ b/tools/testrpm @@ -1,5 +1,7 @@ #!/bin/sh # +# "$Id$" +# # Test script for making RPMs... # @@ -12,37 +14,15 @@ if test ! -f tools/testrpm; then exit 1 fi -echo Updating... -svn up -rev=`svnversion . | sed -e '1,$s/[a-zA-Z]//g'` -version="1.2svn" - -echo Exporting $version... -rm -rf /tmp/cups-$version -svn export . /tmp/cups-$version - -echo Configuring... -cd /tmp/cups-$version/config-scripts - -sed -e '1,$s/^CUPS_VERSION=.*/CUPS_VERSION='$version'/' \ - cups-common.m4.new -mv cups-common.m4.new cups-common.m4 -cd .. -sed -e '1,$s/@CUPS_VERSION@/'$version'/' \ - -e '1,$s/^Release:.*/Release: '$rev'/' \ - -e '1,$s/-source/-r'$rev'-source/' \ - packaging/cups.spec -autoconf -f -rm -rf autom4te*.cache -rm -rf standards -rm -rf tools -cd .. - -echo Archiving... -tar czf cups-$version-r$rev-source.tar.gz cups-$version -tar cjf cups-$version-r$rev-source.tar.bz2 cups-$version +# Get a snapshot of the current source... +. tools/makesrcdist +# Build the RPM... echo Building rpm... rm -f /usr/src/redhat/RPMS/i386/cups*.rpm rm -f /usr/src/redhat/SRPMS/cups*.rpm -rpmbuild -ta cups-$version-r$rev-source.tar.gz +rpmbuild -ta cups-$fileversion-source.tar.bz2 + +# +# End of "$Id$". +# -- 2.39.2