diff options
author | mrxx | 2015-07-14 12:20:18 +0200 |
---|---|---|
committer | mrxx | 2015-07-14 12:20:18 +0200 |
commit | 5fb5cb3e5f7e048097e767c7540fd2f15121d66c (patch) | |
tree | 5a2d7423c1531d82628e66de202a8728c008f30e | |
download | aur-5fb5cb3e5f7e048097e767c7540fd2f15121d66c.tar.gz |
Update to v1.21
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | LICENSE | 26 | ||||
-rw-r--r-- | PKGBUILD | 62 | ||||
-rw-r--r-- | mini_httpd.conf | 7 | ||||
-rw-r--r-- | mini_httpd.install | 17 | ||||
-rw-r--r-- | mini_httpd.logrotate | 13 | ||||
-rw-r--r-- | mini_httpd.pem | 49 | ||||
-rw-r--r-- | mini_httpd.service | 11 | ||||
-rw-r--r-- | mini_httpd_ssl.conf | 9 | ||||
-rw-r--r-- | mini_httpd_ssl.service | 11 | ||||
-rw-r--r-- | sample.cgi | 8 | ||||
-rw-r--r-- | sample_perl.cgi | 10 |
12 files changed, 257 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..04bf8f22f10a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,34 @@ +pkgbase = mini_httpd + pkgdesc = A small and simple forking http server. CGI, SSL, auth, vhosts, ipv6. + pkgver = 1.21 + pkgrel = 1 + url = http://www.acme.com/software/mini_httpd/ + install = mini_httpd.install + arch = i686 + arch = x86_64 + license = custom + depends = openssl + backup = etc/mini_httpd.conf + source = http://www.acme.com/software/mini_httpd/mini_httpd-1.21.tar.gz + source = mini_httpd.service + source = mini_httpd_ssl.service + source = mini_httpd.logrotate + source = mini_httpd.conf + source = mini_httpd_ssl.conf + source = mini_httpd.pem + source = sample.cgi + source = sample_perl.cgi + source = LICENSE + md5sums = c7d18a2952eb44282366c127e6dc3870 + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + +pkgname = mini_httpd + diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..0d40a9021ca6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,26 @@ +mini_httpd - small HTTP server + +Copyright © 1999,2000 by Jef Poskanzer <jef@mail.acme.com>. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b0351fd3fb01 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: mrxx <mrxx at cyberhome dot at> +# Contributor: bender02 at gmx dot com +pkgname=mini_httpd +pkgver=1.21 +pkgrel=1 +pkgdesc="A small and simple forking http server. CGI, SSL, auth, vhosts, ipv6." +url="http://www.acme.com/software/mini_httpd/" +arch=('i686' 'x86_64') +license=('custom') +depends=('openssl') +backup=('etc/mini_httpd.conf') +source=("http://www.acme.com/software/${pkgname}/${pkgname}-${pkgver}.tar.gz" + 'mini_httpd.service' + 'mini_httpd_ssl.service' + 'mini_httpd.logrotate' + 'mini_httpd.conf' + 'mini_httpd_ssl.conf' + 'mini_httpd.pem' + 'sample.cgi' + 'sample_perl.cgi' + 'LICENSE') + +md5sums=('c7d18a2952eb44282366c127e6dc3870' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') + +install=mini_httpd.install + +prepare() +{ + cd "$pkgname-$pkgver" + sed -i 's|#SSL_|SSL_|' Makefile + sed -i '/SSL_TREE/s|/usr/local/ssl|/usr|' Makefile + sed -i 's/htpasswd/mini_htpasswd/g' Makefile + sed -i 's/getline/my_getline/' htpasswd.c + sed -i 's/HAVE_INT64T/__int8_t_defined/g' mini_httpd.c + mv htpasswd.c mini_htpasswd.c + mv htpasswd.1 mini_htpasswd.1 +} + +build() { + cd "$pkgname-$pkgver" + make +} + +package() { + cd "$pkgname-$pkgver" + install -Dm644 -t "${pkgdir}/etc/${pkgname}/" "${srcdir}/${pkgname}.conf" "${srcdir}/${pkgname}_ssl.conf" + install -Dm644 -t "${pkgdir}/usr/lib/systemd/system/" "${srcdir}/${pkgname}.service" "${srcdir}/${pkgname}_ssl.service" + install -Dm640 -t "${pkgdir}/etc/ssl/private/" "${srcdir}/${pkgname}.pem" + install -Dm755 -t "${pkgdir}/srv/http/" "${srcdir}/sample.cgi" "${srcdir}/sample_perl.cgi" + install -Dm644 "${srcdir}/${pkgname}.logrotate" "${pkgdir}/etc/logrotate.d/${pkgname}" + install -D "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" + make BINDIR=${pkgdir}/usr/bin MANDIR=${pkgdir}/usr/share/man install +} diff --git a/mini_httpd.conf b/mini_httpd.conf new file mode 100644 index 000000000000..1201ab4dbc9a --- /dev/null +++ b/mini_httpd.conf @@ -0,0 +1,7 @@ +port=80 +dir=/srv/http +cgipat=**.cgi +charset=utf-8 +user=nobody +logfile=/var/log/mini_httpd.log +pidfile=/run/mini_httpd.pid diff --git a/mini_httpd.install b/mini_httpd.install new file mode 100644 index 000000000000..69b5db2b1d31 --- /dev/null +++ b/mini_httpd.install @@ -0,0 +1,17 @@ +post_install() { + [ ! -f /srv/http/index.html ] && echo "<html><body><h2>Server online.</h2></body></html>" >/srv/http/index.html + [ ! -f /srv/http/index.php ] && echo "<?php phpinfo(); ?>" >/srv/http/index.php + echo + echo "*** USAGE ***" + echo + echo "'systemctl start mini_httpd.service' starts the web server." + echo "'systemctl start mini_httpd_ssl.service' starts the web server in SSL mode." + echo "Web server root is /srv/http." + echo "Configuration files are in /etc/mini_httpd/ (man mini_httpd for options)" + echo "For directory protection, use mini_htpasswd ." + echo +} + +post_upgrade() { + post_install +} diff --git a/mini_httpd.logrotate b/mini_httpd.logrotate new file mode 100644 index 000000000000..8d1bc59ad013 --- /dev/null +++ b/mini_httpd.logrotate @@ -0,0 +1,13 @@ +/var/log/mini_httpd.log +{ + weekly + missingok + notifempty + compress + delaycompress + create 644 nobody nobody + sharedscripts + postrotate + kill -HUP `cat /run/mini_httpd.pid 2>/dev/null` 2> /dev/null || true + endscript +} diff --git a/mini_httpd.pem b/mini_httpd.pem new file mode 100644 index 000000000000..0fb960b02e25 --- /dev/null +++ b/mini_httpd.pem @@ -0,0 +1,49 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCYwC3Iy3LFuES+ +ki4MBwm41Vorivj/6gTmY2IGbdGuFAhKjvopzrGHU6G8teG545iAg4bomNJnQ2Wm +KP9ZAkYErCeQTtHh1DeTclnjP00oqyJ7pXOdef4szH0Et/nEZA+SXKQe+pLlAnnI +kQogpwnfk6WOI3px0HIelxTaZMxWCjeQ/nyaH73S/1wU5I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UwGCDF/hfhsrpFwID +AQABo1AwTjAdBgNVHQ4EFgQUwSlSt1brS9kzm7p1LpTh5iKiJOYwHwYDVR0jBBgw +FoAUwSlSt1brS9kzm7p1LpTh5iKiJOYwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0B +AQsFAAOCAQEAMLSFlpF1D0MkYiCvy+ZIKjtYKo50LOoglvTjJ4GwPBcVNtl2t3Cy +S1Vgax/6MadUbOipfXlvbIjN3Rh1dMo09VasoSM03ayMU8k3MFfhpu0ShOW0NLFX +dpCjG1UTG9BEVnGPlkjTx6GeEdgaaBgIafgS3cHNpLfPLQH1FIO12MUXFXR2wowV +//jwdtAp9ZExcNEXkfLWdEGavF+kRF5wjvmBu9e8jGe3WwLPHoyb8zxUq26eQrBZ +HDGIEVfovUH5EIYCcizkVl1jxL9E+WAj5R5cxyfXVMb8mo9iZws7K86Whq7/SIeL +OSDHlT6v4ozJkdgUONSpG0IjpGzQjAhWmg== +-----END CERTIFICATE----- diff --git a/mini_httpd.service b/mini_httpd.service new file mode 100644 index 000000000000..e60ead0fe074 --- /dev/null +++ b/mini_httpd.service @@ -0,0 +1,11 @@ +[Unit] +Description=mini_httpd server +After=syslog.target +After=network.target + +[Service] +PIDFile=/run/mini_httpd.pid +ExecStart=/usr/bin/mini_httpd -C /etc/mini_httpd/mini_httpd.conf + +[Install] +WantedBy=multi-user.target diff --git a/mini_httpd_ssl.conf b/mini_httpd_ssl.conf new file mode 100644 index 000000000000..2e25e602227e --- /dev/null +++ b/mini_httpd_ssl.conf @@ -0,0 +1,9 @@ +port=443 +dir=/srv/http +cgipat=**.cgi +charset=utf-8 +user=nobody +ssl +certfile=/etc/ssl/private/mini_httpd.pem +logfile=/var/log/mini_httpd.log +pidfile=/run/mini_httpd.pid diff --git a/mini_httpd_ssl.service b/mini_httpd_ssl.service new file mode 100644 index 000000000000..d11a71295361 --- /dev/null +++ b/mini_httpd_ssl.service @@ -0,0 +1,11 @@ +[Unit] +Description=mini_httpd server +After=syslog.target +After=network.target + +[Service] +PIDFile=/run/mini_httpd.pid +ExecStart=/usr/bin/mini_httpd -C /etc/mini_httpd/mini_httpd_ssl.conf + +[Install] +WantedBy=multi-user.target diff --git a/sample.cgi b/sample.cgi new file mode 100644 index 000000000000..c5d55967bc0f --- /dev/null +++ b/sample.cgi @@ -0,0 +1,8 @@ +#!/bin/bash +echo "Content-type: text/html" +echo +echo "<html> +<body> +<h2>CGI Bash Example</h2> +</body> +</html>" diff --git a/sample_perl.cgi b/sample_perl.cgi new file mode 100644 index 000000000000..9398fc772737 --- /dev/null +++ b/sample_perl.cgi @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +print "Content-type: text/html\n\n"; +print <<htmlcode; + +<html> +<body> +<h2>CGI Perl Example</h2> +</body> +htmlcode |