# SliTaz package receipt. PACKAGE="erlang" VERSION="R12B-5" CATEGORY="development" SHORT_DESC="Erlang programming language." MAINTAINER="pascal.bellard@slitaz.org" SOURCE="otp_src" TARBALL="${SOURCE}_$VERSION.tar.gz" WEB_SITE="http://$PACKAGE.org/" WGET_URL="${WEB_SITE}download/$TARBALL" DEPENDS="ncurses openssl libunixODBC" BUILD_DEPENDS="perl ncurses-dev openssl-dev unixODBC-dev icedtea6-jdk" # Rules to configure and make the package. compile_rules() { patch=${SOURCE}_${VERSION}_OTP-7738.patch export LANG=C cd $src if [ ! -f done.$patch ]; then patch -p1 < $stuff/$patch || return 1 touch done.$patch fi sed -i 's|./Install|sh -x Install|' Makefile* ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ $CONFIGURE_ARGS && make -j 1 && make -j 1 INSTALL_PREFIX=$DESTDIR install || return 1 for i in $DESTDIR/usr/lib/erlang/*/bin/erl $DESTDIR/usr/lib/erlang/bin/erl \ $DESTDIR/usr/lib/erlang/*/bin/start $DESTDIR/usr/lib/erlang/bin/start do sed -i 's|^ROOTDIR=.*$|ROOTDIR=/usr/lib/erlang|' $i done for file in $(ls $DESTDIR/usr/bin); do ln -sf /usr/lib/erlang/bin/$file $DESTDIR/usr/bin/$file || return 1 done } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { cp -a $_pkg/usr $fs for i in $(cd $fs/usr/bin; ls *); do rm -f $fs/usr/bin/$i ln -s ../lib/erlang/bin/$i $fs/usr/bin/$i done }