]> git.pld-linux.org Git - packages/pastebin.git/blob - pastebin.spec
adapter, fix summary
[packages/pastebin.git] / pastebin.spec
1 %define         php_min_version 5.0.0
2 %include        /usr/lib/rpm/macros.php
3 Summary:        A collaborative debugging tool
4 Name:           pastebin
5 Version:        0.60
6 Release:        0.8
7 License:        Affero GPL licence
8 Group:          Applications/WWW
9 Source0:        http://%{name}.dixo.net/pastebin.tar.gz
10 # Source0-md5:  c73c4b40e8eeddba9b515586f017a777
11 Patch0:         postdir.patch
12 Patch1:         system-geshi.patch
13 Patch2:         layout.patch
14 Patch3:         fixes.patch
15 Patch4:         config.patch
16 Source1:        apache.conf
17 Source2:        lighttpd.conf
18 URL:            http://blog.dixo.net/downloads/
19 BuildRequires:  rpmbuild(macros) >= 1.553
20 Requires:       php(core) >= %{php_min_version}
21 Requires:       php(date)
22 Requires:       php(pcre)
23 Requires:       php-geshi >= 1.0.7
24 Requires:       webapps
25 Requires:       webserver(access)
26 Requires:       webserver(alias)
27 Suggests:       php-mysql
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         _webapps        /etc/webapps
32 %define         _webapp         %{name}
33 %define         _sysconfdir     %{_webapps}/%{_webapp}
34 %define         _appdir         %{_datadir}/%{_webapp}
35
36 # bad depsolver
37 %define         _noautopear     pear
38
39 # exclude optional php dependencies
40 %define         _noautophp      php-mysql
41
42 # put it together for rpmbuild
43 %define         _noautoreq      %{?_noautophp} %{?_noautopear}
44
45 %description
46 This tool was orignally designed to enable collaborative code review
47 via the #php IRC channel. Inspired by www.parseerror.com/paste, but
48 more streamlined and capable of allowing collabation via IRC by
49 allowing easy modification of posted code. Another benefit is short
50 urls - e.g. <http://pastebin.com/333>
51
52 Since then it has found uses in many developer communities and has
53 been constantly improved.
54
55 %prep
56 %setup -q
57 %undos -f php
58 %patch0 -p1
59 %patch1 -p1
60 %patch2 -p1
61 %patch3 -p1
62 %patch4 -p1
63
64 rm -rf lib/geshi
65
66 # legacy
67 rm public_html/legacy.php
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},/var/lib/%{name}}
72
73 cp -a lib public_html $RPM_BUILD_ROOT%{_appdir}
74
75 # for file based posts storage
76 install -d $RPM_BUILD_ROOT/var/lib/%{name}
77
78 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
79 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
80 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
81
82 mv $RPM_BUILD_ROOT%{_appdir}/lib/config/* $RPM_BUILD_ROOT%{_sysconfdir}
83 rmdir $RPM_BUILD_ROOT%{_appdir}/lib/config
84 ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/lib/config
85
86 %triggerin -- apache1 < 1.3.37-3, apache1-base
87 %webapp_register apache %{_webapp}
88
89 %triggerun -- apache1 < 1.3.37-3, apache1-base
90 %webapp_unregister apache %{_webapp}
91
92 %triggerin -- apache < 2.2.0, apache-base
93 %webapp_register httpd %{_webapp}
94
95 %triggerun -- apache < 2.2.0, apache-base
96 %webapp_unregister httpd %{_webapp}
97
98 %triggerin -- lighttpd
99 %webapp_register lighttpd %{_webapp}
100
101 %triggerun -- lighttpd
102 %webapp_unregister lighttpd %{_webapp}
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %files
108 %defattr(644,root,root,755)
109 %doc CHANGES INSTALL LICENCE README UPGRADE
110 %dir %attr(750,root,http) %{_sysconfdir}
111 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
112 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
113 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
114 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
115 %{_appdir}
116
117 %dir %attr(770,root,http) /var/lib/%{name}
This page took 0.073257 seconds and 3 git commands to generate.