]>
Commit | Line | Data |
---|---|---|
f3b93994 | 1 | Summary: Bug Tracking System |
222dc685 | 2 | Summary(pl.UTF-8): System śledzenia błędów |
f3b93994 | 3 | Name: flyspray |
1cb4862c | 4 | Version: 0.9.9.5.1 |
e41ff8f1 | 5 | Release: 0.2 |
f3b93994 TO |
6 | License: GPL |
7 | Group: Applications/WWW | |
1cb4862c | 8 | Source0: %{name}-%{version}.tar.gz |
e41ff8f1 | 9 | # Source0-md5: a0181d1798cf305c1472d43797a39078 |
f96f947b | 10 | Source1: %{name}.conf |
c9758447 ER |
11 | Source2: %{name}-apache.conf |
12 | Patch0: %{name}-PLD.patch | |
1cb4862c | 13 | URL: http://flyspray.org |
bc1fa0cd | 14 | BuildRequires: rpmbuild(macros) >= 1.461 |
b3f809df | 15 | BuildRequires: unzip |
c9758447 | 16 | Requires(triggerpostun): sed >= 4.0 |
0b40720c | 17 | Requires: adodb >= 4.67-1.17 |
1cb4862c | 18 | Requires: php-xml |
c9758447 | 19 | Requires: webapps |
1a719acf | 20 | Requires: webserver(php) >= 4.3.0 |
f3b93994 TO |
21 | BuildArch: noarch |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
c9758447 ER |
24 | %define _appdir %{_datadir}/%{name} |
25 | %define _webapps /etc/webapps | |
26 | %define _webapp %{name} | |
27 | %define _sysconfdir %{_webapps}/%{_webapp} | |
f3b93994 TO |
28 | |
29 | %description | |
30 | Flyspray is an easy to use BTS for those who don't require all the | |
31 | complexities of something like Bugzilla. | |
32 | ||
88a495c1 JR |
33 | %description -l pl.UTF-8 |
34 | Flyspray jest łatwym w użyciu System Śledzenia Błędów (ang. Bug | |
35 | Tracking System - BTS) dla osób, którym nie potrzebne są kompleksowe | |
36 | rozwiązania w stylu Bugzilla. | |
7b19c708 | 37 | |
c9758447 ER |
38 | %package setup |
39 | Summary: Flyspray setup package | |
222dc685 | 40 | Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Flyspraya |
c9758447 | 41 | Group: Applications/WWW |
47958eea | 42 | Requires: %{name} = %{version}-%{release} |
c9758447 ER |
43 | |
44 | %description setup | |
45 | Install this package to configure initial Flyspray installation. You | |
46 | should uninstall this package when you're done, as it considered | |
47 | insecure to keep the setup files in place. | |
48 | ||
88a495c1 JR |
49 | %description setup -l pl.UTF-8 |
50 | Ten pakiet należy zainstalować w celu wstępnej konfiguracji Flyspraya | |
51 | po pierwszej instalacji. Potem należy go odinstalować, jako że | |
52 | pozostawienie plików instalacyjnych mogłoby być niebezpieczne. | |
c9758447 | 53 | |
b3f809df ER |
54 | %package lang-pl |
55 | Summary: Flyspray Polish resource files | |
222dc685 | 56 | Summary(pl.UTF-8): Pakiet z polską wersją językową do Flyspray |
b3f809df ER |
57 | Group: Applications/WWW |
58 | Requires: %{name} = %{version}-%{release} | |
59 | ||
60 | %description lang-pl | |
61 | This package contains Polish localization files for Flyspray. | |
62 | ||
88a495c1 JR |
63 | %description lang-pl -l pl.UTF-8 |
64 | Pakiet zawiera polską lokalizację dla Flyspray'a. | |
b3f809df | 65 | |
f3b93994 TO |
66 | %prep |
67 | %setup -q | |
c9758447 | 68 | %patch0 -p1 |
f3b93994 TO |
69 | |
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
c9758447 | 72 | install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}} |
abfbe778 | 73 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}} |
f3b93994 | 74 | |
f96f947b | 75 | install *.php *.ico $RPM_BUILD_ROOT%{_appdir} |
e41ff8f1 | 76 | cp -a attachments cache includes javascript lang plugins scripts templates themes setup $RPM_BUILD_ROOT%{_appdir} |
c9758447 | 77 | cp -a docs/licences $RPM_BUILD_ROOT%{_appdir}/setup |
f3b93994 | 78 | |
c9758447 ER |
79 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/flyspray.conf |
80 | rm -f $RPM_BUILD_ROOT%{_appdir}/flyspray.conf.php | |
f96f947b | 81 | |
c9758447 ER |
82 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
83 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
f3b93994 TO |
84 | |
85 | %clean | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
c9758447 ER |
88 | %post setup |
89 | chmod 660 %{_sysconfdir}/flyspray.conf | |
90 | ||
91 | %postun setup | |
92 | if [ "$1" = "0" ]; then | |
93 | chmod 640 %{_sysconfdir}/flyspray.conf | |
29137a67 | 94 | fi |
95 | ||
621fa4c9 | 96 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
c9758447 ER |
97 | %webapp_register apache %{_webapp} |
98 | ||
621fa4c9 | 99 | %triggerun -- apache1 < 1.3.37-3, apache1-base |
c9758447 ER |
100 | %webapp_unregister apache %{_webapp} |
101 | ||
8ca0465f | 102 | %triggerin -- apache < 2.2.0, apache-base |
c9758447 ER |
103 | %webapp_register httpd %{_webapp} |
104 | ||
8ca0465f | 105 | %triggerun -- apache < 2.2.0, apache-base |
c9758447 ER |
106 | %webapp_unregister httpd %{_webapp} |
107 | ||
0b40720c | 108 | %triggerpostun -- %{name} < 0.9.8-3.3 |
c9758447 ER |
109 | if [ -f /etc/%{name}/flyspray.conf.php.rpmsave ]; then |
110 | mv -f %{_sysconfdir}/flyspray.conf{,.rpmnew} | |
111 | mv -f /etc/%{name}/flyspray.conf.php.rpmsave %{_sysconfdir}/flyspray.conf | |
f3b93994 TO |
112 | fi |
113 | ||
c9758447 ER |
114 | # migrate apache2 config |
115 | if [ -f /etc/httpd/httpd.conf ]; then | |
116 | sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf | |
117 | httpd_reload=1 | |
118 | fi | |
119 | ||
120 | # migrate from httpd (apache2) config dir | |
121 | if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then | |
122 | cp -f %{_sysconfdir}/httpd.conf{,.rpmnew} | |
123 | mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf | |
124 | httpd_reload=1 | |
125 | fi | |
126 | ||
127 | if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then | |
128 | rm -f /etc/httpd/httpd.conf/99_%{name}.conf | |
129 | httpd_reload=1 | |
130 | fi | |
131 | ||
132 | if [ "$httpd_reload" ]; then | |
133 | /usr/sbin/webapp register httpd %{_webapp} | |
022ca2ee | 134 | %service httpd reload |
f3b93994 TO |
135 | fi |
136 | ||
bc1fa0cd | 137 | %{__sed} -i -e 's,%{php_pear_dir}/adodb/adodb.inc.php,%{php_data_dir}/adodb/adodb.inc.php,' %{_sysconfdir}/flyspray.conf |
0b40720c | 138 | |
f3b93994 TO |
139 | %files |
140 | %defattr(644,root,root,755) | |
c9758447 ER |
141 | %doc docs/{AUTHORS,BUGS,CHANGELOG,INSTALL,README,TODO,UPGRADING}.txt |
142 | %dir %attr(750,root,http) %{_sysconfdir} | |
143 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
144 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
145 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/flyspray.conf | |
146 | ||
f3b93994 | 147 | %{_appdir} |
c9758447 ER |
148 | %exclude %{_appdir}/setup |
149 | ||
150 | %files setup | |
151 | %defattr(644,root,root,755) | |
152 | %{_appdir}/setup |