# Compiling Time: 5.03 SBU # Maintainer: dex77 USE_JAVA=${USE_JAVA:-"y"} USE_ODBC=${USE_ODBC:-"y"} pkgname=erlang pkgver=24.0 pkgrel=1 pkgdesc="A programming language designed at the Ericsson Computer Science Laboratory." url="http://www.erlang.org/" depends=('openssl>=1.1.1' 'ncurses>=6.0-3') makedepends=('fop') Fuse $USE_JAVA && makedepends=($makedependes 'openjdk') Fuse $USE_ODBC && makedepends=($makedependes 'unixodbc') groups=('devel-extra') archs=('x86_64') _F_archive_name="otp_src" Fpkgversep="_" _F_archive_prefix="R" up2date="Flasttar http://www.erlang.org/download.html" source=(http://www.erlang.org/download/otp_src_${pkgver/_/-}.tar.gz \ http://www.erlang.org/download/otp_doc_html_${pkgver/_/-}.tar.gz \ http://www.erlang.org/download/otp_doc_man_${pkgver/_/-}.tar.gz) sha1sums=('615af97fdb2a4c7a798cf30f17547c501c8b8878' \ 'ea2fe2a98c8e1d9dd361d73ca3b0fb6bdacda8d3' \ '958c04a51787e8f2290c4e768dccaaa020489bdd') replaces=('wxerlang') Fconfopts=" --prefix=/usr" if Fuse $USE_ODBC; then subpkgs=('erlang-odbc') subdescs=('The Erlang ODBC application.') subdepends=('') subrodepends=("$pkgname=$pkgver") subgroups=('devel-extra') subarchs=("x86_64") fi build() { Fcd otp_src_${pkgver} Fbuild ertsver=`sed -n '/^VSN/s/.*= //p' erts/vsn.mk` interfacever=`sed -n '/^EI_VSN/s/.*= //p' lib/erl_interface/vsn.mk` # remove references to Fdestdir Fsed "$Fdestdir" "" $Fdestdir/usr/lib/erlang/bin/erl Fsed "$Fdestdir" "" $Fdestdir/usr/lib/erlang/bin/start grep -rle "$Fdestdir" $Fdestdir//usr/lib/erlang/erts-$ertsver | xargs sed -i -e "s|$Fdestdir||g" # create symlinks to /usr Fmkdir /usr/bin Fln /usr/lib/erlang/bin/erl /usr/bin/erl Fln /usr/lib/erlang/bin/erlc /usr/bin/erlc Fln /usr/lib/erlang/bin/escript /usr/bin/escript Fln /usr/lib/erlang/lib/erl_interface-$interfacever/bin/erl_call /usr/bin/erl_call Fln /usr/lib/erlang/erts-$ertsver/bin/beam /usr/bin/beam # man pages Fexec cd $Fsrcdir local i j for i in man/man* ; do Fmkdir /usr/share/${i}erl done for j in man/man*/*.[1-9]; do # avoid namespace collisions Fexec mv $j ${j}erl Ffilerel ${j}erl /usr/share/man/man${j##*.}erl/ done # html doc Fexec mkdir html Fexec cd html Fextract $Fsrcdir/otp_doc_html_${pkgver/_/-}.tar.gz Fexec cd .. Fmkdir /usr/share/doc/$pkgname-$pkgver Fcp html /usr/share/doc/$pkgname-$pkgver/html if Fuse $USE_ODBC; then Fsplit erlang-odbc usr/lib/erlang/lib/odbc-* fi } # optimization OK