# $Id: PKGBUILD 85255 2013-02-28 10:10:52Z arodseth $ # Maintainer: Lukas Fleischer # Maintainer: Alexander Rødseth # Contributor: Vesa Kaihlavirta # Contributor: Sarah Hay # Contributor: Tom Burdick # Contributor: Ricardo Catalinas Jiménez pkgbase=erlang pkgname=('erlang' 'erlang-unixodbc') pkgver=R16B pkgrel=1 arch=('x86_64' 'i686' 'mips64el') url='http://www.erlang.org/' license=('custom') makedepends=('perl' 'mesa' 'lksctp-tools' 'unixodbc') source=("http://www.erlang.org/download/otp_src_${pkgver/_/-}.tar.gz" "http://www.erlang.org/download/otp_doc_man_${pkgver/_/-}.tar.gz") sha256sums=('f01c2cfe512d3118fd3398a66bdb82bea6ad0f45b464a46a58e452264b7682cd' 'f7b1baa088d4ecda4a86944d3a782fcbf80c6b9161756bb50fec9e8d129176b9') build() { cd "$srcdir/otp_src_${pkgver/_1/}" ./configure --prefix=/usr --enable-smp-support --with-odbc make } package_erlang() { pkgdesc='General-purpose concurrent functional programming language developed by Ericsson' depends=('ncurses' 'glu' 'wxgtk' 'openssl') optdepends=('erlang-unixodbc: database support' 'java-environment: for Java support' 'lksctp-tools: for SCTP support') cd "$srcdir/otp_src_${pkgver/_1/}" make DESTDIR="$pkgdir" install # Documentation install -d "$pkgdir/usr/share/doc/erlang" install -m0644 "$srcdir/otp_src_${pkgver/_1/}/README.md" \ "$srcdir"/{README,COPYRIGHT} \ "$pkgdir/usr/share/doc/erlang" # Compressed man pages for page in "$srcdir/man/man?/*"; do gzip $page; done cp -r "$srcdir/man" "$pkgdir/usr/lib/erlang/" # License install -Dm0644 "$srcdir/otp_src_${pkgver/_1/}/EPLICENCE" \ "$pkgdir/usr/share/licenses/$pkgname/EPLICENCE" # Move over files that will be packaged as erlang-unixodbc mkdir "$srcdir/unixodbc" mv "$pkgdir/usr/lib/erlang/lib/odbc"* "$srcdir/unixodbc/" mv "$pkgdir/usr/lib/erlang/man/man3/odbc.3.gz" "$srcdir" } package_erlang-unixodbc() { pkgdesc='Unixodbc support for Erlang' depends=('unixodbc' 'erlang') # Get the files that should be packaged as erlang-unixodbc mkdir -p "$pkgdir/usr/lib/erlang/"{lib,man/man3} mv "$srcdir/unixodbc/"* "$pkgdir/usr/lib/erlang/lib/" mv "$srcdir/odbc.3.gz" "$pkgdir/usr/lib/erlang/man/man3/" # License install -Dm0644 "$srcdir/otp_src_${pkgver/_1/}/EPLICENCE" \ "$pkgdir/usr/share/licenses/$pkgname/EPLICENCE" } # vim:set ts=2 sw=2 et: