2 # - After upgrade from version <= 0.18.x mysql database requires upgrade!
4 # - update mantis-setup pl doc (default user/password)
5 Summary: The Mantis bug tracker
6 Summary(hu.UTF-8): The Mantis hibakövető
7 Summary(pl.UTF-8): Mantis - system kontroli błędów
12 Group: Development/Tools
13 Source0: http://downloads.sourceforge.net/project/mantisbt/mantis-stable/%{version}/%{name}bt-%{version}.tar.gz
14 # Source0-md5: decb8df9b6695d20162faaa0823849fc
15 Source1: %{name}-doc-PLD.tar.gz
16 # Source1-md5: eaed8c123d8cef118aca7158ec83fed4
18 Patch0: %{name}-config.patch
19 Patch1: %{name}-doc.patch
20 URL: http://mantisbt.sourceforge.net/
21 BuildRequires: rpmbuild(macros) >= 1.268
22 BuildRequires: sed >= 4.0
23 Requires(triggerpostun): sed >= 4.0
24 Requires: apache(mod_dir)
28 Requires: webserver = apache
29 Requires: webserver(php) >= 4.3.1-4
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 %define _appdir %{_datadir}/%{name}
34 %define _webapps /etc/webapps
35 %define _webapp %{name}
36 %define _sysconfdir %{_webapps}/%{_webapp}
39 Mantis is a PHP/MySQL/web based bugtracking system.
41 %description -l hu.UTF-8
42 Mantis egy PHP/MySQL/web alapú hibakövető rendszer.
44 %description -l pl.UTF-8
45 Mantis jest systemem kontroli błędów opartym na interfejsie WWW, bazie
49 Summary: Mantis setup package
50 Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Mantisa
51 Group: Applications/WWW
52 Requires: %{name} = %{epoch}:%{version}-%{release}
55 Install this package to configure initial Mantis installation. You
56 should uninstall this package when you're done, as it considered
57 insecure to keep the setup files in place. Default username/password
58 after installation: administrator/root
60 %description setup -l hu.UTF-8
61 Ezen csomag telepítése bekonfigurálja a kezdeti Mantis telepítést. A
62 csomagot el kell távolítanod, ha kész vagy, mert nem biztonságos
63 fájlok maradnak utána. Alapértelmezett username/password telepítés
64 után: administrator/root
66 %description setup -l pl.UTF-8
67 Ten pakiet należy zainstalować w celu wstępnej konfiguracji Mantisa po
68 pierwszej instalacji. Potem należy go odinstalować, jako że
69 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
72 %setup -q -a1 -n %{name}bt-%{version}
75 find . -type d -name CVS | xargs rm -rf
76 find . -type f -name .cvsignore | xargs rm -rf
77 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT{%{_appdir}/doc,%{_sysconfdir}}
83 cp -af {*.php,admin,api,core,css,images,javascript,lang,library,plugins} $RPM_BUILD_ROOT%{_appdir}
84 cp -a config_inc.php.sample $RPM_BUILD_ROOT%{_sysconfdir}/config.php
85 ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/config_inc.php
87 mv $RPM_BUILD_ROOT{%{_appdir}/config_defaults_inc.php,%{_sysconfdir}/config_defaults.php}
88 ln -s %{_sysconfdir}/config_defaults.php $RPM_BUILD_ROOT%{_appdir}/config_defaults_inc.php
90 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
91 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
94 rm -rf $RPM_BUILD_ROOT
98 %banner -e %{name} <<EOF
99 Install %{name}-setup if you need to setup initial Mantis
100 configuration or configure mantis.
105 %banner -e %{name}-setup <<EOF
106 After first install the correct user/password:
108 You should change or delete this!
109 After install you should uninstall %{name}-setup!
112 %triggerin -- apache1 < 1.3.37-3, apache1-base
113 %webapp_register apache %{_webapp}
115 %triggerun -- apache1 < 1.3.37-3, apache1-base
116 %webapp_unregister apache %{_webapp}
118 %triggerin -- apache < 2.2.0, apache-base
119 %webapp_register httpd %{_webapp}
121 %triggerun -- apache < 2.2.0, apache-base
122 %webapp_unregister httpd %{_webapp}
124 %triggerpostun -- %{name} < 0.19.3-2.1
125 # rescue app configs.
126 for i in config.php config_defaults.php; do
127 if [ -f /etc/%{name}/$i.rpmsave ]; then
128 mv -f %{_sysconfdir}/$i{,.rpmnew}
129 mv -f /etc/%{name}/$i.rpmsave %{_sysconfdir}/$i
133 # nuke very-old config location (this mostly for Ra)
134 if [ -f /etc/httpd/httpd.conf ]; then
135 sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
136 /usr/sbin/webapp register httpd %{_webapp}
140 # migrate from httpd (apache2) config dir
141 if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
142 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
143 mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf
144 /usr/sbin/webapp register httpd %{_webapp}
148 # migrate from apache-config macros
149 if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
150 if [ -d /etc/apache/webapps.d ]; then
151 cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
152 cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/apache.conf
155 if [ -d /etc/httpd/webapps.d ]; then
156 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
157 cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
159 rm -f /etc/%{name}/apache.conf.rpmsave
162 # migrating from earlier apache-config?
163 if [ -L /etc/apache/conf.d/99_%{name}.conf ] || [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
164 if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
165 rm -f /etc/apache/conf.d/99_%{name}.conf
166 /usr/sbin/webapp register apache %{_webapp}
169 if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
170 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
171 /usr/sbin/webapp register httpd %{_webapp}
175 # no earlier registration. assume migration from Ra
176 if [ -d /etc/apache/webapps.d ]; then
177 /usr/sbin/webapp register apache %{_webapp}
180 if [ -d /etc/httpd/webapps.d ]; then
181 /usr/sbin/webapp register httpd %{_webapp}
186 if [ "$httpd_reload" ]; then
187 %service httpd reload
189 if [ "$apache_reload" ]; then
190 %service apache reload
194 %defattr(644,root,root,755)
195 %doc doc/{CREDITS,CUSTOMIZATION,INSTALL,RELEASE} doc/en/*.txt
196 %dir %attr(750,root,http) %{_sysconfdir}
197 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
198 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
199 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
200 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config_defaults.php
203 %{_appdir}/billing*.php
204 %{_appdir}/browser_search_plugin.php
205 %{_appdir}/config_defaults_inc.php
206 %{_appdir}/config_filter_defaults_inc.php
207 %{_appdir}/config_inc.php
208 %{_appdir}/excel_xml_export.php
209 %{_appdir}/issues_rss.php
210 %{_appdir}/return_dynamic_filters.php
214 %{_appdir}/javascript
220 %{_appdir}/changelog_page*
233 %{_appdir}/permalink_page.php
234 %{_appdir}/plugin.php
235 %{_appdir}/plugin_file.php
240 %{_appdir}/roadmap_page.php
241 %{_appdir}/search.php
249 %{_appdir}/xmlhttprequest.php
252 %defattr(644,root,root,755)