fixed creating lazarus debs

git-svn-id: trunk@4015 -
This commit is contained in:
mattias 2003-04-05 08:46:39 +00:00
parent 937b0a3e47
commit 40339eafea
2 changed files with 37 additions and 10 deletions

View File

@ -86,6 +86,7 @@ Debian:
Creating the debian fpc packages:
You need the debhelper, tetex-bin, tetex-extra, awk, dvipdfm, latex2html
packages.
See install/debian/README.debian for changing /etc/texmf/texmf.cnf.

View File

@ -1,14 +1,37 @@
#!/bin/bash
#set -x
set -x
set -e
# get installed fpc version
FPCDeb=`dpkg -l | grep fp-compiler`
if [ "x$FPCDeb" = "x" ]; then
echo ERROR: fp-compiler deb not installed
exit
fi
# get date of day
Year=`date +%y`
Month=`date +%m`
Day=`date +%d`
Date=20$Year$Month$Day
LazVersion=0.8.5.2
LazRelease=`dpkg -s fp-compiler | grep '^Version' | sed -e 's/Version: //'`
LazRelease=`echo $LazRelease | sed -e 's/-/_/g'`
SrcTGZ=lazarus-$Date.tgz
CurDir=`pwd`
TempDir=/tmp/lazarus_temp
LazBuildDir=$TempDir/lazarus_build
LazTGZ=$CurDir/lazarus-0.8.5.tgz
LazDeb=lazarus-0.8.5-2.deb
TmpDir=/tmp/lazarus$LazVersion
LazBuildDir=$TmpDir/lazarus_build
LazDeb=$CurDir/lazarus-$LazVersion-fpc_$LazRelease.deb
DebianSrcDir=$CurDir/debian_lazarus
LazDestDir=$LazBuildDir/usr/share/lazarus
FPCVersion=`echo $LazRelease | sed -e 's/_.*//'`
# download lazarus cvs if necessary
if [ ! -f $SrcTGZ ]; then
./create_lazarus_export_tgz.sh $SrcTGZ
fi
echo "Build directory is $LazBuildDir"
if [ x$LazBuildDir = x/ ]; then
@ -18,10 +41,10 @@ fi
rm -rf $LazBuildDir
# Unpack lazarus source
echo "unpacking $LazTGZ ..."
echo "unpacking $SrcTGZ ..."
mkdir -p $LazBuildDir/usr/share/
cd $LazBuildDir/usr/share/
tar xzf $LazTGZ
tar xzf $CurDir/$SrcTGZ
find . -name '.cvsignore' -exec rm {} \;
cd -
@ -34,7 +57,10 @@ cd -
# create control file
echo "copying control file"
mkdir -p $LazBuildDir/DEBIAN
cp $DebianSrcDir/control $LazBuildDir/DEBIAN/
cat $DebianSrcDir/control | \
sed -e "s/FPCVERSION/$FPCVersion/g" \
-e "s/LAZVERSION/$LazVersion/g" \
> $LazBuildDir/DEBIAN/control
# copyright and changelog files
echo "copying copyright and changelog files"
@ -58,10 +84,10 @@ find $LazBuildDir -name '*.sh' -exec chmod a+x {} \;
# creating deb
echo "creating deb ..."
cd $TempDir
cd $TmpDir
fakeroot dpkg-deb --build $LazBuildDir
mv $LazBuildDir.deb $LazDeb
echo "`pwd`/$LazDeb created."
echo "$LazDeb created."
cd -
# end.