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