1 # Contributor: Nick Rudov <nrudov@gmail.com>
5 pkgdesc="Erlang Jabber Bot"
7 url="http://a7x-im.com/"
10 install=erl-bot.install
11 source=(http://a7x-im.com/download/$pkgname-aur-$pkgver.tar.gz)
12 md5sums=('e7a40027517255aec3bc954de349cefb')
17 cd $srcdir/erl-bot-aur-0.5.0/src/driver
18 gcc -g -O2 -Wall drv_tls.c -lssl -lcrypto -I /usr/include \
19 -L /usr/lib -L /usr/lib/erlang/lib/er*/lib -l erl_interface \
20 -lei -I /usr/lib/erlang/lib/er*/include -I /usr/lib/erlang/usr/include \
21 -o drv_tls.so -fpic -shared
22 gcc -g -O2 -Wall drv_zlib.c -lz -I /usr/include -L /usr/lib \
23 -L /usr/lib/erlang/lib/er*/lib -l erl_interface \
24 -lei -I /usr/lib/erlang/lib/er*/include -I /usr/lib/erlang/usr/include \
25 -o drv_zlib.so -fpic -shared
26 gcc -g -O2 -Wall drv_xml.c -lexpat -I /usr/include -L /usr/lib \
27 -L /usr/lib/erlang/lib/er*/lib -l erl_interface \
28 -lei -I /usr/lib/erlang/lib/er*/include -I /usr/lib/erlang/usr/include \
29 -o drv_xml.so -fpic -shared
33 cd $srcdir/erl-bot-aur-0.5.0/src/kernel
34 sed -i 's/"driver"/"\/usr\/share\/erl-bot\/driver"/g' xmpp_xml.erl
35 sed -i 's/"driver"/"\/usr\/share\/erl-bot\/driver"/g' xmpp_tls.erl
36 sed -i 's/"driver"/"\/usr\/share\/erl-bot\/driver"/g' xmpp_zlib.erl
40 cd $srcdir/erl-bot-aur-0.5.0/src/
41 mkdir -p $pkgdir/usr/share/erl-bot
42 cp -fr driver $startdir/pkg/usr/share/erl-bot/
43 cp -fr kernel $startdir/pkg/usr/share/erl-bot/
44 cd $srcdir/erl-bot-aur-0.5.0/src/etc/
45 mkdir -p $startdir/pkg/etc/erl-bot
46 cp -fr erl-bot $startdir/pkg/etc/
47 mkdir -p $pkgdir/var/spool
48 cd $srcdir/erl-bot-aur-0.5.0/src/var/spool
49 cp -fr erl-bot $startdir/pkg/var/spool/
50 cd $srcdir/erl-bot-aur-0.5.0/src/
51 mkdir -p $startdir/pkg/var/log/erl-bot
52 mkdir -p $startdir/pkg/bin/
53 sed -i 's/BIN_DIR=kernel/BIN_DIR=\/usr\/share\/erl-bot\/kernel/g' erl-bot
54 cp erl-bot $startdir/pkg/bin/ || return 1