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