]> git.pld-linux.org Git - packages/bugzilla.git/blob - bugzilla.spec
f0785b4d506acdaa7d9e72cf952bbad18fa2e564
[packages/bugzilla.git] / bugzilla.spec
1 # TODO:
2 # - SECURITY: http://securitytracker.com/alerts/2004/Jul/1010681.html
3 %include        /usr/lib/rpm/macros.perl
4 Summary:        Bug tracking system
5 Summary(pl):    System ¶ledzenia b³êdów
6 Name:           bugzilla
7 Version:        2.17.7
8 Release:        0.1
9 License:        GPL
10 Group:          Aplications/WWW
11 Source0:        http://ftp.mozilla.org/pub/mozilla.org/webtools/%{name}-%{version}.tar.gz
12 # Source0-md5:  b5e34e50e3eda5647bdca223fb6fd797
13 Source1:        %{name}.conf
14 Patch0:         %{name}-httpd_user.patch
15 URL:            http://www.bugzilla.org/
16 BuildRequires:  perl-base
17 Requires(post,postun):  apache
18 Requires(post,postun):  grep
19 Requires(postun):       fileutils
20 Requires:       apache
21 Requires:       mysql >= 3.23.41
22 Requires:       perl-DBD-mysql
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _noautoreq      'perl(localconfig)' 'perl(data::params)' 'perl(data::versioncache)'
26
27 %define         _bugzilladir    /usr/share/bugzilla
28
29 %description
30 Bug tracking system.
31
32 %description -l pl
33 System ¶ledzenia b³êdów.
34
35 %prep
36 %setup -q
37 %patch0 -p1
38
39 %build
40 perl -pi -e 's@#\!/usr/bonsaitools/bin/perl@#\!/usr/bin/perl@' *cgi *pl Bug.pm processmail syncshadowdb
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{/etc/httpd,%{_bugzilladir}/{Bugzilla/{Auth,Template/Plugin},css,docs/{html,images},template},/var/lib/%{name}/{data,graphs}}
45
46 install *.{cgi,gif,html,jpg,js,pl,pm,txt} $RPM_BUILD_ROOT%{_bugzilladir}
47 install Bugzilla/*.pm $RPM_BUILD_ROOT%{_bugzilladir}/Bugzilla
48 install Bugzilla/Auth/*.pm $RPM_BUILD_ROOT%{_bugzilladir}/Bugzilla/Auth
49 install Bugzilla/Template/Plugin/*.pm $RPM_BUILD_ROOT%{_bugzilladir}/Bugzilla/Template/Plugin
50 install css/*.css $RPM_BUILD_ROOT%{_bugzilladir}/css
51 install docs/html/*.html $RPM_BUILD_ROOT%{_bugzilladir}/docs/html
52 install docs/images/*.gif $RPM_BUILD_ROOT%{_bugzilladir}/docs/images
53
54 cp -r template/en $RPM_BUILD_ROOT%{_bugzilladir}/template
55 find -name CVS -type d | xargs rm -rf
56
57 ln -s /var/lib/%{name}/data $RPM_BUILD_ROOT%{_bugzilladir}
58 ln -s /var/lib/%{name}/graphs $RPM_BUILD_ROOT%{_bugzilladir}
59
60 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %post
66 if [ -f /etc/httpd/httpd.conf ] && \
67         ! grep -q "^Include.*/bugzilla.conf" /etc/httpd/httpd.conf; then
68                 echo "Include /etc/httpd/bugzilla.conf" >> /etc/httpd/httpd.conf
69 fi
70 if [ -d /etc/httpd/httpd.conf ]; then
71         mv -f /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
72 fi
73 if [ -f /var/lock/subsys/httpd ]; then
74         /usr/sbin/apachectl restart 1>&2
75 fi
76
77 %postun
78 if [ "$1" = "0" ]; then
79         umask 027
80         if [ -d /etc/httpd/httpd.conf ]; then
81                 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
82         else
83                 grep -v "^Include.*bugzilla.conf" /etc/httpd/httpd.conf/10_httpd.conf > \
84                         /etc/httpd/httpd.conf.tmp
85                 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
86                 if [ -f /var/lock/subsys/httpd ]; then
87                         /usr/sbin/apachectl restart 1>&2
88                 fi
89         fi
90 fi
91
92 %files
93 %defattr(644,root,root,755)
94 %doc README UPGRADING UPGRADING-pre-2.8 docs/rel_notes.txt docs/txt/Bugzilla-Guide.txt
95 %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
96 %dir %{_bugzilladir}
97 %{_bugzilladir}/css
98 %{_bugzilladir}/docs
99 %{_bugzilladir}/template
100 %{_bugzilladir}/data
101 %{_bugzilladir}/graphs
102 %{_bugzilladir}/Bugzilla
103 %attr(755,root,root) %{_bugzilladir}/*.cgi
104 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_bugzilladir}/globals.pl
105 %{_bugzilladir}/[!g]*.pl
106 %{_bugzilladir}/*.pm
107 %{_bugzilladir}/*.html
108 %{_bugzilladir}/*.js
109 %{_bugzilladir}/*.gif
110 %{_bugzilladir}/*.jpg
111 %{_bugzilladir}/*.txt
112 %dir /var/lib/%{name}
113 %attr(770,root,http) /var/lib/%{name}/data
114 %attr(775,root,http) /var/lib/%{name}/graphs
This page took 0.146926 seconds and 3 git commands to generate.