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