summaryrefslogtreecommitdiffstats
path: root/testing/erlang/APKBUILD
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-03-25 08:44:47 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-03-25 08:47:05 +0000
commita0b5881961a7f7aadcb704fa2018bd726bfdefa9 (patch)
tree783399a84ba0a471bed20683abd690d136bb6bf5 /testing/erlang/APKBUILD
parentc493818e479a519e773a1e7bdf186489970386a3 (diff)
downloadaports-a0b5881961a7f7aadcb704fa2018bd726bfdefa9.tar.bz2
aports-a0b5881961a7f7aadcb704fa2018bd726bfdefa9.tar.xz
testing/erlang: new aport
General-purpose programming language and runtime environment http://www.erlang.org/
Diffstat (limited to 'testing/erlang/APKBUILD')
-rw-r--r--testing/erlang/APKBUILD70
1 files changed, 70 insertions, 0 deletions
diff --git a/testing/erlang/APKBUILD b/testing/erlang/APKBUILD
new file mode 100644
index 000000000..d25ebdf1e
--- /dev/null
+++ b/testing/erlang/APKBUILD
@@ -0,0 +1,70 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Michael Mason <ms13sp@gmail.com>
+
+# TODO: create subpackages
+# Check how fedora does it:
+# http://pkgs.fedoraproject.org/gitweb/?p=erlang.git;a=blob;f=erlang.spec
+
+pkgname=erlang
+pkgver=14.2.02
+# note: versioning scheme is weird. the .2. -> B
+# needs to be updated manually
+_ver=${pkgver%%.*}B${pkgver##*.}
+pkgrel=0
+pkgdesc="General-purpose programming language and runtime environment"
+url="http://www.erlang.org/"
+license="ERPL"
+arch="all"
+depends=
+makedepends="perl-dev zlib-dev ncurses-dev openssl-dev"
+install=
+subpackages="$pkgname-dev"
+
+# patch found: http://pkgs.fedoraproject.org/gitweb/?p=erlang.git;a=tree
+source="http://www.erlang.org/download/otp_src_R$_ver.tar.gz
+ otp-0004-Do-not-install-C-sources.patch"
+
+_builddir="$srcdir"/otp_src_R$_ver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ # remove shipped zlib sources
+ rm -f erts/emulator/zlib/*.[ch]
+
+ # Fix 664 file mode
+ chmod 644 lib/kernel/examples/uds_dist/c_src/Makefile
+ chmod 644 lib/kernel/examples/uds_dist/src/Makefile
+ chmod 644 lib/ssl/examples/certs/Makefile
+ chmod 644 lib/ssl/examples/src/Makefile
+
+ # Remove old txt files
+ rm -f lib/ssl/examples/certs/etc/otpCA/index.txt.old
+ rm -f lib/ssl/examples/certs/etc/erlangCA/index.txt.old
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --enable-threads \
+ --enable-shared-zlib \
+ --enable-ssl=dynamic-ssl-lib \
+ || return 1
+ make -j1 || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install
+}
+
+md5sums="229fb8f193b09ac04a57a9d7794349b7 otp_src_R14B02.tar.gz
+e7e4b43883e5fc860bf18701850512b1 otp-0004-Do-not-install-C-sources.patch"