]> git.pld-linux.org Git - packages/stikked.git/blob - stikked.spec
more complete list of dirs to hide from web
[packages/stikked.git] / stikked.spec
1 Summary:        Stikked is an Open-Source PHP Pastebin
2 Name:           stikked
3 Version:        0.8.6
4 Release:        0.9
5 License:        CC0
6 Group:          Applications/WWW
7 Source0:        https://github.com/claudehohl/Stikked/archive/%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5:  0340e32c5a07cb8d1faefe7110309905
9 Source1:        apache.conf
10 Source2:        lighttpd.conf
11 Patch0:         config.patch
12 URL:            https://github.com/claudehohl/Stikked
13 BuildRequires:  rpmbuild(macros) >= 1.553
14 Requires:       webapps
15 Requires:       webserver(access)
16 Requires:       webserver(alias)
17 Requires:       webserver(indexfile)
18 Requires:       webserver(php)
19 Suggests:       webserver(expires)
20 Suggests:       webserver(rewrite)
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _webapps        /etc/webapps
25 %define         _webapp         %{name}
26 %define         _sysconfdir     %{_webapps}/%{_webapp}
27 %define         _appdir         %{_datadir}/%{_webapp}
28
29 %description
30 Stikked is an Open-Source PHP Pastebin, with the aim of keeping a
31 simple and easy to use user interface.
32
33 %prep
34 %setup -q -n Stikked-%{version}
35 %undos -f php
36
37 # access restricted by webserver config
38 rm htdocs/application/config/index.html
39 rm htdocs/application/cache/index.html
40 rm htdocs/application/controllers/index.html
41 rm htdocs/application/core/index.html
42 rm htdocs/application/errors/index.html
43 rm htdocs/application/helpers/index.html
44 rm htdocs/application/hooks/index.html
45 rm htdocs/application/index.html
46 rm htdocs/application/libraries/index.html
47 rm htdocs/application/logs/index.html
48 rm htdocs/application/models/index.html
49 rm htdocs/application/third_party/index.html
50
51 # this is to simplify install
52 mv htdocs/application/config .
53 mv config/stikked.php{.dist,}
54
55 %patch0 -p1
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
60
61 cp -a htdocs/* $RPM_BUILD_ROOT%{_appdir}
62 cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
63 ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/application/config
64
65 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
66 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
67 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %triggerin -- apache1 < 1.3.37-3, apache1-base
73 %webapp_register apache %{_webapp}
74
75 %triggerun -- apache1 < 1.3.37-3, apache1-base
76 %webapp_unregister apache %{_webapp}
77
78 %triggerin -- apache < 2.2.0, apache-base
79 %webapp_register httpd %{_webapp}
80
81 %triggerun -- apache < 2.2.0, apache-base
82 %webapp_unregister httpd %{_webapp}
83
84 %triggerin -- lighttpd
85 %webapp_register lighttpd %{_webapp}
86
87 %triggerun -- lighttpd
88 %webapp_unregister lighttpd %{_webapp}
89
90 %files
91 %defattr(644,root,root,755)
92 %doc README.md AUTHORS.md CC0 doc
93 %dir %attr(750,root,http) %{_sysconfdir}
94 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
95 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
96 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
97 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
98 %{_appdir}
This page took 0.118572 seconds and 3 git commands to generate.