Commit b4ac0f43 authored by Dirk Wilden's avatar Dirk Wilden

debian packaging script

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5527 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e7f50da0
Package: OpenFlipper
Version: 1.0
Section: graphics
Priority: optional
Architecture: all
Essential: no
Depends: freeglut3 , libftgl2 , libqt4-opengl ( >= 4.4), libqt4-webkit ( >= 4.4), libqt4-network ( >= 4.4), libqt4-script ( >= 4.4), libqt4-sql-sqlite ( >= 4.4), libqt4-help ( >= 4.4), libqt4-gui ( >= 4.4)
Recommends:
Suggests:
Installed-Size:
Maintainer: RWTH Graphics Group
Conflicts:
Replaces:
Provides: OpenFlipper
Description: OpenFlipper - Geometric Modeling Framework
OpenFlipper is an OpenSource multi-platform application and programming framework designed for processing, modeling and rendering of geometric data.
#!/bin/bash
architecture=`uname -a`;
echo $architecture;
if [[ $architecture == *x86_64* ]]
then
ln -s /usr/share/OpenFlipper/Debian_64_Release/OpenFlipper /usr/bin/OpenFlipper
else
ln -s /usr/share/OpenFlipper/Debian_32_Release/OpenFlipper /usr/bin/OpenFlipper
fi
#!/bin/bash
if [[ -e /usr/bin/OpenFlipper ]]; then
rm -f /usr/bin/OpenFlipper
fi
\ No newline at end of file
#!/bin/bash
# Absolute path to the script
SCRIPT=$(readlink -f $0);
# Absolute path of the directory
SCRIPTPATH=`dirname $SCRIPT`"/";
base=$SCRIPTPATH"../../";
ACG=$base"ACG/lib/";
OpenMeshCore=$base"OpenMesh/Core/lib/";
OpenMeshTools=$base"OpenMesh/Tools/lib/";
OpenFlipper=$base"OpenFlipper/";
PluginLib=$OpenFlipper"PluginLib/lib/";
Icons=$OpenFlipper"Icons/*.png";
Plugins=$OpenFlipper"Plugins/Linux/";
shareBase=$SCRIPTPATH"tmp/usr/share/OpenFlipper/";
shareIcons=$shareBase"Icons";
sharePlugins=$shareBase"Plugins/Linux/";
for Architecture in "32" "64"; do
Arch="Debian_"${Architecture}"_Release/";
#check if the architecture was build
if [[ ! -e ${OpenFlipper}${Arch}"OpenFlipper"\
|| ! -e ${ACG}${Arch}"libACG.so.1"\
|| ! -e ${OpenMeshCore}${Arch}"libCore.so.1"\
|| ! -e ${OpenMeshTools}${Arch}"libTools.so.1"\
|| ! -e ${PluginLib}${Arch}"libPluginLib.so.1.0.0" ]]; then
continue;
fi
echo "Found Architecture: "${Architecture}"-Bit";
allArch=${allArch}" "${Architecture};
#copy Libs/Binary
mkdir -p ${shareBase}${Arch}
cp -f ${OpenFlipper}${Arch}"OpenFlipper" ${shareBase}${Arch};
cp -f ${ACG}${Arch}"libACG.so.1" ${shareBase}${Arch};
cp -f ${OpenMeshCore}${Arch}"libCore.so.1" ${shareBase}${Arch};
cp -f ${OpenMeshTools}${Arch}"libTools.so.1" ${shareBase}${Arch};
cp -f ${PluginLib}${Arch}"libPluginLib.so.1" ${shareBase}${Arch};
#copy Plugins
mkdir -p $sharePlugins$Architecture"/Release/";
cp -f ${Plugins}${Architecture}/Release/*.so $sharePlugins$Architecture"/Release/";
done
#check which architectures we have copied
if [[ $allArch == *32* && $allArch == *64* ]]; then
Architecture="all";
elif [[ $allArch == *32* ]]; then
Architecture="i386";
elif [[ $allArch == *64* ]]; then
Architecture="amd64";
else
#abort
rm -rf tmp;
exit;
fi
#copy Icons
mkdir -p $shareIcons;
cp -f $Icons $shareIcons;
#copy config files
cp -rf $SCRIPTPATH"DEBIAN" $SCRIPTPATH"/tmp/DEBIAN";
mkdir -p $SCRIPTPATH"/tmp/usr/share/applications/";
cp -f $SCRIPTPATH"OpenFlipper.desktop" $SCRIPTPATH"/tmp/usr/share/applications/";
#modify architecture/size in config file
sed -i 's/Architecture: all/Architecture: '${Architecture}'/g' $SCRIPTPATH"/tmp/DEBIAN/control"
Size=`du -s tmp|tr -d ' tmp/'`;
echo "Project Size: "$Size;
sed -i "s/Installed-Size:/Installed-Size: $Size/g" $SCRIPTPATH"/tmp/DEBIAN/control"
#build the package
dpkg -b tmp OpenFlipper-1.0_${Architecture}.deb
#remove temp files
rm -rf tmp;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment