aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/yaws
diff options
context:
space:
mode:
authorEivind Uggedal <eivind@uggedal.com>2014-05-31 08:35:12 +0000
committerEivind Uggedal <eivind@uggedal.com>2014-05-31 08:35:12 +0000
commit53e390857ccde21171e050622de1cbe3f73b53e1 (patch)
treedb60526c240c40183debde5dc9a39fdc6e3c1aef /unmaintained/yaws
parent3c332a2c4a413682afeea18f3cb4e5a2834efee3 (diff)
downloadaports-53e390857ccde21171e050622de1cbe3f73b53e1.tar.bz2
aports-53e390857ccde21171e050622de1cbe3f73b53e1.tar.xz
testing/yaws: move to unmaintained
Diffstat (limited to 'unmaintained/yaws')
-rw-r--r--unmaintained/yaws/APKBUILD89
-rw-r--r--unmaintained/yaws/yaws-1.96-etc.patch13
-rw-r--r--unmaintained/yaws/yaws.conf.alpine150
-rwxr-xr-xunmaintained/yaws/yaws.initd52
4 files changed, 304 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"
diff --git a/unmaintained/yaws/yaws-1.96-etc.patch b/unmaintained/yaws/yaws-1.96-etc.patch
new file mode 100644
index 0000000000..a48801be27
--- /dev/null
+++ b/unmaintained/yaws/yaws-1.96-etc.patch
@@ -0,0 +1,13 @@
+# don't create /usr/etc dir when --sysconfdir=/etc passed to configure
+
+--- yaws-1.96/scripts/Install
++++ yaws-1.96/scripts/Install.new
+@@ -18,7 +18,7 @@
+ v=${vardir}
+
+ install -d ${destdir}${prefix}/bin
+-install -d ${destdir}${prefix}/etc
++install -d ${destdir}${etcdir}
+ install -d ${destdir}${vardir}/log/yaws
+
+ cat yaws.template | \
diff --git a/unmaintained/yaws/yaws.conf.alpine b/unmaintained/yaws/yaws.conf.alpine
new file mode 100644
index 0000000000..c3a6d2832c
--- /dev/null
+++ b/unmaintained/yaws/yaws.conf.alpine
@@ -0,0 +1,150 @@
+
+# conf for yaws
+
+# First we have a set of globals that apply to all virtual servers
+
+# This is the directory where all logfiles for
+# all virtual servers will be written.
+logdir = /var/log/yaws
+
+# These are the paths to directories where additional
+# beam code can be placed. The daemon will add these
+# directories to its search path.
+ebin_dir = /usr/lib/yaws/examples/ebin
+ebin_dir = /var/yaws/ebin
+
+# This is a directory where application specific .hrl
+# files can be placed. Application-specific .yaws code can
+# then include these .hrl files.
+include_dir = /usr/lib/yaws/examples/include
+
+# Set this to an integer value to control
+# max number of connections from clients into the server.
+max_connections = nolimit
+
+# Normally, yaws does not restrict the number of times a connection is
+# kept alive using keepalive. Setting this parameter to an integer X
+# will ensure that connections are closed once they have been used X times.
+# This can be a useful to guard against long running connections
+# collecting too much garbage in the Erlang VM.
+keepalive_maxuses = nolimit
+
+# Override the garbage collection option parameters for processes
+# that handle new connections. Useful for systems expecting long-lived
+# connections that handle a lot of data. The default value is Erlang's
+# default. Valid options are {fullsweep_after, X} and/or {min_heap_size, Y} where
+# X and Y are integers. See Erlang's erlang:spawn_opt/4 function for more
+# details. The value type is a quoted string containing an Erlang proplist or
+# the atom undefined.
+process_options = "[]"
+
+# Set the size of the cached acceptor process pool. The value must be an
+# integer greater than or equal to 0. The default pool size is 8. Setting
+# the pool size to 0 effectively disables the pool.
+#acceptor_pool_size = 8
+
+# This is a debug variable, possible values are http | traffic | false
+# It is also possible to set the trace (possibly to the tty) while
+# invoking yaws from the shell as in
+# yaws -i -T -x (see man yaws).
+trace = false
+
+# Enable this if we want to use the old OTP ssl implementation
+# OTP R13B03 is known to work with this flag set to false (default).
+use_old_ssl = false
+
+# It is possible to have yaws start additional application-specific code at
+# startup. Set runmod to the name of the module you want yaws to start. It
+# assumes the module has an exported function start/0. To have multiple
+# runmods just add more "runmod = xyz" lines.
+#
+# runmod = mymodule
+
+# By default yaws will copy the erlang error_log and
+# append it to a wrap log called report.log (in the logdir).
+# This feature can be turned off. This would typically
+# be the case when yaws runs within another larger app.
+copy_error_log = true
+
+# Logs are wrap logs
+log_wrap_size = 1000000
+
+# Possibly resolve all hostnames in logfiles so webalizer
+# can produce the nice geography piechart
+log_resolve_hostname = false
+
+# Fail completely or not if yaws fails to bind a listen socket.
+fail_on_bind_err = true
+
+# If HTTP auth is used, it is possible to have a specific
+# auth log. As of release 1.90 the global auth_log is
+# deprecated and ignored. Now, this variable must be set in
+# server part
+#auth_log = true
+
+# When we're running multiple yaws systems on the same
+# host, we need to give each yaws system an individual
+# name. Yaws will write a number of runtime files under
+# ${HOME}/.yaws/yaws/${id}
+# The default value is "default"
+# If we're not planning to run multiple webservers on the
+# same host it's much better to leave this value unset since
+# then all the ctl function (--stop et.el) work without having
+# to supply the id.
+#
+# id = myname
+
+# Earlier versions of Yaws picked the first virtual host
+# in a list of hosts with the same IP/PORT when the Host:
+# header doesn't match any name on any Host.
+# This is often nice in testing environments but not
+# acceptable in real-world hosting scenarios;
+# think http://porn.bigcompany.com
+pick_first_virthost_on_nomatch = true
+
+# If the HTTP client session is to be kept alive, wait this many
+# milliseconds for a new request before timing out the connection. Note
+# that infinity is a valid value but it's not recommended.
+keepalive_timeout = 30000
+
+# Now, a set of virtual servers.
+# The examples below first show two virthosted servers on the same IP (0.0.0.0)
+# in this case, but an explicit IP can be given as well.
+
+#<server localhost>
+# port = 80
+# listen = 0.0.0.0
+# docroot = /var/yaws/www
+# auth_log = true
+# appmods = <cgi-bin, yaws_appmod_cgi>
+#</server>
+
+<server localhost>
+ port = 80
+ listen = 0.0.0.0
+ docroot = /tmp
+ dir_listings = true
+ auth_log = true
+ statistics = true
+ <auth>
+ realm = foobar
+ dir = /
+ user = foo:bar
+ user = baz:bar
+ </auth>
+</server>
+
+# Now an SSL server
+
+<server localhost>
+ port = 443
+ docroot = /tmp
+ listen = 0.0.0.0
+ dir_listings = true
+ auth_log = true
+ <ssl>
+ keyfile = /etc/yaws/yaws-key.pem
+ certfile = /etc/yaws/yaws-cert.pem
+ depth = 0
+ </ssl>
+</server>
diff --git a/unmaintained/yaws/yaws.initd b/unmaintained/yaws/yaws.initd
new file mode 100755
index 0000000000..5867acf5a8
--- /dev/null
+++ b/unmaintained/yaws/yaws.initd
@@ -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 $?
+}
+