initial import
This commit is contained in:
69
lighttpd/PKGBUILD
Normal file
69
lighttpd/PKGBUILD
Normal file
@@ -0,0 +1,69 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=lighttpd
|
||||
pkgver=1.4.69
|
||||
pkgrel=2
|
||||
pkgdesc="A secure, fast, compliant and very flexible web-server"
|
||||
license=('Modified-BSD')
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://www.lighttpd.net/'
|
||||
depends=('pcre' 'util-linux' 'libressl' 'pcre2' 'gawk')
|
||||
makedepends=('lua' 'libxml2' 'e2fsprogs' 'sqlite' 'gdbm' 'pkgconfig')
|
||||
optdepends=('libxml2: mod_webdav'
|
||||
'lua: mod_cml/mod_magnet'
|
||||
'sqlite: mod_webdav')
|
||||
backup=('etc/lighttpd/lighttpd.conf'
|
||||
'etc/logrotate.d/lighttpd')
|
||||
options=('emptydirs')
|
||||
source=("https://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${pkgver}.tar.xz"
|
||||
"lighttpd.conf"
|
||||
"lighttpd.logrotate.d"
|
||||
"lighttpd.confd"
|
||||
"lighttpd.initd"
|
||||
"lighttpd.run")
|
||||
sha512sums=('9d174c8e0a192b4eb8218a9f76b0bd42f90030228600bb7bbe35ebb9e7bbaea36ee2732535c5cc6dab171294817837bfa26074ff84a37832dd89f57488b4071f'
|
||||
'7f832b5ec2171943624c6e592499b019e5425662fdb3e1b7418643bffdadb5245fbb9002063207413c53bd3f104b0d819565669c6911fd94e2727dd126382cdb'
|
||||
'92d0465ac8f459443226a086fa70fdce64fed6bfdab8b7d2f90b4c9db0a1af6d038906819ba8596fb4eb2dbfb165dfc1a170f37505c09f581493c1ea789029ee'
|
||||
'dd722c15230df734d7151bcb9cfc66d6d54aac5dcdca5f50eb33979d3a2443ba3a9ef3d7cb35e6dbd3d39fce09da15ab0029b1399bf1b1e4f4ef20d40f70a416'
|
||||
'd5fc03ded923d2aeea19fefdf658ed793114867dd0b50be6836d767108c98fb7de56011f00ea63220c4b198cff45d98fdc8a649efae90673536e03f786219485'
|
||||
'00e77e6cefd201de6c745547eecc9be6f3181331073921982f5d400139f2c1afe0dffc42a78082283cfdd21c79d59ec18ca5ce606f442b90b5c532cf62985e50')
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
./configure --prefix=/usr \
|
||||
--libdir=/usr/lib/lighttpd/ \
|
||||
--sysconfdir=/etc/lighttpd \
|
||||
--without-mysql \
|
||||
--with-ldap \
|
||||
--with-attr \
|
||||
--with-openssl \
|
||||
--with-kerberos5 \
|
||||
--without-fam \
|
||||
--with-webdav-props \
|
||||
--with-webdav-locks \
|
||||
--with-gdbm \
|
||||
--with-lua
|
||||
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
install -D -m644 "$srcdir/lighttpd.logrotate.d" "$pkgdir/etc/logrotate.d/lighttpd"
|
||||
install -D -m644 "$srcdir/lighttpd.conf" "$pkgdir/etc/lighttpd/lighttpd.conf"
|
||||
|
||||
install -d -m700 -o http -g http "$pkgdir"/var/{log,cache}/lighttpd/
|
||||
install -d -m700 -o http -g http "$pkgdir"/srv/http/
|
||||
|
||||
install -Dm 644 "${srcdir}/lighttpd.confd" "${pkgdir}/etc/conf.d/lighttpd"
|
||||
install -Dm 755 "${srcdir}/lighttpd.initd" "${pkgdir}/etc/init.d/lighttpd"
|
||||
install -Dm 755 "$srcdir/lighttpd.run" "$pkgdir/etc/sv/lighttpd/run"
|
||||
|
||||
pushd doc/config >/dev/null
|
||||
find . -type f ! -name 'Makefile*' -exec install -D -m644 {} "${pkgdir}"/usr/share/doc/lighttpd/config/{} \;
|
||||
popd >/dev/null
|
||||
|
||||
install -Dm644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
23
lighttpd/lighttpd.conf
Normal file
23
lighttpd/lighttpd.conf
Normal file
@@ -0,0 +1,23 @@
|
||||
# This is a minimal example config
|
||||
# See /usr/share/doc/lighttpd
|
||||
# and http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions
|
||||
|
||||
server.port = 80
|
||||
server.username = "http"
|
||||
server.groupname = "http"
|
||||
server.document-root = "/srv/http"
|
||||
server.pid-file = "/run/lighttpd.pid"
|
||||
server.errorlog = "/var/log/lighttpd/error.log"
|
||||
dir-listing.activate = "enable"
|
||||
index-file.names = ( "index.html" )
|
||||
mimetype.assign = (
|
||||
".html" => "text/html",
|
||||
".txt" => "text/plain",
|
||||
".css" => "text/css",
|
||||
".js" => "application/x-javascript",
|
||||
".jpg" => "image/jpeg",
|
||||
".jpeg" => "image/jpeg",
|
||||
".gif" => "image/gif",
|
||||
".png" => "image/png",
|
||||
"" => "application/octet-stream"
|
||||
)
|
||||
8
lighttpd/lighttpd.confd
Normal file
8
lighttpd/lighttpd.confd
Normal file
@@ -0,0 +1,8 @@
|
||||
# /etc/conf.d/lighttpd
|
||||
|
||||
# Location of a shell used by the 'include_shell' directive
|
||||
# in the lighttpd's configuration file
|
||||
#export SHELL="/bin/bash"
|
||||
|
||||
# Location of the lighttpd configuration file
|
||||
LIGHTTPD_CONF="/etc/lighttpd/lighttpd.conf"
|
||||
79
lighttpd/lighttpd.initd
Normal file
79
lighttpd/lighttpd.initd
Normal file
@@ -0,0 +1,79 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
extra_started_commands="reload graceful"
|
||||
|
||||
LIGHTTPD_PID="$(grep pid ${LIGHTTPD_CONF} | cut -d '=' -f 2 | tr -d \\\" | tr -d [:space:])"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use mysql logger spawn-fcgi ldap slapd netmount dns
|
||||
after famd
|
||||
after sshd
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ ! -f "${LIGHTTPD_CONF}" ] ; then
|
||||
ewarn "${LIGHTTPD_CONF} does not exist."
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${LIGHTTPD_PID}" ] ; then
|
||||
eerror "server.pid-file variable in ${LIGHTTPD_CONF}"
|
||||
eerror "is not set. Please set this variable properly"
|
||||
eerror "and try again"
|
||||
return 1
|
||||
fi
|
||||
/usr/sbin/lighttpd -t -f ${LIGHTTPD_CONF} >/dev/null
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return 1
|
||||
# Glean lighttpd's credentials from the configuration file
|
||||
# Fixes bug 454366
|
||||
LIGHTTPD_USER="$(awk '/^server.username/{s=$3};{sub("\"","",s)};END{print s}' ${LIGHTTPD_CONF})"
|
||||
LIGHTTPD_GROUP="$(awk '/^server.groupname/{s=$3};{sub("\"","",s)};END{print s}' ${LIGHTTPD_CONF})"
|
||||
checkpath -d -q -m 0750 -o "${LIGHTTPD_USER}":"${LIGHTTPD_GROUP}" /run/lighttpd/
|
||||
|
||||
ebegin "Starting lighttpd"
|
||||
start-stop-daemon --start --quiet --exec /usr/sbin/lighttpd \
|
||||
--pidfile "${LIGHTTPD_PID}" -- -f "${LIGHTTPD_CONF}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
local rv=0
|
||||
ebegin "Stopping lighttpd"
|
||||
start-stop-daemon --stop --quiet --pidfile "${LIGHTTPD_PID}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
if ! service_started "${SVCNAME}" ; then
|
||||
eerror "${SVCNAME} isn't running"
|
||||
return 1
|
||||
fi
|
||||
checkconfig || return 1
|
||||
|
||||
ebegin "Re-opening lighttpd log files"
|
||||
start-stop-daemon --quiet --pidfile "${LIGHTTPD_PID}" \
|
||||
--signal HUP
|
||||
eend $?
|
||||
}
|
||||
|
||||
graceful() {
|
||||
if ! service_started "${SVCNAME}" ; then
|
||||
eerror "${SVCNAME} isn't running"
|
||||
return 1
|
||||
fi
|
||||
checkconfig || return 1
|
||||
|
||||
ebegin "Gracefully stopping lighttpd"
|
||||
start-stop-daemon --quiet --pidfile "${LIGHTTPD_PID}" \
|
||||
--signal INT
|
||||
if eend $? ; then
|
||||
rm -f "${LIGHTTPD_PID}"
|
||||
start
|
||||
fi
|
||||
}
|
||||
14
lighttpd/lighttpd.logrotate.d
Normal file
14
lighttpd/lighttpd.logrotate.d
Normal file
@@ -0,0 +1,14 @@
|
||||
# lighttpd logrotate script
|
||||
|
||||
/var/log/lighttpd/*.log {
|
||||
daily
|
||||
missingok
|
||||
copytruncate
|
||||
rotate 7
|
||||
compress
|
||||
notifempty
|
||||
sharedscripts
|
||||
postrotate
|
||||
test -e /run/openrc/softlevel && /etc/init.d/lighttpd reload 1>/dev/null || true
|
||||
endscript
|
||||
}
|
||||
2
lighttpd/lighttpd.run
Normal file
2
lighttpd/lighttpd.run
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec /usr/sbin/lighttpd-angel -D -f /etc/lighttpd/lighttpd.conf
|
||||
Reference in New Issue
Block a user