aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/yaws/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'unmaintained/yaws/APKBUILD')
-rw-r--r--unmaintained/yaws/APKBUILD89
1 files changed, 89 insertions, 0 deletions
diff --git a/unmaintained/yaws/APKBUILD b/unmaintained/yaws/APKBUILD
new file mode 100644
index 0000000000..8e92ba33f6
--- /dev/null
+++ b/unmaintained/yaws/APKBUILD
@@ -0,0 +1,89 @@
+# Contributor: Vitaliy Tokarev <vitaliy.tokarev@gmail.com>
+# Maintainer:
+pkgname=yaws
+pkgver=1.97
+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"
+
+_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="7a835c3b80b1158b54695591ed2d0864 yaws-1.97.tar.gz
+3a1445696bd25ae71631d13457980693 yaws.initd
+2b71d01e0837aff6798e602c74ae6a2c yaws.conf.alpine"
+sha256sums="a792478564866393f3e901bf4ec33272c22d7c01a8c5493b33856729d25b026e yaws-1.97.tar.gz
+313ce8cacd25e8eed5717dfd9e79d1683a4038a64cffff6e93aacfd2fb11c261 yaws.initd
+ebff598ac47a0185a81ca5fb45b1c843b184390d85c630686aa2579b6d51e3af yaws.conf.alpine"
+sha512sums="b91fa598ea91a190e341dda35f7bc0ee468454fd5eb6bf7cbae722c59816e6b6da81a08aea5f2f6fa49fafaeccd42c85025ed21be9f208c4e2b73b624586db12 yaws-1.97.tar.gz
+07ff290eb98be729445d797361503d01dfba29f050639632d251202267aa485655fd04798f4de8d66a83bb0a798280116f8b06d5b9e8810d3cb2d20c1c1bd1d6 yaws.initd
+7f4bf1a099337cf53a2492cc2e295108adcb9ab26b27089303429542c5097ed357623f6d448c5b0b9c9e4d0e8517350ab9d8bf1b6d51a529c45b264f810c688d yaws.conf.alpine"