# $Id: PKGBUILD 36746 2009-04-27 06:32:38Z vesa $ # Contributor: Sarah Hay # Maintainer: Vesa Kaihlavirta pkgname=erlang pkgver=R13B pkgrel=2 pkgdesc="A small concurrent functional programming language developed by Ericsson." arch=(i686 x86_64) options=('!makeflags') depends=('ncurses' 'glibc') license=('custom') makedepends=('java-environment' 'perl' 'openssl') source=(http://www.erlang.org/download/otp_src_${pkgver/./-}.tar.gz http://www.erlang.org/download/otp_doc_man_${pkgver/./-}.tar.gz) md5sums=('6d8c256468a198458b9f08ba6aa1a384' '9265ebf3b1041be6ae18e323b0933601') url="http://www.erlang.org/index.html" build() { cd $startdir/src/otp_src_${pkgver/./-} ERTSVERSION=$(sed -n 's/^VSN[ ]*=[ ]*\([0-9.]\)/\1/p' < erts/vsn.mk) sed -i '/SSL_DYNAMIC_ONLY=/s:no:yes:' erts/configure || return 1 CFLAGS="${CFLAGS} -fno-strict-aliasing" ./configure --prefix=/usr --enable-smp-support --enable-threads make || return 1 make INSTALL_PREFIX=$startdir/pkg install || return 1 # fix prefix cd $startdir/pkg for i in usr/lib/erlang/bin/erl \ usr/lib/erlang/bin/start \ usr/lib/erlang/erts-${ERTSVERSION}/bin/erl \ usr/lib/erlang/erts-${ERTSVERSION}/bin/start \ usr/lib/erlang/releases/RELEASES ;do sed -i "s#$startdir/pkg##" $i done # fix symlinks cd $startdir/pkg/usr/lib/erlang/bin ln -sf ../erts-${ERTSVERSION}/bin/epmd cd $startdir/pkg/usr/bin for file in *; do ln -sfv ../lib/erlang/bin/$file || return 1 done # install documentation cp -r $startdir/src/{COPYRIGHT,PR.template,README,man} $startdir/pkg/usr/lib/erlang install -Dm644 $startdir/src/otp_src_${pkgver/./-}/EPLICENCE $startdir/pkg/usr/share/licenses/$pkgname/EPLICENCE }