1*5e7646d2SAndroid Build Coastguard Worker#!/bin/sh -x 2*5e7646d2SAndroid Build Coastguard Worker# 3*5e7646d2SAndroid Build Coastguard Worker# Test script for making RPMs... 4*5e7646d2SAndroid Build Coastguard Worker# 5*5e7646d2SAndroid Build Coastguard Worker 6*5e7646d2SAndroid Build Coastguard Worker# Make sure we are running in the right directory... 7*5e7646d2SAndroid Build Coastguard Workerif test ! -f scripts/makerpm; then 8*5e7646d2SAndroid Build Coastguard Worker echo "Run this script from the top-level CUPS source directory, e.g.:" 9*5e7646d2SAndroid Build Coastguard Worker echo "" 10*5e7646d2SAndroid Build Coastguard Worker echo " scripts/makerpm [rpmbuild options]" 11*5e7646d2SAndroid Build Coastguard Worker echo "" 12*5e7646d2SAndroid Build Coastguard Worker exit 1 13*5e7646d2SAndroid Build Coastguard Workerfi 14*5e7646d2SAndroid Build Coastguard Worker 15*5e7646d2SAndroid Build Coastguard Worker# Strip command-line arguments so we don't create a release tag... 16*5e7646d2SAndroid Build Coastguard Workerargs="$*" 17*5e7646d2SAndroid Build Coastguard Workershift $# 18*5e7646d2SAndroid Build Coastguard Worker 19*5e7646d2SAndroid Build Coastguard Worker# Get a snapshot of the current source... 20*5e7646d2SAndroid Build Coastguard Worker. scripts/makesrcdist 21*5e7646d2SAndroid Build Coastguard Worker 22*5e7646d2SAndroid Build Coastguard Worker# Build the RPM... 23*5e7646d2SAndroid Build Coastguard Workerecho Building rpm... 24*5e7646d2SAndroid Build Coastguard Worker#rm -f /usr/src/redhat/RPMS/i386/cups*.rpm 25*5e7646d2SAndroid Build Coastguard Worker#rm -f /usr/src/redhat/SRPMS/cups*.rpm 26*5e7646d2SAndroid Build Coastguard Workerrpmbuild -ta $args cups-${fileversion}-source.tar.gz 27