]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - lighttpd/lighttpd.nm
1fb927d3778d9082a09abc9815e323d871b6476f
[people/amarx/ipfire-3.x.git] / lighttpd / lighttpd.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = lighttpd
7 version = 1.4.29
8 ver_major = 1.4
9 release = 2
10
11 maintainer = Michael Tremer <michael.tremer@ipfire.org>
12 groups = Networking/Webservers
13 url = http://www.lighttpd.net/
14 license = BSD
15 summary = Lightning fast webserver with light system requirements.
16
17 description
18 Secure, fast, compliant and very flexible web-server which has been optimized
19 for high-performance environments. It has a very low memory footprint compared
20 to other webservers and takes care of cpu-load. Its advanced feature-set
21 (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) make
22 it the perfect webserver-software for every server that is suffering load
23 problems.
24 end
25
26 source_dl = http://download.lighttpd.net/lighttpd/releases-%{ver_major}.x/
27
28 build
29 requires
30 bzip2-devel
31 gdbm-devel
32 openldap-devel
33 openssl-devel
34 pcre-devel
35 pkg-config
36 shadow-utils
37 zlib-devel
38 end
39
40 configure_options += \
41 --libdir=/usr/lib/%{name} \
42 --with-ldap \
43 --with-openssl
44
45 prepare_cmds
46 %{create_user}
47 end
48
49 install_cmds
50 mkdir -pv %{BUILDROOT}/etc
51 cp -vf %{DIR_SOURCE}/%{name}.conf %{BUILDROOT}/etc/%{name}.conf
52
53 mkdir -pv %{BUILDROOT}/var/log/%{name}
54 touch %{BUILDROOT}/var/log/%{name}/{access,error}.log
55 chown lighttpd.lighttpd -R %{BUILDROOT}/var/log/%{name}
56 mkdir -pv %{BUILDROOT}/var/cache/lighttpd/compress
57 chown lighttpd.lighttpd -Rv %{BUILDROOT}/var/cache/lighttpd/
58
59 mkdir -pv %{BUILDROOT}/run/lighttpd
60 chown lighttpd.lighttpd -Rv %{BUILDROOT}/run/lighttpd/
61 end
62 end
63
64 create_user
65 getent group lighttpd >/dev/null || /usr/sbin/groupadd -r lighttpd
66 getent passwd lighttpd >/dev/null || /usr/sbin/useradd -r -g lighttpd \
67 -d /var/www/lighttpd -s /sbin/nologin lighttpd
68 end
69
70 packages
71 package %{name}
72 configfiles
73 /etc/lighttpd.conf
74 end
75
76 prerequires = shadow-utils systemd-units
77
78 script prein
79 %{create_user}
80 end
81
82 script postin
83 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
84 end
85
86 script preun
87 /bin/systemctl --no-reload disable lighttpd.service >/dev/null 2>&1 || :
88 /bin/systemctl stop lighttpd.service >/dev/null 2>&1 || :
89 end
90
91 script postup
92 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
93 /bin/systemctl try-restart lighttpd.service >/dev/null 2>&1 || :
94 end
95 end
96 end