]> git.pld-linux.org Git - packages/bugzilla.git/blob - bugzilla.spec
- use %service
[packages/bugzilla.git] / bugzilla.spec
1 # TODO
2 # - Split DB packages for mysql/pgsql
3 # - fill brr and add autodeps bcond
4 %include        /usr/lib/rpm/macros.perl
5 Summary:        Bug tracking system
6 Summary(pl):    System ¶ledzenia b³êdów
7 Name:           bugzilla
8 Version:        2.20
9 Release:        0.4
10 License:        GPL
11 Group:          Applications/WWW
12 Source0:        http://ftp.mozilla.org/pub/mozilla.org/webtools/%{name}-%{version}.tar.gz
13 # Source0-md5:  bd8638501bc3f6ce93499ae0227d1ec2
14 Source1:        %{name}.conf
15 Patch0:         %{name}-httpd_user.patch
16 Patch1:         %{name}-chdir.patch
17 URL:            http://www.bugzilla.org/
18 BuildRequires:  rpmbuild(macros) >= 1.268
19 Requires:       mysql >= 3.23.41
20 Requires:       perl-DBD-mysql
21 Requires:       perl-DBI >= 1.36
22 Requires:       smtpdaemon
23 Requires:       webserver = apache
24 Conflicts:      apache1 < 1.3.33-2
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 # see TODO
29 %define         _noautoreq              'perl(DBD::Pg)'
30 %define         _bugzilladir    %{_datadir}/bugzilla
31 %define         _sysconfdir             /etc/%{name}
32
33 %description
34 Bugzilla is the Bug-Tracking System from the Mozilla project.
35
36 %description -l pl
37 System ¶ledzenia b³êdów.
38
39 %prep
40 %setup -q
41 %patch0 -p1
42 %patch1 -p1
43
44 find -name CVS -type d | xargs rm -rf
45 find '(' -name '*~' -o -name '*.orig' -o -name '.cvsignore' ')' | xargs -r rm -v
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bugzilladir}/Bugzilla,/var/lib/%{name}/{data,graphs}}
50
51 install *.{cgi,html,jpg,js,pl,pm,txt,dtd,xul} $RPM_BUILD_ROOT%{_bugzilladir}
52 cp -a Bugzilla $RPM_BUILD_ROOT%{_bugzilladir}
53 cp -a images js skins template $RPM_BUILD_ROOT%{_bugzilladir}
54
55 ln -s /var/lib/%{name}/data $RPM_BUILD_ROOT%{_bugzilladir}
56 ln -s /var/lib/%{name}/graphs $RPM_BUILD_ROOT%{_bugzilladir}
57
58 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 %triggerpostun -- %{name} < 2.20
64 # migrate from old config location (only apache2, as there was no apache1 support)
65 if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
66         cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
67         mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/apache.conf
68         %service -q httpd reload
69 fi
70
71 # nuke very-old config location (this mostly for Ra)
72 if [ ! -d /etc/httpd/httpd.conf ]; then
73         sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
74         %service -q httpd reload
75 fi
76
77 # place new config location, as trigger puts config only on first install, do it here.
78 # apache1
79 if [ -d /etc/apache/conf.d ]; then
80         ln -sf %{_sysconfdir}/apache.conf /etc/apache/conf.d/99_%{name}.conf
81         %service -q apache reload
82 fi
83 # apache2
84 if [ -d /etc/httpd/httpd.conf ]; then
85         ln -sf %{_sysconfdir}/apache.conf /etc/httpd/httpd.conf/99_%{name}.conf
86         %service -q httpd reload
87 fi
88
89 %triggerin -- apache1 >= 1.3.33-2
90 %apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
91
92 %triggerun -- apache1 >= 1.3.33-2
93 %apache_config_uninstall -v 1
94
95 %triggerin -- apache >= 2.0.0
96 %apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
97
98 %triggerun -- apache >= 2.0.0
99 %apache_config_uninstall -v 2
100
101 %files
102 %defattr(644,root,root,755)
103 %doc QUICKSTART README UPGRADING UPGRADING-pre-2.8 docs/rel_notes.txt docs/txt/Bugzilla-Guide.txt
104 %doc contrib docs/html
105 %attr(750,root,http) %dir %{_sysconfdir}
106 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
107
108 %dir %{_bugzilladir}
109 %{_bugzilladir}/Bugzilla
110 %{_bugzilladir}/data
111 %{_bugzilladir}/graphs
112 %{_bugzilladir}/images
113 %{_bugzilladir}/js
114 %{_bugzilladir}/skins
115 %{_bugzilladir}/template
116 %attr(755,root,root) %{_bugzilladir}/*.cgi
117 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_bugzilladir}/globals.pl
118 %{_bugzilladir}/[!g]*.pl
119 %{_bugzilladir}/*.dtd
120 %{_bugzilladir}/*.html
121 %{_bugzilladir}/*.js
122 %{_bugzilladir}/*.jpg
123 %{_bugzilladir}/*.pm
124 %{_bugzilladir}/*.txt
125 %{_bugzilladir}/*.xul
126 %dir /var/lib/%{name}
127 %attr(770,root,http) /var/lib/%{name}/data
128 %attr(775,root,http) /var/lib/%{name}/graphs
This page took 0.087402 seconds and 4 git commands to generate.