blob: 6c8e8f04a6b015d0c82fc5bc5b75ffb27eed13c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaversions="5.1 5.2"
_defaultlua="5.2"
pkgname=haserl
pkgver=0.9.33
pkgrel=1
pkgdesc="Html And Shell Embedded Report Language"
url="http://haserl.sourceforge.net/"
arch="all"
license="GPL2"
depends=""
makedepends="automake autoconf"
subpackages="$pkgname-doc"
for _i in $_luaversions; do
depends="$depends haserl-lua$_i"
makedepends="$makedepends lua$_i-dev"
subpackages="$subpackages haserl-lua$_i:split_${_i/./_}"
done
options="suid"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
_sdir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_sdir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
sed -i -e 's/^ /\t/' src/Makefile.am || return 1
rm -f src/haserl_lualib.inc
aclocal && autoconf && autoheader && automake --add-missing || return 1
for _i in $_luaversions; do
cp -r "$_sdir" "$srcdir"/build-$_i
done
}
build() {
for _i in $_luaversions; do
cd "$srcdir"/build-$_i
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--with-lua=lua$_i \
|| return 1
make || return 1
done
}
package() {
for _i in $_luaversions; do
cd "$srcdir"/build-$_i
make DESTDIR="$pkgdir/" install || return 1
chmod 4111 "$pkgdir"/usr/bin/haserl
mv "$pkgdir"/usr/bin/haserl "$pkgdir"/usr/bin/haserl-lua$_i
done
ln -s haserl-lua$_defaultlua "$pkgdir"/usr/bin/haserl
}
_split() {
local d= _ver=$1
pkgdesc="Html And Shell Embedded Report Language with Lua $_ver support"
replaces="$pkgname"
depends=
if [ -f "$pkgdir"/usr/bin/haserl-lua$_ver ]; then
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/haserl-lua$_ver "$subpkgdir"/usr/bin/ || return 1
fi
}
for _i in $_luaversions; do
eval "split_${_i/./_}() { _split $_i; }"
done
md5sums="a9decddb508944d56f71dd2f821e2ec5 haserl-0.9.33.tar.gz"
sha256sums="9a65b14dc721643fc5b85c79117cb6d824bd3683b246744137bb5d978df7621b haserl-0.9.33.tar.gz"
sha512sums="8a285f43daee95a9dc8bbda1166323ab65ccad16ec13e61efaea0fbf88b1920d1af3e7efe7aade0025c8fd1368dcb5262b63f4848ab2fb7b0976ba8751d03886 haserl-0.9.33.tar.gz"
|