version="2.2git"
fileversion="2.2git-$rev"
fileurl="file://$TMPDIR/cups-$fileversion.tar.gz"
+ SIGNFILES=no
else
# Use version from command-line
rev="1"
version=$1
fileversion=$1
fileurl="https://github.com/apple/cups/releases/download/release-$fileversion/cups-$fileversion-source.tar.gz"
+ SIGNFILES=yes
echo Validating sources...
cupsversionpatch=`echo $version | awk -F. '{if (NF == 3) { print $3 } else { print "0" } }'`
echo Archiving...
tar czf $file cups-$version
-echo Signing...
-test -f $file.sig && rm -f $file.sig
-gpg --detach-sign $file
+if test $SIGNFILES = yes; then
+ echo Signing...
+ test -f $file.sig && rm -f $file.sig
+ gpg --detach-sign $file
+fi
echo Removing temporary files...
rm -rf cups-$version
--- /dev/null
+#!/bin/sh
+#
+# Test script for making RPMs...
+#
+
+# Make sure we are running in the right directory...
+if test ! -f tools/testrpm; then
+ echo "Run this script from the top-level CUPS source directory, e.g.:"
+ echo ""
+ echo " tools/testrpm [rpmbuild options]"
+ echo ""
+ exit 1
+fi
+
+# Strip command-line arguments so we don't create a release tag...
+args="$*"
+shift $#
+
+# 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 $args cups-$fileversion-source.tar.bz2