From: Chilts <and...@us...> - 2005-04-30 08:59:24
|
Update of /cvsroot/data-pluginfile/data-pluginfiles/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12853 Modified Files: build_tar_gz.sh Added Files: build_deb.sh control.m4 Log Message: - slight changes to build_tar_gz.sh - addition of build_deb.sh and control.m4 --- NEW FILE: control.m4 --- Package: __PACKAGE__ Version: __VERSION__ Section: perl Priority: optional Architecture: all Pre-Depends: perl Installed-Size: 1024 Maintainer: Andrew Chilton <and...@us...> Description: A Perl Module library to easily query a data file with format "Plugin: param=value...". . Data::PluginFiles provides a quick and easy way of loading up a datafile which has the format: . Plugin: param1=value1 param2=value2... . The library also allows the values to contain spaces (using quoting), run over multiple lines (with HEREDOCs) and allow input of arrays to one parameter name. . Comment lines and blank lines are allowed. Index: build_tar_gz.sh =================================================================== RCS file: /cvsroot/data-pluginfile/data-pluginfiles/scripts/build_tar_gz.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build_tar_gz.sh 30 Apr 2005 05:43:10 -0000 1.1 --- build_tar_gz.sh 30 Apr 2005 08:59:10 -0000 1.2 *************** *** 10,14 **** VERSION=$1 BASENAME="data-pluginfile" ! MODNAME="data-pluginfiles" RELEASE="$BASENAME-$VERSION" echo "Building package $RELEASE..." --- 10,14 ---- VERSION=$1 BASENAME="data-pluginfile" ! MODULE="data-pluginfiles" RELEASE="$BASENAME-$VERSION" echo "Building package $RELEASE..." *************** *** 26,32 **** TMPDIR=`mktemp -d build_tar_gz.XXXXXX` cd $TMPDIR ! cvs -q -d:ext:and...@cv...:/cvsroot/$BASENAME export -Dtomorrow $MODNAME cd ../ ! MODDIR="$TMPDIR/$MODNAME" # copy the files we need for the release --- 26,32 ---- TMPDIR=`mktemp -d build_tar_gz.XXXXXX` cd $TMPDIR ! cvs -q -d:ext:and...@cv...:/cvsroot/$BASENAME export -Dtomorrow $MODULE cd ../ ! MODDIR="$TMPDIR/$MODULE" # copy the files we need for the release *************** *** 34,45 **** cp -R $MODDIR/t $RELEASE cp -R $MODDIR/Data $RELEASE # make the tar tar -zcf $RELEASE.tar.gz $RELEASE - # cleanup - rm -rf $RELEASE - rm -rf $TMPDIR - echo "...done" --- 34,42 ---- cp -R $MODDIR/t $RELEASE cp -R $MODDIR/Data $RELEASE + rm -rf $TMPDIR # make the tar tar -zcf $RELEASE.tar.gz $RELEASE echo "...done" --- NEW FILE: build_deb.sh --- #!/bin/bash ## ---------------------------------------------------------------------------- if [ -z "$1" ]; then echo "Please specify a release version (e.g 0.1)" exit 1; fi if [ -z "$2" ]; then echo "Please specify a Debian revision (e.g 1)" exit 1; fi # setup env vars VERSION=$1 REVISION=$2 PROJECTNAME="data-pluginfile" MODULE="data-pluginfiles" PACKAGE="lib$MODULE-perl" PACKAGEFILENAME="${PACKAGE}_$VERSION-${REVISION}_all.deb" echo "Building package $PACKAGEFILENAME..." # remove any leftover old directories and create a new one if [ -d "$PACKAGE" ]; then rm -rf "$PACKAGE" fi if [ -f "$PACKAGEFILENAME" ]; then rm -f "$PACKAGEFILENAME" fi # export a copy of the module to a temporary directory TMPDIR=`mktemp -d build_deb.XXXXXX` cd $TMPDIR cvs -q -d:ext:and...@cv...:/cvsroot/$PROJECTNAME export -Dtomorrow $MODULE cd ../ MODDIR="$TMPDIR/$MODULE" # make all the relvant directories mkdir $PACKAGE mkdir $PACKAGE/DEBIAN mkdir -p $PACKAGE/usr/share/perl5/Data mkdir -p $PACKAGE/usr/share/man/man3 mkdir -p $PACKAGE/usr/share/doc/$PACKAGE # create the control file m4 -P \ --define=__PACKAGE__="$PACKAGE" \ --define=__VERSION__="$VERSION-$REVISION" \ control.m4 > $PACKAGE/DEBIAN/control # sort a few things out in the filesystem hierarchy ## create the man page TMP=`mktemp` pod2man $MODDIR/Data/PluginFiles.pm $TMP mv $TMP $PACKAGE/usr/share/man/man3/Data::PluginFiles.3pm gzip --best $PACKAGE/usr/share/man/man3/Data::PluginFiles.3pm chmod 644 $PACKAGE/usr/share/man/man3/Data::PluginFiles.3pm.gz # do the README, changelogs and copyright cp $MODDIR/README $PACKAGE/usr/share/doc/$PACKAGE/ gzip --best $PACKAGE/usr/share/doc/$PACKAGE/README cp $MODDIR/docs/changelog $MODDIR/docs/changelog.Debian $PACKAGE/usr/share/doc/$PACKAGE/ gzip --best $PACKAGE/usr/share/doc/$PACKAGE/changelog gzip --best $PACKAGE/usr/share/doc/$PACKAGE/changelog.Debian cp $MODDIR/docs/copyright $PACKAGE/usr/share/doc/$PACKAGE/ # finally (phew) copy the program file(s) cp -R $MODDIR/Data/PluginFiles.pm $PACKAGE/usr/share/perl5/Data/ # remove waste rm -rf $TMPDIR fakeroot dpkg --build $PACKAGE mv $PACKAGE.deb $PACKAGEFILENAME ## ---------------------------------------------------------------------------- |