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