added scripts to create slackware package for lazarus

git-svn-id: trunk@9905 -
This commit is contained in:
mattias 2006-09-15 14:42:03 +00:00
parent 9c58eb7873
commit 35bdbc536c
4 changed files with 120 additions and 0 deletions

3
.gitattributes vendored
View File

@ -2647,6 +2647,7 @@ tools/install/create_fpc_tgz_from_local_dir.sh svneol=native#text/plain
tools/install/create_lazarus_deb.sh svneol=native#text/plain
tools/install/create_lazarus_export_tgz.sh svneol=native#text/plain
tools/install/create_lazarus_rpm.sh svneol=native#text/plain
tools/install/create_lazarus_slacktgz.sh svneol=native#text/plain
tools/install/create_lazarus_snapshot_rpm.sh svneol=native#text/plain
tools/install/cross_unix/HowToCreate_fpc_crosswin32_deb.txt svneol=native#text/plain
tools/install/cross_unix/HowToCreate_fpc_crosswin32_rpm.txt svneol=native#text/plain
@ -2684,6 +2685,8 @@ tools/install/rpm/fpc.spec.template svneol=native#text/plain
tools/install/rpm/fpc_crosswin32.spec.template svneol=native#text/plain
tools/install/rpm/get_rpm_source_dir.sh svneol=native#text/plain
tools/install/rpm/lazarus.spec.template svneol=native#text/plain
tools/install/slacktgz/build.sh svneol=native#text/plain
tools/install/slacktgz/slack-desc svneol=native#text/plain
tools/install/smart_strip.sh svneol=native#text/plain
tools/install/win32/build-fpc.bat svneol=native#text/x-msdos-program
tools/install/win32/build-lazarus.bat svneol=native#text/x-msdos-program

View File

@ -0,0 +1,81 @@
#!/bin/bash
set -x
set -e
# get date of day
Year=$(date +%y)
Month=$(date +%m)
Day=$(date +%d)
# get installed fpc version
echo "getting installed fpc version ..."
if ! which ppc386 ; then
echo ERROR: fpc not installed
exit
fi
FPCVER=`ppc386 -l | head -n 1 | awk '{print $5}'`
echo "installed fpc version: $FPCVER"
Date=$Year$Month$Day
LazVersion=$(./get_lazarus_version.sh)
LazRelease='0' # $(echo $FPCRPM | sed -e 's/-/_/g')
Src=/tmp/lazarus-$LazVersion-$LazRelease.tar.gz
TmpDir=/tmp/lazarus$LazVersion
DescFile=slacktgz/slack-desc
DepFile=slacktgz/slack-required
BuildRoot=/tmp/lazaruspackage/
SrcDir="$TmpDir/lazarus"
Where=`pwd`
# download lazarus svn if needed
echo "creating lazarus tgz ..."
./create_lazarus_export_tgz.sh $Src
mkdir -p $TmpDir
cd $TmpDir
tar zxvf $Src
cd $Where
# create a slack-desc file
echo "creating lazarus slack metadata files ..."
echo "fpc >= $FPCVER" > $DepFile
echo "fpcsrc >= $FPCVER" >> $DepFile
# build slacktgz
echo "building slackware tgz package ..."
if [ -d $BuildRoot ] ; then
rm -fr $BuildRoot
fi
mkdir $BuildRoot
mkdir -p $BuildRoot/install
cp $DepFile $BuildRoot/install/
cp $DescFile $BuildRoot/install/
./slacktgz/build.sh $SrcDir
cd $BuildRoot
mkdir -p $BuildRoot/usr/lib/lazarus
mkdir -p $BuildRoot/usr/bin
mkdir -p $BuildRoot/usr/share/pixmaps
mkdir -p $BuildRoot/usr/share/applications
mkdir -p $BuildRoot/usr/man/man1
cp -arf $SrcDir/* $BuildRoot/usr/lib/lazarus/
cp $SrcDir/images/ide_icon48x48.png $BuildRoot/usr/share/pixmaps/lazarus.png
cp $SrcDir/install/lazarus.desktop $BuildRoot/usr/share/applications/lazarus.desktop
ln -sf /usr/lib/lazarus/lazarus usr/bin/lazarus
ln -sf /usr/lib/lazarus/startlazarus usr/bin/startlazarus
ln -sf /usr/lib/lazarus/lazbuild usr/bin/lazbuild
cat $SrcDir/docs/lazbuild.1 | gzip > $BuildRoot/usr/man/man1/lazbuild.1.gz
/sbin/makepkg -l y -c y /tmp/lazarus-$LazVersion-i486-$LazRelease.tgz
cd
#Clean up
rm -fr $BuildRoot $TmpDir
echo "The new slackware tgz can be found at: /tmp/lazarus-$LazVersion-i486-$LazRelease.tgz"
echo "A source package is has been created at: $Src"
# end.

17
tools/install/slacktgz/build.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
cd $1
if [ -n "$FPCCfg" ]; then
MAKEOPTS=" -n @$FPCCfg"
fi
make
make bigide OPT="$MAKEOPTS" USESVN2REVISIONINC=0
make tools OPT="$MAKEOPTS"
make lazbuilder OPT="$MAKEOPTS"
# build gtk2 .ppu
export LCL_PLATFORM=gtk2
make lcl ideintf packager/registration bigidecomponents OPT="$MAKEOPTS"
export LCL_PLATFORM=
strip lazarus
strip startlazarus
strip lazbuild

View File

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in. You must make
# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
lazarus: Object-Pascal RAD tool
lazarus:
lazarus: Lazarus is a free and open source Rapid Application
lazarus: Development tool for the FreePascal compiler
lazarus: using the Lazarus component library - LCL.
lazarus: The LCL is included in this package.
lazarus:
lazarus: Package created by: A.J. Venter(aj@getopenlab.com)
lazarus:
lazarus:
lazarus: