]> git.pld-linux.org Git - packages/flyspray.git/blob - flyspray.spec
- one more macro
[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.5
5 Release:        1
6 License:        GPL
7 Group:          Applications/WWW
8 Source0:        http://flyspray.rocks.cc/files/%{name}-%{version}.tar.gz
9 # Source0-md5:  efb1c68721f43aca3b47076b5da27442
10 Patch0:         %{name}-config.patch
11 URL:            http://flyspray.rocks.cc/
12 Requires:       adodb
13 Requires:       php
14 Requires:       webserver
15 BuildArch:      noarch
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define _sysconfdir     /etc/%{name}
19 %define _appdir         %{_datadir}/%{name}
20
21 %description
22 Flyspray is an easy to use BTS for those who don't require all the
23 complexities of something like Bugzilla.
24
25 %description -l pl
26 Flyspray jest ³atwym w u¿yciu System ¦ledzenia B³êdów (ang. Bug
27 Tracking System - BTS) dla osób, którym nie potrzebne s± kompleksowe
28 rozwi±zania w stylu Bugzilla.
29
30 %prep
31 %setup -q
32 %patch0 -p1
33
34 %install
35 rm -rf $RPM_BUILD_ROOT
36 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/etc/httpd}
37
38 install f* i* r* $RPM_BUILD_ROOT%{_appdir}
39 cp -r lang scripts themes $RPM_BUILD_ROOT%{_appdir}
40
41 install header.php $RPM_BUILD_ROOT%{_sysconfdir}
42 ln -sf %{_sysconfdir}/header.php $RPM_BUILD_ROOT%{_appdir}/header.php
43
44 echo "Alias /%{name} %{_datadir}/%{name}" > $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
45
46 %clean
47 rm -rf $RPM_BUILD_ROOT
48
49 %post
50 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*flyspray.conf" /etc/httpd/httpd.conf; then
51         echo "Include /etc/httpd/phpldapadmin.conf" >> /etc/httpd/httpd.conf
52 elif [ -d /etc/httpd/httpd.conf ]; then
53          ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
54 fi
55
56 if [ -f /var/lock/subsys/httpd ]; then
57         %{_sbindir}/apachectl graceful 1>&2
58 fi
59
60 %postun
61 if [ "$1" = "0" ]; then
62         umask 027
63         if [ -d /etc/httpd/httpd.conf ]; then
64             rm -f /etc/httpd/httpd.conf/99_%{name}.conf
65         else
66                 grep -v "^Include.*flyspray.conf" /etc/httpd/httpd.conf > \
67                         /etc/httpd/httpd.conf.tmp
68                 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
69                 if [ -f /var/lock/subsys/httpd ]; then
70                         %{_sbindir}/apachectl graceful 1>&2
71                 fi
72         fi
73 fi
74
75 %files
76 %defattr(644,root,root,755)
77 %doc AUTHORS BUGS CHANGELOG INSTALL README TODO UPGRADING sql
78 %dir %{_sysconfdir}
79 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
80 %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
81 %{_appdir}
This page took 1.007944 seconds and 3 git commands to generate.