mirror of https://github.com/KLayout/klayout.git
Updates of RPM and Debian packaging scripts.
This commit is contained in:
parent
bf03857dd1
commit
4ed31bf5ef
|
|
@ -7,5 +7,7 @@ Depends: %DEPENDS%
|
||||||
Section: contrib/misc
|
Section: contrib/misc
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Description: Chip mask layout review and edit utility
|
Description: Chip mask layout review and edit utility
|
||||||
Klayout is a graphical viewer for a.o. GDSII and CIF files.
|
Klayout is a graphical viewer and editor for a.o. GDSII, OASIS, CIF
|
||||||
Its features include net highlighting and XOR-ing of two layouts.
|
and other files.
|
||||||
|
Its features include net highlighting and XOR-ing of two layouts,
|
||||||
|
scripting capabilities in Ruby and Python and much more.
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Version=1.0
|
|
||||||
Name=Klayout, viewer and editor of mask layouts.
|
|
||||||
GenericName=layout viewer
|
|
||||||
Comment=Klayout is a viewer (and editor) of mask layout in a.o. GDSII and CIF format.
|
|
||||||
Exec=klayout
|
|
||||||
Icon=klayout
|
|
||||||
Type=Application
|
|
||||||
Categories=Development;Engineering;Electronics;
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 71 KiB |
|
|
@ -1,127 +1,148 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
# See blog.peterscholtens.net/?p=210
|
# Run this script with
|
||||||
#
|
#
|
||||||
# This scrips needs builds in:
|
# makedeb.sh <system>
|
||||||
# bin.linux-32-gcc-release (32 bit)
|
|
||||||
# and/or:
|
|
||||||
# bin.linux-64-gcc-release (64 bit)
|
|
||||||
#
|
#
|
||||||
# Create these builds with (-rpath and -bin are important):
|
# Currently system can be:
|
||||||
# ./build.sh -release -rpath /usr/lib/klayout -bin bin.linux-64-gcc-release -build build.linux-64-gcc-release
|
# ubuntu16 - Ubuntu 16.10LTS
|
||||||
# ./build.sh -release -rpath /usr/lib/klayout -bin bin.linux-32-gcc-release -build build.linux-32-gcc-release
|
# ...
|
||||||
#
|
|
||||||
# TODO:
|
|
||||||
# - The dependency list needs to be updated manually currently
|
target="$1"
|
||||||
|
|
||||||
if ! [ -e version.sh ]; then
|
if ! [ -e version.sh ]; then
|
||||||
echo "*** ERROR: no version information found (no version.sh). Call this script from the root directory."
|
echo "*** ERROR: no version information found (no version.sh). Call this script from the root directory."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# TODO: derive this list automatically?
|
||||||
|
case $target in
|
||||||
|
ubuntu16)
|
||||||
|
depends="libqt4-designer (>= 4.8.1), libqt4-xml (>= 4.8.1), libqt4-sql (>= 4.8.1), libqt4-network (>= 4.8.1), libqtcore4 (>= 4.8.1), libqtgui4 (>= 4.8.1), zlib1g (>= 1.2.3.4), libruby2.3 (>= 2.3.1), libpython2.7 (>= 2.7.12), libstdc++6 (>= 4.6.3), libc6 (>= 2.15)"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown target '$target' (given as first argument)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
. ./version.sh
|
. ./version.sh
|
||||||
|
|
||||||
version="$KLAYOUT_VERSION"
|
version="$KLAYOUT_VERSION"
|
||||||
exe_name="klayout"
|
exe_name="klayout"
|
||||||
|
bits=64
|
||||||
|
|
||||||
# TODO: derive this list automatically?
|
|
||||||
depends="libqt4-designer (>= 4.8.1), libqt4-xml (>= 4.8.1), libqt4-sql (>= 4.8.1), libqt4-network (>= 4.8.1), libqtcore4 (>= 4.8.1), libqtgui4 (>= 4.8.1), zlib1g (>= 1.2.3.4), libruby2.3 (>= 2.3.1), libpython2.7 (>= 2.7.12), libstdc++6 (>= 4.6.3), libc6 (>= 2.15)"
|
|
||||||
|
|
||||||
umask 0022
|
umask 0022
|
||||||
|
|
||||||
for bits in 32 64; do
|
echo "Checking $bits installation"
|
||||||
|
echo "----------------------------------------"
|
||||||
|
|
||||||
echo "Checking $bits installation"
|
bindir="bin.linux.release"
|
||||||
echo "----------------------------------------"
|
builddir="bin.linux.release"
|
||||||
|
libdir="/usr/lib/klayout"
|
||||||
|
|
||||||
if [ "$bits" = "32" ]; then
|
./build.sh -j4 \
|
||||||
arch="i386"
|
-bin $bindir \
|
||||||
bindir="bin.linux-32-gcc-release"
|
-build $builddir \
|
||||||
else
|
-rpath $libdir \
|
||||||
arch="amd64"
|
-without-qtbinding
|
||||||
bindir="bin.linux-64-gcc-release"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d $bindir ]; then
|
if [ "$bits" = "32" ]; then
|
||||||
|
arch="i386"
|
||||||
|
else
|
||||||
|
arch="amd64"
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf makedeb-tmp
|
rm -rf makedeb-tmp
|
||||||
mkdir makedeb-tmp
|
mkdir makedeb-tmp
|
||||||
|
|
||||||
pkgname=${exe_name}_${version}-1_$arch
|
pkgname=${exe_name}_${version}-1_$arch
|
||||||
|
|
||||||
echo "INFO: package name is $pkgname"
|
echo "INFO: package name is $pkgname"
|
||||||
|
|
||||||
echo "Copying files .."
|
echo "Copying files .."
|
||||||
cd scripts/deb-data
|
cd scripts/deb-data
|
||||||
tar --exclude=".svn" -cf data.tar *
|
tar --exclude=".svn" -cf data.tar *
|
||||||
mv data.tar ../..
|
mv data.tar ../..
|
||||||
cd ../..
|
cd ../..
|
||||||
cd makedeb-tmp
|
cd makedeb-tmp
|
||||||
mv ../data.tar .
|
mv ../data.tar .
|
||||||
tar xf data.tar
|
tar xf data.tar
|
||||||
rm data.tar
|
rm data.tar
|
||||||
cd ..
|
cd ..
|
||||||
cp -pd $bindir/strm* makedeb-tmp/usr/bin
|
|
||||||
cp -pd $bindir/klayout makedeb-tmp/usr/bin
|
|
||||||
cp -pd $bindir/lib* makedeb-tmp/usr/lib/klayout
|
|
||||||
|
|
||||||
cd makedeb-tmp
|
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
|
||||||
|
|
||||||
echo "Checking files .."
|
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
|
||||||
|
|
||||||
grep -q $version usr/share/doc/klayout/copyright || (
|
cp -pd $bindir/strm* makedeb-tmp/usr/bin
|
||||||
echo "*** ERROR: version $version not found in copyright file"
|
cp -pd $bindir/klayout makedeb-tmp/usr/bin
|
||||||
exit 1
|
cp -pd $bindir/lib*so* makedeb-tmp/usr/lib/klayout
|
||||||
)
|
|
||||||
|
|
||||||
grep -q $version usr/share/doc/klayout/changelog || (
|
cd makedeb-tmp
|
||||||
echo "*** ERROR: version $version not found in changelog file"
|
|
||||||
exit 1
|
|
||||||
)
|
|
||||||
|
|
||||||
grep -q $version usr/share/doc/klayout/changelog.Debian || (
|
echo "Checking files .."
|
||||||
echo "*** ERROR: version $version not found in changelog.Debian file"
|
|
||||||
exit 1
|
|
||||||
)
|
|
||||||
|
|
||||||
echo "Modifying control file .."
|
grep -q $version usr/share/doc/klayout/copyright || (
|
||||||
|
echo "*** ERROR: version $version not found in copyright file"
|
||||||
|
exit 1
|
||||||
|
)
|
||||||
|
|
||||||
strip usr/bin/*
|
grep -q $version usr/share/doc/klayout/changelog || (
|
||||||
|
echo "*** ERROR: version $version not found in changelog file"
|
||||||
|
exit 1
|
||||||
|
)
|
||||||
|
|
||||||
size=`du -ck usr | grep total | sed "s/ *total//"`
|
grep -q $version usr/share/doc/klayout/changelog.Debian || (
|
||||||
|
echo "*** ERROR: version $version not found in changelog.Debian file"
|
||||||
|
exit 1
|
||||||
|
)
|
||||||
|
|
||||||
mv control control.org
|
echo "Modifying control file .."
|
||||||
cat control.org | sed "s/%ARCH%/$arch/g" | sed "s/%VERSION%/$version/g" | sed "s/%SIZE%/$size/g" | sed "s/%DEPENDS%/$depends/g" >control
|
|
||||||
rm -f control.org
|
|
||||||
cat control
|
|
||||||
|
|
||||||
echo "Building .deb package .."
|
strip usr/bin/*
|
||||||
|
|
||||||
gzip -n --best usr/share/doc/klayout/changelog
|
size=`du -ck usr | grep total | sed "s/ *total//"`
|
||||||
gzip -n --best usr/share/doc/klayout/changelog.Debian
|
|
||||||
|
|
||||||
# lintian complains about exec bits set
|
mv control control.org
|
||||||
find ./usr -name "lib*.so.*" -exec chmod 644 "{}" ";"
|
cat control.org | sed "s/%ARCH%/$arch/g" | sed "s/%VERSION%/$version/g" | sed "s/%SIZE%/$size/g" | sed "s/%DEPENDS%/$depends/g" >control
|
||||||
|
rm -f control.org
|
||||||
|
cat control
|
||||||
|
|
||||||
find ./usr -type f -exec md5sum "{}" ";" >md5sums
|
echo "Building .deb package .."
|
||||||
chmod 644 md5sums
|
|
||||||
|
|
||||||
fakeroot tar -cvf data.tar ./usr
|
gzip -n --best usr/share/doc/klayout/changelog
|
||||||
gzip data.tar
|
gzip -n --best usr/share/doc/klayout/changelog.Debian
|
||||||
|
|
||||||
fakeroot tar -cvf control.tar control md5sums postinst postrm
|
# lintian complains about exec bits set
|
||||||
gzip control.tar
|
find ./usr -name "lib*.so.*" -exec chmod 644 "{}" ";"
|
||||||
|
|
||||||
fakeroot ar cr $pkgname.deb debian-binary control.tar.gz data.tar.gz
|
find ./usr -type f -exec md5sum "{}" ";" >md5sums
|
||||||
|
chmod 644 md5sums
|
||||||
|
|
||||||
echo "Finish making $pkgname.deb .."
|
fakeroot tar -cvf data.tar ./usr
|
||||||
mv $pkgname.deb ..
|
gzip data.tar
|
||||||
cd ..
|
|
||||||
rm -rf makedeb-tmp
|
|
||||||
|
|
||||||
echo "Running lintian $pkgname.deb .."
|
fakeroot tar -cvf control.tar control md5sums postinst postrm
|
||||||
lintian $pkgname.deb --suppress-tags binary-without-manpage --no-tag-display-limit
|
gzip control.tar
|
||||||
|
|
||||||
fi
|
fakeroot ar cr $pkgname.deb debian-binary control.tar.gz data.tar.gz
|
||||||
|
|
||||||
|
echo "Finish making $pkgname.deb .."
|
||||||
|
mv $pkgname.deb ..
|
||||||
|
cd ..
|
||||||
|
rm -rf makedeb-tmp
|
||||||
|
|
||||||
|
echo "Running lintian $pkgname.deb .."
|
||||||
|
lintian $pkgname.deb --suppress-tags binary-without-manpage --no-tag-display-limit
|
||||||
|
|
||||||
done
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ AutoReqProv: no
|
||||||
%if "%{target_system}" == "centos7"
|
%if "%{target_system}" == "centos7"
|
||||||
Requires: ruby >= 2.0.0
|
Requires: ruby >= 2.0.0
|
||||||
Requires: python >= 2.7.5
|
Requires: python >= 2.7.5
|
||||||
Requires: qt >= 4.8.5
|
Requires: qt >= 4.8.5
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if "%{target_system}" == "centos6"
|
%if "%{target_system}" == "centos6"
|
||||||
|
|
@ -43,6 +43,16 @@ Requires: qt >= 4.8.5
|
||||||
# ...
|
# ...
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if "%{target_system}" == "opensuse42_2"
|
||||||
|
# OpenSuSE 42.2 requirements
|
||||||
|
# ...
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{target_system}" == "opensuse42_3"
|
||||||
|
# OpenSuSE 42.3 requirements
|
||||||
|
# ...
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Mask layout viewer and editor for the chip design engineer.
|
Mask layout viewer and editor for the chip design engineer.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue