From 366d29a86e5e0d6d7dfa25f83d7d401812a96aa0 Mon Sep 17 00:00:00 2001 From: maroy Date: Fri, 22 Apr 2005 16:46:16 +0000 Subject: [PATCH] changes to the debian source package creating tools --- livesupport/bin/createDebianPackages.sh | 59 ++++++------------------ livesupport/bin/dist.sh | 3 +- livesupport/etc/debian/control | 2 +- livesupport/etc/debian/rules | 3 -- livesupport/etc/livesupport.dsc.template | 30 ------------ 5 files changed, 18 insertions(+), 79 deletions(-) delete mode 100644 livesupport/etc/livesupport.dsc.template diff --git a/livesupport/bin/createDebianPackages.sh b/livesupport/bin/createDebianPackages.sh index adb5ecc53..664afa026 100755 --- a/livesupport/bin/createDebianPackages.sh +++ b/livesupport/bin/createDebianPackages.sh @@ -22,7 +22,7 @@ # # # Author : $Author: maroy $ -# Version : $Revision: 1.3 $ +# Version : $Revision: 1.4 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/bin/createDebianPackages.sh,v $ #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- @@ -64,9 +64,6 @@ printUsage() echo " [default: current directory]"; echo " -v, --version The version number of the created packages."; echo " From package_x.y-z_i386.deb, this is x.y"; - echo " -V, --debian-version The debian release version of the"; - echo " created packages. [default: 1]"; - echo " From package_x.y-z_i386.deb, this is z"; echo " -h, --help Print this message and exit."; echo ""; } @@ -77,7 +74,7 @@ printUsage() #------------------------------------------------------------------------------- CMD=${0##*/} -opts=$(getopt -o d:hm:o:v:V: -l debian-version:,directory:,help,maintainer:,output-directory,version: -n $CMD -- "$@") || exit 1 +opts=$(getopt -o d:hm:o:v: -l directory:,help,maintainer:,output-directory,version: -n $CMD -- "$@") || exit 1 eval set -- "$opts" while true; do case "$1" in @@ -96,9 +93,6 @@ while true; do -v|--version) version=$2; shift; shift;; - -V|--debian-version) - debianVersion=$2; - shift; shift;; --) shift; break;; @@ -121,10 +115,6 @@ if [ "x$version" == "x" ]; then exit 1; fi -if [ "x$debianVersion" == "x" ]; then - debianVersion=1 -fi - if [ "x$directory" == "x" ]; then directory=`pwd`; else @@ -142,10 +132,10 @@ echo "Creating Debian source packages for LiveSupport."; echo ""; echo "Using the following parameters:"; echo ""; -echo " tarball directory: $directory"; -echo " maintainer: $maintainer"; -echo " package version: $version-$debianVersion"; -echo " output directory: $outdir"; +echo " tarball directory: $directory"; +echo " maintainer: $maintainer"; +echo " package version: $version"; +echo " output directory: $outdir"; echo "" @@ -169,10 +159,9 @@ check_exe() { #------------------------------------------------------------------------------- # Check for executables needed by this script #------------------------------------------------------------------------------- +echo "Checking for tools used by this script..."; check_exe "tar" || exit 1; -check_exe "md5sum" || exit 1; -check_exe "find" || exit 1; -check_exe "gzip" || exit 1; +check_exe "dpkg-source" || exit 1; check_exe "sed" || exit 1; @@ -196,14 +185,8 @@ fi packageName=livesupport-$version packageNameOrig=$packageName.orig workdir=$tmpdir/debianize -fullVersion=$version-$debianVersion -diffGz=livesupport_$fullVersion.diff.gz -origTarGz=livesupport_$fullVersion.orig.tar.gz -dsc=livesupport_$fullVersion.dsc -replace_sed_string="s/ls_version/$version/; \ - s/ls_debianVersion/$debianVersion/; \ - s/ls_maintainer/$maintainer/;" +replace_sed_string="s/ls_maintainer/$maintainer/;" #------------------------------------------------------------------------------- @@ -228,7 +211,6 @@ mv $packageName $packageNameOrig tar xfj $tarball tar xfj $tarball_libs - #------------------------------------------------------------------------------- # Debianize the livesupport-$version sources #------------------------------------------------------------------------------- @@ -236,6 +218,10 @@ echo "Debianizing sources..."; cp -pPR $etcdir/debian $packageName +# customize the control file, with the maintainer name +cat $etcdir/debian/control | sed -e "$replace_sed_string" \ + > $packageName/debian/control + # get rid of the remnants of the CVS system rm -rf `find $packageName -name CVS -type d` @@ -245,22 +231,7 @@ rm -rf `find $packageName -name CVS -type d` #------------------------------------------------------------------------------- echo "Creating debian source package..."; -diff -Naur $packageNameOrig $packageName | gzip -9 > $diffGz - -# create the original source tarball -tar cfz $origTarGz $packageNameOrig - -# customize the dsc file -cat $etcdir/livesupport.dsc.template | sed -e "$replace_sed_string" > $dsc - -# append with checksums, sizes and source file names -md5sum=`md5sum $origTarGz | cut -d" " -f1` -size=`find . -name $origTarGz -printf "%s"` -echo " $md5sum $size $origTarGz" >> $dsc - -md5sum=`md5sum $diffGz | cut -d" " -f1` -size=`find . -name $diffGz -printf "%s"` -echo " $md5sum $size $diffGz" >> $dsc +dpkg-source -b $packageName $packageNameOrig #------------------------------------------------------------------------------- @@ -268,7 +239,7 @@ echo " $md5sum $size $diffGz" >> $dsc #------------------------------------------------------------------------------- echo "Moving debian source package files to target directory..."; -mv -f $origTarGz $diffGz $dsc $outdir +mv -f livesupport_$version* $outdir #------------------------------------------------------------------------------- diff --git a/livesupport/bin/dist.sh b/livesupport/bin/dist.sh index e49238ffe..1225138c0 100755 --- a/livesupport/bin/dist.sh +++ b/livesupport/bin/dist.sh @@ -22,7 +22,7 @@ # # # Author : $Author: maroy $ -# Version : $Revision: 1.6 $ +# Version : $Revision: 1.7 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/bin/dist.sh,v $ #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- @@ -207,6 +207,7 @@ cp -pPR $products_dir/* $products_tmpdir #------------------------------------------------------------------------------- # Copy additional files #------------------------------------------------------------------------------- +cp -pPR $bindir $ls_tmpdir cp -pPR $docdir $ls_tmpdir cp -pPR $etcdir $ls_tmpdir cp -pPR README INSTALL configure $ls_tmpdir diff --git a/livesupport/etc/debian/control b/livesupport/etc/debian/control index 5e97f89dd..2a9ddaa75 100644 --- a/livesupport/etc/debian/control +++ b/livesupport/etc/debian/control @@ -1,7 +1,7 @@ Source: livesupport Section: unknown Priority: optional -Maintainer: Akos Maroy +Maintainer: ls_maintainer Build-Depends: debhelper (>= 4.0.0), binutils (>= 2.13), gcc (>= 3.3), diff --git a/livesupport/etc/debian/rules b/livesupport/etc/debian/rules index 8e3de12ad..1ff08df1b 100755 --- a/livesupport/etc/debian/rules +++ b/livesupport/etc/debian/rules @@ -29,7 +29,6 @@ endif config.status: configure dh_testdir - # Add here commands to configure the package. CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/opt/livesupport @@ -38,7 +37,6 @@ build: build-arch build-arch: build-arch-stamp build-arch-stamp: config.status - # Add here commands to compile the arch part of the package. $(MAKE) setup compile touch build-arch-stamp @@ -47,7 +45,6 @@ clean: dh_testroot rm -f build-arch-stamp #CONFIGURE-STAMP# - # Add here commands to clean up after the build process. -$(MAKE) distclean clean dh_clean diff --git a/livesupport/etc/livesupport.dsc.template b/livesupport/etc/livesupport.dsc.template deleted file mode 100644 index 43a68393e..000000000 --- a/livesupport/etc/livesupport.dsc.template +++ /dev/null @@ -1,30 +0,0 @@ -Format: 1.0 -Source: livesupport -Version: ls_version-ls_debianVersion -Binary: livesupport-libs, libesupport-station, livesupport-studio -Maintainer: ls_maintainer -Architecture: any -Standards-Version: 3.6.1 -Build-Depends: debhelper (>= 4.0.0), - binutils (>= 2.13), - gcc (>= 3.3), - g++ (>= 3.3), - make (>= 3.80). - automake1.7, - autoconf (>= 2.59), - libtool, - pkgconfig (>= 0.15), - patch (>= 2.5.9), - doxygen, - tar, - gzip, - bzip2, - curl, - unixodbc-dev (>= 2.2), - xlibs-dev (>= 4.1.0), - libfontconfig1-dev, - libpng12-dev, - libjpeg62-dev, - libssl-dev, - libxml2-dev -Files: