summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael R Sweet <michaelrsweet@gmail.com>2017-01-17 12:24:30 -0500
committerMichael R Sweet <michaelrsweet@gmail.com>2017-01-17 12:24:30 -0500
commit37a8aac24308a93cc5eec25d55798491a86c6221 (patch)
tree46b3e4cc0ab4e765ca1cbd52228ff0546cb1e520 /tools
parent3f7aa006188eb87824fa73a5ea83be3a3eef620f (diff)
downloadcups-37a8aac24308a93cc5eec25d55798491a86c6221.tar.gz
Bring back RPM test script, tweak makesrcdist to work.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/makesrcdist10
-rwxr-xr-xtools/testrpm26
2 files changed, 33 insertions, 3 deletions
diff --git a/tools/makesrcdist b/tools/makesrcdist
index 6a9ea24e7..2d806d6c1 100755
--- a/tools/makesrcdist
+++ b/tools/makesrcdist
@@ -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
index 000000000..51c077861
--- /dev/null
+++ b/tools/testrpm
@@ -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