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