Added Ubuntu-18 for the build targets in makedeb.sh

This commit is contained in:
Matthias Koefferlein 2018-06-29 07:19:21 +02:00
parent 5f8b258235
commit 184ae965e6
1 changed files with 47 additions and 26 deletions

View File

@ -19,7 +19,10 @@ fi
# TODO: derive this list automatically?
case $target in
ubuntu16)
depends="libqt4-designer (>= 4.8.6), libqt4-xml (>= 4.8.6), libqt4-sql (>= 4.8.6), libqt4-network (>= 4.8.6), libqtcore4 (>= 4.8.6), libqtgui4 (>= 4.8.6), zlib1g (>= 1.2.8), libruby2.3 (>= 2.3.1), libpython3.5 (>= 3.5.1), libstdc++6 (>= 4.6.3), libc6 (>= 2.15)"
depends="libqt4-designer (>= 4.8.6), libqt4-xml (>= 4.8.6), libqt4-sql (>= 4.8.6), libqt4-network (>= 4.8.6), libqtcore4 (>= 4.8.6), libqtgui4 (>= 4.8.6), zlib1g (>= 1.2.8), libruby2.3 (>= 2.3.1), python3 (>= 3.5.1), libpython3.5 (>= 3.5.1), libstdc++6 (>= 4.6.3), libc6 (>= 2.15)"
;;
ubuntu18)
depends="libqt4-designer (>= 4.8.7), libqt4-xml (>= 4.8.7), libqt4-sql (>= 4.8.7), libqt4-network (>= 4.8.7), libqtcore4 (>= 4.8.7), libqtgui4 (>= 4.8.7), zlib1g (>= 1.2.11), libruby2.5 (>= 2.5.1), python3 (>= 3.6.5), libpython3.6 (>= 3.6.5), libstdc++6 (>= 8), libc6 (>= 2.27)"
;;
*)
echo "Unknown target '$target' (given as first argument)"
@ -39,14 +42,21 @@ umask 0022
echo "Checking $bits installation"
echo "----------------------------------------"
bindir="bin.linux.release"
bininstdir="bin.linux.release"
builddir="build.linux.release"
libdir="/usr/lib/klayout"
./build.sh -j4 \
-bin $bindir \
# destination folders
sharedir="usr/share"
bindir="usr/bin"
libdir="usr/lib/klayout"
# TODO: is there a better way to produce this path?
pylibdir="usr/lib/python3/dist-packages/klayout"
./build.sh -j2 \
-bin $bininstdir \
-build $builddir \
-rpath $libdir
-rpath /$libdir
if [ "$bits" = "32" ]; then
arch="i386"
@ -72,44 +82,54 @@ tar xf data.tar
rm data.tar
cd ..
mkdir -p makedeb-tmp/usr/share/doc/klayout
mkdir -p makedeb-tmp/usr/share/applications
mkdir -p makedeb-tmp/usr/share/pixmaps
mkdir -p makedeb-tmp/usr/lib/klayout
mkdir -p makedeb-tmp/usr/bin
mkdir -p makedeb-tmp/${sharedir}/doc/klayout
mkdir -p makedeb-tmp/${sharedir}/applications
mkdir -p makedeb-tmp/${sharedir}/pixmaps
mkdir -p makedeb-tmp/${libdir}/db_plugins
mkdir -p makedeb-tmp/${libdir}/lay_plugins
mkdir -p makedeb-tmp/${pylibdir}
mkdir -p makedeb-tmp/${bindir}
cp etc/klayout.desktop makedeb-tmp/usr/share/applications
cp etc/logo.png makedeb-tmp/usr/share/pixmaps
cp Changelog makedeb-tmp/usr/share/doc/klayout/changelog
cp Changelog.Debian makedeb-tmp/usr/share/doc/klayout/changelog.Debian
cp COPYRIGHT makedeb-tmp/usr/share/doc/klayout/copyright
cp etc/klayout.desktop makedeb-tmp/${sharedir}/applications
cp etc/logo.png makedeb-tmp/${sharedir}/pixmaps
cp Changelog makedeb-tmp/${sharedir}/doc/klayout/changelog
cp Changelog.Debian makedeb-tmp/${sharedir}/doc/klayout/changelog.Debian
cp COPYRIGHT makedeb-tmp/${sharedir}/doc/klayout/copyright
cp -pd $bindir/strm* makedeb-tmp/usr/bin
cp -pd $bindir/klayout makedeb-tmp/usr/bin
cp -pd $bindir/lib*so* makedeb-tmp/usr/lib/klayout
cp -pd $bininstdir/strm* makedeb-tmp/${bindir}
cp -pd $bininstdir/klayout makedeb-tmp/${bindir}
cp -pd $bininstdir/lib*so* makedeb-tmp/${libdir}
cp -pd $bininstdir/db_plugins/lib*so* makedeb-tmp/${libdir}/db_plugins
cp -pd $bininstdir/lay_plugins/lib*so* makedeb-tmp/${libdir}/lay_plugins
cp -pd $bininstdir/pymod/klayout/*so makedeb-tmp/${pylibdir}
cp -pd $bininstdir/pymod/klayout/*py makedeb-tmp/${pylibdir}
cd makedeb-tmp
echo "Checking files .."
grep -q $version usr/share/doc/klayout/copyright || (
grep -q $version ${sharedir}/doc/klayout/copyright || (
echo "*** ERROR: version $version not found in copyright file"
exit 1
)
grep -q $version usr/share/doc/klayout/changelog || (
grep -q $version ${sharedir}/doc/klayout/changelog || (
echo "*** ERROR: version $version not found in changelog file"
exit 1
)
grep -q $version usr/share/doc/klayout/changelog.Debian || (
grep -q $version ${sharedir}/doc/klayout/changelog.Debian || (
echo "*** ERROR: version $version not found in changelog.Debian file"
exit 1
)
echo "Modifying control file .."
strip usr/bin/*
strip ${bindir}/*
strip ${libdir}/*.so*
strip ${pylibdir}/*.so
strip ${libdir}/db_plugins/*.so*
strip ${libdir}/lay_plugins/*.so*
size=`du -ck usr | grep total | sed "s/ *total//"`
@ -120,11 +140,12 @@ cat control
echo "Building .deb package .."
gzip -n --best usr/share/doc/klayout/changelog
gzip -n --best usr/share/doc/klayout/changelog.Debian
gzip -n --best ${sharedir}/doc/klayout/changelog
gzip -n --best ${sharedir}/doc/klayout/changelog.Debian
# lintian complains about exec bits set
find ./usr -name "lib*.so.*" -exec chmod 644 "{}" ";"
find ./usr -name "*.so.*" -exec chmod 644 "{}" ";"
find ./usr -name "*.so" -exec chmod 644 "{}" ";"
find ./usr -type f -exec md5sum "{}" ";" >md5sums
chmod 644 md5sums