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