X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-la0-f53.google.com (mail-la0-f53.google.com [209.85.215.53]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 9EADFDC00B5 for ; Wed, 26 Jun 2013 20:57:00 +0000 (UTC) Received: by mail-la0-f53.google.com with SMTP id fs12so14375031lab.12 for ; Wed, 26 Jun 2013 13:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer; bh=0NmGTNgOU3WUnJVPYcebvrmZDIhPwf4ovDZ5Lmgdwpc=; b=byy0Z4evhstFUIfuVLkgmrHc0FiAOSwt2JPyhwZBtBnFBU8r+BKUO8X31rT+GZ5joD A6U2nOE3fpOmnjoLTbR29FUWloNDm73o18hYlESNJsRd5DDSO6raX6Hwv4QxzAbAn/kr 2DnHKYJyPSRqG4IL59aLGaeTlhW2aOhpcZ926waH9IFGGz8iYcSmoduH+cSfJ6RgZ0DV zz7Qs1ohiPKznSjHudYeW/qx/Ak5HdKbWaF6RrM5//VCh74FPcYI8eV+jl2wJkoUSWm2 zbreOpgl3UEulLKXF7AkVJHn5w+OWz8T2BkP+XDCQ7zLR6/PKAnFuMup4cRpSHT4sgyu xLGw== X-Received: by 10.152.88.105 with SMTP id bf9mr2698761lab.38.1372280218229; Wed, 26 Jun 2013 13:56:58 -0700 (PDT) Received: from localhost.localdomain ([78.25.123.214]) by mx.google.com with ESMTPSA id c4sm11435137lae.7.2013.06.26.13.56.53 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Jun 2013 13:56:57 -0700 (PDT) From: Vitaliy Tokarev To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] [PATCH] new aport for yaws 1.96 Date: Thu, 27 Jun 2013 00:56:51 +0400 Message-Id: <1372280211-26328-1-git-send-email-vitaliy.tokarev@gmail.com> X-Mailer: git-send-email 1.8.2.3 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Yaws is a HTTP high perfomance 1.1 webserver particularly well suited for dynamic-content web applications. --- testing/yaws/APKBUILD | 66 ++++++++++++++++++++++++++++++++++++++++ testing/yaws/yaws.init.d | 52 +++++++++++++++++++++++++++++++ testing/yaws/yaws.post-deinstall | 2 ++ testing/yaws/yaws.post-install | 2 ++ testing/yaws/yaws.post-upgrade | 2 ++ 5 files changed, 124 insertions(+) create mode 100644 testing/yaws/APKBUILD create mode 100755 testing/yaws/yaws.init.d create mode 100644 testing/yaws/yaws.post-deinstall create mode 100644 testing/yaws/yaws.post-install create mode 100644 testing/yaws/yaws.post-upgrade diff --git a/testing/yaws/APKBUILD b/testing/yaws/APKBUILD new file mode 100644 index 0000000..ef64db4 --- /dev/null +++ b/testing/yaws/APKBUILD @@ -0,0 +1,66 @@ +# Contributor: Vitaliy Tokarev +# 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" diff --git a/testing/yaws/yaws.init.d b/testing/yaws/yaws.init.d new file mode 100755 index 0000000..5867acf --- /dev/null +++ b/testing/yaws/yaws.init.d @@ -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 $? +} + diff --git a/testing/yaws/yaws.post-deinstall b/testing/yaws/yaws.post-deinstall new file mode 100644 index 0000000..60dd86d --- /dev/null +++ b/testing/yaws/yaws.post-deinstall @@ -0,0 +1,2 @@ +#!/bin/sh +rmdir --ignore-fail-on-non-empty /usr/var/log/yaws && exit 0 diff --git a/testing/yaws/yaws.post-install b/testing/yaws/yaws.post-install new file mode 100644 index 0000000..17ac6d7 --- /dev/null +++ b/testing/yaws/yaws.post-install @@ -0,0 +1,2 @@ +#!/bin/sh +mkdir -p /usr/var/log/yaws && exit 0 diff --git a/testing/yaws/yaws.post-upgrade b/testing/yaws/yaws.post-upgrade new file mode 100644 index 0000000..17ac6d7 --- /dev/null +++ b/testing/yaws/yaws.post-upgrade @@ -0,0 +1,2 @@ +#!/bin/sh +mkdir -p /usr/var/log/yaws && exit 0 -- 1.8.2.3 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---