blob: 5e499ae6be71043e24ce91aeaaaa9270f1a22454 (
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
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# Contributor: Vitaliy Tokarev <vitaliy.tokarev@gmail.com>
# Maintainer:
pkgname=yaws
pkgver=1.98
pkgrel=0
pkgdesc="Yet Another Web Server, pure Erlang HTTP server/framework"
url="http://yaws.hyber.org/"
arch="all"
license="BSD"
depends="erlang linux-pam"
depends_dev="linux-pam-dev erlang-dev"
makedepends="$depends_dev perl"
options="!emptydirs"
install=""
subpackages="$pkgname-doc $pkgname-web"
source="http://yaws.hyber.org/download/$pkgname-$pkgver.tar.gz
yaws.initd
yaws.conf.alpine
yaws-1.96-etc.patch"
_builddir="$srcdir/$pkgname-$pkgver"
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
}
build() {
cd "$_builddir"
export ERLCFLAGS="-W"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
|| return 1
make || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
# XXX: from arch linux
install -d "$pkgdir/usr/lib/erlang/lib"
ln -s /usr/lib/yaws "$pkgdir/usr/lib/erlang/lib/$pkgname-$pkgver" \
|| return 1
# init.d
install -Dm755 "$srcdir/yaws.initd" "$pkgdir/etc/init.d/yaws" \
|| return 1
# License
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" \
|| return 1
# update config
# * basically change log dir to /var/log/yaws
# * on of <server localhost> definitions commented, because conflict
install -Dm644 "$srcdir"/yaws.conf.alpine "$pkgdir/etc/yaws/yaws.conf" \
|| return 1
install -d "$pkgdir"/var/log/yaws
}
web() {
arch="noarch"
depends="yaws"
pkgdesc="Yet Another Web Server, pure Erlang HTTP server/framework (examples)"
mkdir -p "$subpkgdir"/var
mv "$pkgdir"/var/yaws "$subpkgdir"/var/
# cleanup unnecessary Makefiles
find "$subpkgdir"/var/yaws/www -type f -name 'Makefile' \
-exec rm -f {} \;
}
md5sums="7c9231b7d9880033c9d3bfba2aa3c901 yaws-1.96.tar.gz
3a1445696bd25ae71631d13457980693 yaws.initd
2b71d01e0837aff6798e602c74ae6a2c yaws.conf.alpine
988d08b3501aa80d2f6ba5513f8a70af yaws-1.96-etc.patch"
sha256sums="8d4f16d18937335ac021ca4c65c8ee81dc4d71f133718c7148856cc6bf1f55e2 yaws-1.96.tar.gz
313ce8cacd25e8eed5717dfd9e79d1683a4038a64cffff6e93aacfd2fb11c261 yaws.initd
ebff598ac47a0185a81ca5fb45b1c843b184390d85c630686aa2579b6d51e3af yaws.conf.alpine
cc76022bd81302724ec169f14b6fa167fe66cc18b47e8990a25b4bca0406969c yaws-1.96-etc.patch"
sha512sums="821ffe530a265462df083a9408e1798616bf11f8c891955500f8de170f77de831defc65c2341d0552471dde253df16ae3d27d59eaa0ccd79b117f3070f49fb2c yaws-1.96.tar.gz
07ff290eb98be729445d797361503d01dfba29f050639632d251202267aa485655fd04798f4de8d66a83bb0a798280116f8b06d5b9e8810d3cb2d20c1c1bd1d6 yaws.initd
7f4bf1a099337cf53a2492cc2e295108adcb9ab26b27089303429542c5097ed357623f6d448c5b0b9c9e4d0e8517350ab9d8bf1b6d51a529c45b264f810c688d yaws.conf.alpine
b0b056c44d92eb2d1f7486f8113dc07be9a958b73a354dc993c210f4d53d6997e8b93e6c17d1eaeeb3e4899be3c337d9e7b953bd1bad40d63e851c5f5981fa2c yaws-1.96-etc.patch"
|