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