updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / scicoslab-bin / PKGBUILD
blob6b4cd3a06aa6a1aa04c0b05483c7e70a44dc3439
1 # Maintainer: Holger Nahrstaedt
3 pkgname=scicoslab-bin
4 pkgver=4.4.1
5 pkgrel=1
6 pkgdesc="ScicosLab is a Gtk+ version of Scilab, based on the official Scilab BUILD4 distribution. It contains the newest Scicos."
7 arch=('i686' 'x86_64')
8 url="http://www.scicoslab.org/"
9 provides=('scicoslab=$pkgver')
10 conflicts=('scicoslab')
11 depends=('bash' 'tk' 'gcc-libs' 'libxml2' 'vte' 'libgtkhtml' 'libwebkit')
12 makedepends=('deb2targz')
13 license=('custom')
14 if [ "${CARCH}" = 'i686' ]; then
15   filerev=2
16   source=("http://cermics.enpc.fr/~jpc/scilab-gtk-tiddly/files/scicoslab-gtk_${pkgver}-${filerev}_i386.natty.deb")
17   md5sums=(f1a316697f5d1c32614b8765ca1b5fb9)
18 elif [ "${CARCH}" = 'x86_64' ]; then
19   filerev=1
20   source=("http://cermics.enpc.fr/~jpc/scilab-gtk-tiddly/files/scicoslab-gtk_${pkgver}-${filerev}_amd64.natty.deb")
21   md5sums=(6178b273c19e55ffb088bfc1b9dff352)
22 else
23   error Unknown architecture.
24   exit 1
28 build() {
29 cd ${srcdir}
30 if [ "${CARCH}" = 'i686' ]; then
31   deb2targz scicoslab-gtk_${pkgver}-${filerev}_i386.natty.deb
32   tar xvzf scicoslab-gtk_${pkgver}-${filerev}_i386.natty.tar.gz
33 elif [ "${CARCH}" = 'x86_64' ]; then
34   deb2targz scicoslab-gtk_${pkgver}-${filerev}_amd64.natty.deb
35   tar xvzf  scicoslab-gtk_${pkgver}-${filerev}_amd64.natty.tar.gz
36 else
37   error Unknown architecture.
38   exit 1
40 cp -r usr/ ${pkgdir}
41 rm -rf ${pkgdir}/usr/bin
42 rm -rf ${pkgdir}/usr/share/menu
44 mv ${pkgdir}/usr/lib/scicoslab-gtk-${pkgver} ${pkgdir}/usr/share
45 rm -rf ${pkgdir}/usr/lib
47 rm ${pkgdir}/usr/share/applications/scicoslab.desktop
48 cp ${pkgdir}/usr/share/scicoslab-gtk-${pkgver}/config/scicoslab-deb.desktop ${pkgdir}/usr/share/applications/scicoslab.desktop
51 cd ${pkgdir}/usr/share/scicoslab-gtk-${pkgver}/
52 sed -i s_/usr/lib/scicoslab-gtk-${pkgver}_/usr/share/scicoslab-gtk-${pkgver}_g Path.incl
53 sed -i s_/usr/lib/scicoslab-gtk-${pkgver}_/usr/share/scicoslab-gtk-${pkgver}_g ./bin/BEpsf
54 sed -i s_/usr/lib/scicoslab-gtk-${pkgver}_/usr/share/scicoslab-gtk-${pkgver}_g ./bin/Blatexpr
55 sed -i s_/usr/lib/scicoslab-gtk-${pkgver}_/usr/share/scicoslab-gtk-${pkgver}_g ./bin/Blatexpr2
56 sed -i s_/usr/lib/scicoslab-gtk-${pkgver}_/usr/share/scicoslab-gtk-${pkgver}_g ./bin/Blatexprs
57 sed -i s_/usr/lib/scicoslab-gtk-${pkgver}_/usr/share/scicoslab-gtk-${pkgver}_g ./bin/Blpr
58 sed -i s_/usr/lib/scicoslab-gtk-${pkgver}_/usr/share/scicoslab-gtk-${pkgver}_g ./bin/scilab
59 cd ${pkgdir}/usr/share/
60 sed -i s_/usr/lib/scicoslab-gtk-${pkgver}_/usr/share/scicoslab-gtk-${pkgver}_g ./applications/scicoslab.desktop
62 install -d $startdir/pkg/usr/bin/
63 ln -fs /usr/share/scicoslab-gtk-${pkgver}/bin/scilab $startdir/pkg/usr/bin/scicoslab
64 ln -fs /usr/share/scicoslab-gtk-${pkgver}/bin/scilab $startdir/pkg/usr/bin/scilab-${pkgver}
66 install -d $startdir/pkg/usr/lib/
67 cd $startdir/pkg/usr/lib/
68 ln -fs libtk8.5.so libtk8.5.so.0
69 ln -fs libtcl8.5.so libtcl8.5.so.0
70 #ln -fs libreadline.so.6 libreadline.so.5