]>
Commit | Line | Data |
---|---|---|
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.30 | |
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=%{libdir}/%{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 | |
77 | shadow-utils | |
78 | systemd-units | |
79 | end | |
80 | ||
81 | script prein | |
82 | %{create_user} | |
83 | end | |
84 | ||
85 | script postin | |
86 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
87 | end | |
88 | ||
89 | script preun | |
90 | /bin/systemctl --no-reload disable lighttpd.service >/dev/null 2>&1 || : | |
91 | /bin/systemctl stop lighttpd.service >/dev/null 2>&1 || : | |
92 | end | |
93 | ||
94 | script postup | |
95 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
96 | /bin/systemctl try-restart lighttpd.service >/dev/null 2>&1 || : | |
97 | end | |
98 | end | |
99 | ||
100 | package %{name}-debuginfo | |
101 | template DEBUGINFO | |
102 | end | |
103 | end |