]> git.pld-linux.org Git - packages/flyspray.git/blob - flyspray.spec
- up to 0.9.7
[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.7
5 Release:        1
6 License:        GPL
7 Group:          Applications/WWW
8 Source0:        http://flyspray.rocks.cc/files/%{name}-%{version}.tar.gz
9 # Source0-md5:  ab686864412a0fb4590560ee360bb1f5
10 Source1:        %{name}.conf
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
33 %install
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/etc/httpd}
36
37 install *.php *.ico $RPM_BUILD_ROOT%{_appdir}
38 cp -r includes sql lang scripts themes $RPM_BUILD_ROOT%{_appdir}
39
40 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/flyspray.conf.php
41 ln -sf %{_sysconfdir}/flyspray.conf.php $RPM_BUILD_ROOT%{_appdir}/flyspray.conf.php
42
43 cat > $RPM_BUILD_ROOT/etc/httpd/%{name}.conf <<EOF
44 Alias /%{name} %{_appdir}
45
46 <Directory %{_appdir}/sql >
47     Options None
48     Order deny,allow
49     Deny from all
50     Allow from 127.0.0.1
51 </Directory>    
52 EOF
53
54 %clean
55 rm -rf $RPM_BUILD_ROOT
56
57 %post
58 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*flyspray.conf" /etc/httpd/httpd.conf; then
59         echo "Include /etc/httpd/phpldapadmin.conf" >> /etc/httpd/httpd.conf
60 elif [ -d /etc/httpd/httpd.conf ]; then
61          ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
62 fi
63
64 if [ -f /var/lock/subsys/httpd ]; then
65         %{_sbindir}/apachectl graceful 1>&2
66 fi
67
68 %postun
69 if [ "$1" = "0" ]; then
70         umask 027
71         if [ -d /etc/httpd/httpd.conf ]; then
72             rm -f /etc/httpd/httpd.conf/99_%{name}.conf
73         else
74                 grep -v "^Include.*flyspray.conf" /etc/httpd/httpd.conf > \
75                         /etc/httpd/httpd.conf.tmp
76                 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
77                 if [ -f /var/lock/subsys/httpd ]; then
78                         %{_sbindir}/apachectl graceful 1>&2
79                 fi
80         fi
81 fi
82
83 %files
84 %defattr(644,root,root,755)
85 %doc docs/AUTHORS.txt docs/BUGS.txt docs/CHANGELOG.txt docs/INSTALL.txt docs/README.txt docs/TODO.txt docs/UPGRADING.txt
86 %dir %{_sysconfdir}
87 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
88 %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
89 %{_appdir}
90 %exclude %{_appdir}/lang/langdiff.php
This page took 0.056666 seconds and 3 git commands to generate.