wok-stable view erlang/receipt @ rev 12461

fix symlinks (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Apr 28 10:39:50 2017 +0200 (2017-04-28)
parents 1c5686cd4004
children
line source
1 # SliTaz package receipt.
3 PACKAGE="erlang"
4 VERSION="R12B-5"
5 CATEGORY="development"
6 SHORT_DESC="Erlang programming language."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 SOURCE="otp_src"
9 TARBALL="${SOURCE}_$VERSION.tar.gz"
10 WEB_SITE="http://$PACKAGE.org/"
11 WGET_URL="${WEB_SITE}download/$TARBALL"
13 DEPENDS="ncurses openssl libunixODBC"
14 BUILD_DEPENDS="perl ncurses-dev openssl-dev unixODBC-dev icedtea6-jdk"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 patch=${SOURCE}_${VERSION}_OTP-7738.patch
20 export LANG=C
22 cd $src
23 if [ ! -f done.$patch ]; then
24 patch -p1 < $stuff/$patch || return 1
25 touch done.$patch
26 fi
27 sed -i 's|./Install|sh -x Install|' Makefile*
29 ./configure \
30 --prefix=/usr \
31 --sysconfdir=/etc \
32 --mandir=/usr/share/man \
33 --infodir=/usr/share/info \
34 $CONFIGURE_ARGS &&
35 make -j 1 &&
36 make -j 1 INSTALL_PREFIX=$DESTDIR install || return 1
38 for i in $DESTDIR/usr/lib/erlang/*/bin/erl $DESTDIR/usr/lib/erlang/bin/erl \
39 $DESTDIR/usr/lib/erlang/*/bin/start $DESTDIR/usr/lib/erlang/bin/start
40 do
41 sed -i 's|^ROOTDIR=.*$|ROOTDIR=/usr/lib/erlang|' $i
42 done
43 for file in $(ls $DESTDIR/usr/bin); do
44 ln -sf /usr/lib/erlang/bin/$file $DESTDIR/usr/bin/$file || return 1
45 done
46 }
48 # Rules to gen a SliTaz package suitable for Tazpkg.
49 genpkg_rules()
50 {
51 cp -a $_pkg/usr $fs
52 for i in $(cd $fs/usr/bin; ls *); do
53 rm -f $fs/usr/bin/$i
54 ln -s ../lib/erlang/bin/$i $fs/usr/bin/$i
55 done
56 }