]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Bring back RPM test script, tweak makesrcdist to work.
authorMichael R Sweet <michaelrsweet@gmail.com>
Tue, 17 Jan 2017 17:24:30 +0000 (12:24 -0500)
committerMichael R Sweet <michaelrsweet@gmail.com>
Tue, 17 Jan 2017 17:24:30 +0000 (12:24 -0500)
tools/makesrcdist
tools/testrpm [new file with mode: 0755]

index 6a9ea24e71ca337d64f3a223b3c1410af3080948..2d806d6c19814dddc8c6e1316473e7e3c1d6615b 100755 (executable)
@@ -28,12 +28,14 @@ if test $# = 0; then
        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" } }'`
@@ -100,9 +102,11 @@ cd ..
 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
diff --git a/tools/testrpm b/tools/testrpm
new file mode 100755 (executable)
index 0000000..51c0778
--- /dev/null
@@ -0,0 +1,26 @@
+#!/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