mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
new aport for yaws 1.96
Yaws is a HTTP high perfomance 1.1 webserver particularly well suited for dynamic-content web applications.
This commit is contained in:
parent
1f09918ab4
commit
bca2c1c2f0
66
testing/yaws/APKBUILD
Normal file
66
testing/yaws/APKBUILD
Normal file
@ -0,0 +1,66 @@
|
||||
# Contributor: Vitaliy Tokarev <vitaliy.tokarev@gmail.com>
|
||||
# Maintainer:
|
||||
pkgname=yaws
|
||||
pkgver=1.96
|
||||
pkgrel=0
|
||||
pkgdesc="Yet Another Web Server, pure Erlang HTTP server/framework"
|
||||
url="http://yaws.hyber.org/"
|
||||
arch="all"
|
||||
license="BSD"
|
||||
depends=""
|
||||
depends_dev="linux-pam-dev erlang"
|
||||
makedepends="$depends_dev"
|
||||
options="!emptydirs"
|
||||
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.post-deinstall"
|
||||
subpackages="$pkgname-doc $pkgname-web"
|
||||
source="http://yaws.hyber.org/download/$pkgname-$pkgver.tar.gz
|
||||
yaws.init.d"
|
||||
|
||||
_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
|
||||
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"
|
||||
|
||||
# init.d
|
||||
install -Dm755 "$srcdir/yaws.init.d" "$pkgdir/etc/init.d/yaws"
|
||||
|
||||
# License
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
||||
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/
|
||||
}
|
||||
|
||||
md5sums="7c9231b7d9880033c9d3bfba2aa3c901 yaws-1.96.tar.gz
|
||||
3a1445696bd25ae71631d13457980693 yaws.init.d"
|
||||
sha256sums="8d4f16d18937335ac021ca4c65c8ee81dc4d71f133718c7148856cc6bf1f55e2 yaws-1.96.tar.gz
|
||||
313ce8cacd25e8eed5717dfd9e79d1683a4038a64cffff6e93aacfd2fb11c261 yaws.init.d"
|
||||
sha512sums="821ffe530a265462df083a9408e1798616bf11f8c891955500f8de170f77de831defc65c2341d0552471dde253df16ae3d27d59eaa0ccd79b117f3070f49fb2c yaws-1.96.tar.gz
|
||||
07ff290eb98be729445d797361503d01dfba29f050639632d251202267aa485655fd04798f4de8d66a83bb0a798280116f8b06d5b9e8810d3cb2d20c1c1bd1d6 yaws.init.d"
|
||||
52
testing/yaws/yaws.init.d
Executable file
52
testing/yaws/yaws.init.d
Executable file
@ -0,0 +1,52 @@
|
||||
#!/sbin/runscript
|
||||
#
|
||||
# Startup script for the Yaws Web Server (for Alpine Linux)
|
||||
#
|
||||
# config: /etc/conf.d/yaws
|
||||
#
|
||||
# description: yaws - Erlang enabled http server
|
||||
#
|
||||
# use: rc-update add yaws default
|
||||
#
|
||||
|
||||
yaws=/usr/bin/yaws
|
||||
|
||||
# By default we run with the default id
|
||||
# idopts="--id myserverid"
|
||||
|
||||
conf="--conf /etc/yaws/yaws.conf"
|
||||
|
||||
extra_started_commands="restart reload"
|
||||
extra_commands="query"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
|
||||
start() {
|
||||
ebegin "Starting yaws "
|
||||
${yaws} --daemon --heart ${conf}
|
||||
eend $?
|
||||
}
|
||||
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping yaws "
|
||||
${yaws} --stop ${idopts}
|
||||
eend $? "Failed to stop yaws"
|
||||
}
|
||||
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading yaws "
|
||||
${yaws} --hup ${idopts}
|
||||
eend $? "Failed to reload yaws"
|
||||
}
|
||||
|
||||
query() {
|
||||
ebegin "Querying yaws "
|
||||
${yaws} --status ${idopts}
|
||||
eend $?
|
||||
}
|
||||
|
||||
2
testing/yaws/yaws.post-deinstall
Normal file
2
testing/yaws/yaws.post-deinstall
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
rmdir --ignore-fail-on-non-empty /usr/var/log/yaws && exit 0
|
||||
2
testing/yaws/yaws.post-install
Normal file
2
testing/yaws/yaws.post-install
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
mkdir -p /usr/var/log/yaws && exit 0
|
||||
2
testing/yaws/yaws.post-upgrade
Normal file
2
testing/yaws/yaws.post-upgrade
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
mkdir -p /usr/var/log/yaws && exit 0
|
||||
Loading…
x
Reference in New Issue
Block a user