1 Summary: Stikked is an Open-Source PHP Pastebin
6 Group: Applications/WWW
7 Source0: https://github.com/claudehohl/Stikked/archive/%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5: 0340e32c5a07cb8d1faefe7110309905
10 Source2: lighttpd.conf
12 URL: https://github.com/claudehohl/Stikked
13 BuildRequires: rpmbuild(macros) >= 1.553
15 Requires: webserver(access)
16 Requires: webserver(alias)
17 Requires: webserver(indexfile)
18 Requires: webserver(php)
19 Suggests: webserver(expires)
20 Suggests: webserver(rewrite)
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define _webapps /etc/webapps
25 %define _webapp %{name}
26 %define _sysconfdir %{_webapps}/%{_webapp}
27 %define _appdir %{_datadir}/%{_webapp}
30 Stikked is an Open-Source PHP Pastebin, with the aim of keeping a
31 simple and easy to use user interface.
34 %setup -q -n Stikked-%{version}
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
51 # this is to simplify install
52 mv htdocs/application/config .
53 mv config/stikked.php{.dist,}
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
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
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
70 rm -rf $RPM_BUILD_ROOT
72 %triggerin -- apache1 < 1.3.37-3, apache1-base
73 %webapp_register apache %{_webapp}
75 %triggerun -- apache1 < 1.3.37-3, apache1-base
76 %webapp_unregister apache %{_webapp}
78 %triggerin -- apache < 2.2.0, apache-base
79 %webapp_register httpd %{_webapp}
81 %triggerun -- apache < 2.2.0, apache-base
82 %webapp_unregister httpd %{_webapp}
84 %triggerin -- lighttpd
85 %webapp_register lighttpd %{_webapp}
87 %triggerun -- lighttpd
88 %webapp_unregister lighttpd %{_webapp}
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