diff options
author | jlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2006-01-13 01:51:53 +0000 |
---|---|---|
committer | jlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2006-01-13 01:51:53 +0000 |
commit | ef416fc25c4af449e930416117bedb12fc9924ba (patch) | |
tree | 11f8aa8c5d3565a17d4a6d5121d3edba22e2a21e /tools | |
parent | 9ec11526e139aeacf6a052799a6aa22cbbe6ebb2 (diff) |
Load cups into easysw/current.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@2 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/makesrcdist | 71 | ||||
-rwxr-xr-x | tools/testosx | 87 | ||||
-rwxr-xr-x | tools/testrpm | 28 |
3 files changed, 186 insertions, 0 deletions
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 >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.in >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/testosx b/tools/testosx new file mode 100755 index 000000000..d96e9f472 --- /dev/null +++ b/tools/testosx @@ -0,0 +1,87 @@ +#!/bin/sh +# Make sure we are running in the right directory... +if test ! -f tools/testosx; then + echo "Run this script from the top-level CUPS source directory, e.g.:" + echo "" + echo " tools/testosx" + echo "" + exit 1 +fi + +# Update the current working copy... +svn up +rev=`svnversion . | sed -e '1,$s/[a-zA-Z]//g'` + +# Make everything... +make all + +# Setup an install directory... +user=`whoami` +topdir=`pwd` +pkgdir="/tmp/cups.pkg-$user" + +echo Building package using temp directory $pkgdir... +rm -rf $pkgdir +mkdir -p $pkgdir/Package +mkdir -p $pkgdir/Resources + +# Install CUPS into the Package directory... +#make INSTALL=$topdir/install-sh BUILDROOT=$pkgdir/Package install +make BUILDROOT=$pkgdir/Package install + +# Install resource files into the Resources directory... +echo Installing resource files... +cp packaging/LICENSE.rtf $pkgdir/Resources/ReadMe.rtf +cp packaging/WELCOME.rtf $pkgdir/Resources/Welcome.rtf +cp packaging/installer.tif $pkgdir/Resources/background.tif + +cat >$pkgdir/Resources/preflight <<EOF +#!/bin/sh +killall cupsd || exit 0 +EOF +chmod 755 $pkgdir/Resources/preflight + +cat >$pkgdir/Resources/postflight <<EOF +#!/bin/sh +/usr/sbin/cupsd +EOF +chmod 755 $pkgdir/Resources/postflight + +# Tag the current revision in the plist and web interface files... +sed -e '1,$s/@CUPS_VERSION@/1.2svn-r'$rev'/g' \ + -e '1,$s/@CUPS_RELEASE@/1.2.'$rev'/g' \ + <packaging/cups-desc.plist.in >packaging/cups-desc.plist +sed -e '1,$s/@CUPS_VERSION@/1.2svn-r'$rev'/g' \ + -e '1,$s/@CUPS_RELEASE@/1.2.'$rev'/g' \ + <packaging/cups-info.plist.in >packaging/cups-info.plist +sed -e '1,$s/@CUPS_VERSION@/1.2svn-r'$rev'/g' \ + <doc/index.html.in >doc/index.html + +# Figure out where PackageMaker is installled... +if test -d /Developer/Applications/Utilities/PackageMaker.app; then + PackageMaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker +else + PackageMaker=/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker +fi + +# Create the package... +echo Creating MacOS X package... +rm -rf cups.pkg +echo $PackageMaker -build -v -p cups.pkg \ + -f $pkgdir/Package \ + -r $pkgdir/Resources \ + -d packaging/cups-desc.plist \ + -i packaging/cups-info.plist +$PackageMaker -build -v -p cups.pkg \ + -f $pkgdir/Package \ + -r $pkgdir/Resources \ + -d packaging/cups-desc.plist \ + -i packaging/cups-info.plist + +# Create a disk image... +echo Creating MacOS X disk image... +hdiutil create -ov -srcfolder cups.pkg cups-1.2svn-r$rev.dmg + +# Cleanup temp files... +echo Removing temporary files... +rm -rf $pkgdir diff --git a/tools/testrpm b/tools/testrpm new file mode 100755 index 000000000..047200ef7 --- /dev/null +++ b/tools/testrpm @@ -0,0 +1,28 @@ +#!/bin/sh +# +# "$Id$" +# +# 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" + echo "" + exit 1 +fi + +# 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-$fileversion-source.tar.bz2 + +# +# End of "$Id$". +# |