changes to the debian source package creating tools
This commit is contained in:
parent
a3e3d6bcfd
commit
366d29a86e
5 changed files with 18 additions and 79 deletions
|
@ -22,7 +22,7 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Author : $Author: maroy $
|
# Author : $Author: maroy $
|
||||||
# Version : $Revision: 1.3 $
|
# Version : $Revision: 1.4 $
|
||||||
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/bin/createDebianPackages.sh,v $
|
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/bin/createDebianPackages.sh,v $
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
@ -64,9 +64,6 @@ printUsage()
|
||||||
echo " [default: current directory]";
|
echo " [default: current directory]";
|
||||||
echo " -v, --version The version number of the created packages.";
|
echo " -v, --version The version number of the created packages.";
|
||||||
echo " From package_x.y-z_i386.deb, this is x.y";
|
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 " -h, --help Print this message and exit.";
|
||||||
echo "";
|
echo "";
|
||||||
}
|
}
|
||||||
|
@ -77,7 +74,7 @@ printUsage()
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
CMD=${0##*/}
|
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"
|
eval set -- "$opts"
|
||||||
while true; do
|
while true; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -96,9 +93,6 @@ while true; do
|
||||||
-v|--version)
|
-v|--version)
|
||||||
version=$2;
|
version=$2;
|
||||||
shift; shift;;
|
shift; shift;;
|
||||||
-V|--debian-version)
|
|
||||||
debianVersion=$2;
|
|
||||||
shift; shift;;
|
|
||||||
--)
|
--)
|
||||||
shift;
|
shift;
|
||||||
break;;
|
break;;
|
||||||
|
@ -121,10 +115,6 @@ if [ "x$version" == "x" ]; then
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x$debianVersion" == "x" ]; then
|
|
||||||
debianVersion=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "x$directory" == "x" ]; then
|
if [ "x$directory" == "x" ]; then
|
||||||
directory=`pwd`;
|
directory=`pwd`;
|
||||||
else
|
else
|
||||||
|
@ -142,10 +132,10 @@ echo "Creating Debian source packages for LiveSupport.";
|
||||||
echo "";
|
echo "";
|
||||||
echo "Using the following parameters:";
|
echo "Using the following parameters:";
|
||||||
echo "";
|
echo "";
|
||||||
echo " tarball directory: $directory";
|
echo " tarball directory: $directory";
|
||||||
echo " maintainer: $maintainer";
|
echo " maintainer: $maintainer";
|
||||||
echo " package version: $version-$debianVersion";
|
echo " package version: $version";
|
||||||
echo " output directory: $outdir";
|
echo " output directory: $outdir";
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,10 +159,9 @@ check_exe() {
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Check for executables needed by this script
|
# Check for executables needed by this script
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
echo "Checking for tools used by this script...";
|
||||||
check_exe "tar" || exit 1;
|
check_exe "tar" || exit 1;
|
||||||
check_exe "md5sum" || exit 1;
|
check_exe "dpkg-source" || exit 1;
|
||||||
check_exe "find" || exit 1;
|
|
||||||
check_exe "gzip" || exit 1;
|
|
||||||
check_exe "sed" || exit 1;
|
check_exe "sed" || exit 1;
|
||||||
|
|
||||||
|
|
||||||
|
@ -196,14 +185,8 @@ fi
|
||||||
packageName=livesupport-$version
|
packageName=livesupport-$version
|
||||||
packageNameOrig=$packageName.orig
|
packageNameOrig=$packageName.orig
|
||||||
workdir=$tmpdir/debianize
|
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/; \
|
replace_sed_string="s/ls_maintainer/$maintainer/;"
|
||||||
s/ls_debianVersion/$debianVersion/; \
|
|
||||||
s/ls_maintainer/$maintainer/;"
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
@ -228,7 +211,6 @@ mv $packageName $packageNameOrig
|
||||||
tar xfj $tarball
|
tar xfj $tarball
|
||||||
tar xfj $tarball_libs
|
tar xfj $tarball_libs
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Debianize the livesupport-$version sources
|
# Debianize the livesupport-$version sources
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
@ -236,6 +218,10 @@ echo "Debianizing sources...";
|
||||||
|
|
||||||
cp -pPR $etcdir/debian $packageName
|
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
|
# get rid of the remnants of the CVS system
|
||||||
rm -rf `find $packageName -name CVS -type d`
|
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...";
|
echo "Creating debian source package...";
|
||||||
|
|
||||||
diff -Naur $packageNameOrig $packageName | gzip -9 > $diffGz
|
dpkg-source -b $packageName $packageNameOrig
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
@ -268,7 +239,7 @@ echo " $md5sum $size $diffGz" >> $dsc
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
echo "Moving debian source package files to target directory...";
|
echo "Moving debian source package files to target directory...";
|
||||||
|
|
||||||
mv -f $origTarGz $diffGz $dsc $outdir
|
mv -f livesupport_$version* $outdir
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Author : $Author: maroy $
|
# Author : $Author: maroy $
|
||||||
# Version : $Revision: 1.6 $
|
# Version : $Revision: 1.7 $
|
||||||
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/bin/dist.sh,v $
|
# 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
|
# Copy additional files
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
cp -pPR $bindir $ls_tmpdir
|
||||||
cp -pPR $docdir $ls_tmpdir
|
cp -pPR $docdir $ls_tmpdir
|
||||||
cp -pPR $etcdir $ls_tmpdir
|
cp -pPR $etcdir $ls_tmpdir
|
||||||
cp -pPR README INSTALL configure $ls_tmpdir
|
cp -pPR README INSTALL configure $ls_tmpdir
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Source: livesupport
|
Source: livesupport
|
||||||
Section: unknown
|
Section: unknown
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Akos Maroy <maroy@campware.org>
|
Maintainer: ls_maintainer
|
||||||
Build-Depends: debhelper (>= 4.0.0),
|
Build-Depends: debhelper (>= 4.0.0),
|
||||||
binutils (>= 2.13),
|
binutils (>= 2.13),
|
||||||
gcc (>= 3.3),
|
gcc (>= 3.3),
|
||||||
|
|
|
@ -29,7 +29,6 @@ endif
|
||||||
|
|
||||||
config.status: configure
|
config.status: configure
|
||||||
dh_testdir
|
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
|
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: build-arch-stamp
|
||||||
build-arch-stamp: config.status
|
build-arch-stamp: config.status
|
||||||
|
|
||||||
# Add here commands to compile the arch part of the package.
|
|
||||||
$(MAKE) setup compile
|
$(MAKE) setup compile
|
||||||
touch build-arch-stamp
|
touch build-arch-stamp
|
||||||
|
|
||||||
|
@ -47,7 +45,6 @@ clean:
|
||||||
dh_testroot
|
dh_testroot
|
||||||
rm -f build-arch-stamp #CONFIGURE-STAMP#
|
rm -f build-arch-stamp #CONFIGURE-STAMP#
|
||||||
|
|
||||||
# Add here commands to clean up after the build process.
|
|
||||||
-$(MAKE) distclean clean
|
-$(MAKE) distclean clean
|
||||||
|
|
||||||
dh_clean
|
dh_clean
|
||||||
|
|
|
@ -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:
|
|
Loading…
Add table
Add a link
Reference in a new issue