~alpine/devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[alpine-devel] [PATCH] new aport for yaws 1.96

Vitaliy Tokarev <vitaliy.tokarev@gmail.com>
Details
Message ID
<1372280211-26328-1-git-send-email-vitaliy.tokarev@gmail.com>
Sender timestamp
1372280211
DKIM signature
missing
Download raw message
Patch: +124 -0
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 <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"
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
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20130628170541.1b15c733@ncopa-desktop.alpinelinux.org>
In-Reply-To
<1372280211-26328-1-git-send-email-vitaliy.tokarev@gmail.com> (view parent)
Sender timestamp
1372431941
DKIM signature
missing
Download raw message
On Thu, 27 Jun 2013 00:56:51 +0400
Vitaliy Tokarev <vitaliy.tokarev@gmail.com> wrote:

> 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/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


Why are those needed? /usr/var sounds wrong.

It also fails to build here:
ccache gcc -c -Os -fomit-frame-pointer -pipe -I/usr/include/security  -I"/usr/lib/erlang/usr/include" -I/usr/include/pam/  epam.c
setuid_drv.c:20:24: fatal error: erl_driver.h: No such file or directory
compilation terminated.

sounds like erland-dev should be in makedepends.


-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<CABDkf79x915=CFajc60M55q+BRhATVryQbB1XpPD3wGMK-Dtaw@mail.gmail.com>
In-Reply-To
<20130628170541.1b15c733@ncopa-desktop.alpinelinux.org> (view parent)
Sender timestamp
1372435395
DKIM signature
missing
Download raw message
Yes, you are right. I'll check everything and then recommit again.


On 28 June 2013 19:05, Natanael Copa <ncopa@alpinelinux.org> wrote:

> On Thu, 27 Jun 2013 00:56:51 +0400
> Vitaliy Tokarev <vitaliy.tokarev@gmail.com> wrote:
>
> > 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/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
>
>
> Why are those needed? /usr/var sounds wrong.
>
> It also fails to build here:
> ccache gcc -c -Os -fomit-frame-pointer -pipe -I/usr/include/security
>  -I"/usr/lib/erlang/usr/include" -I/usr/include/pam/  epam.c
> setuid_drv.c:20:24: fatal error: erl_driver.h: No such file or directory
> compilation terminated.
>
> sounds like erland-dev should be in makedepends.
>
>
> -nc
>



-- 
With Best Regards,
Vitaliy T.
Reply to thread Export thread (mbox)