]> git.pld-linux.org Git - packages/bugzilla.git/blob - bugzilla.spec
5cb18f76b24d81767c7575ae8cb8d164285de97d
[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.22
9 Release:        0.31
10 License:        GPL
11 Group:          Applications/WWW
12 Source0:        http://ftp.mozilla.org/pub/mozilla.org/webtools/%{name}-%{version}.tar.gz
13 # Source0-md5:  bbf2f1ec5607978d39855df104231973
14 Source1:        %{name}.conf
15 Source2:        %{name}-localconfig.pl
16 Source3:        %{name}.cron
17 Patch0:         %{name}-pld.patch
18 URL:            http://www.bugzilla.org/
19 BuildRequires:  rpmbuild(macros) >= 1.268
20 BuildRequires:  sed >= 4.0
21 Requires:       perl-DBD-mysql
22 Requires:       perl-DBI >= 1.36
23 Requires:       perl-MailTools >= 1.67
24 Requires:       smtpdaemon
25 Requires:       webapps
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _webapps        /etc/webapps
30 %define         _webapp         %{name}
31 %define         _sysconfdir     %{_webapps}/%{_webapp}
32 %define         _appdir         %{_datadir}/%{_webapp}
33 # Don't enforce DBD driver and exclude optional packages according to release notes
34 %define         _noautoreq              'perl(DBD::*)' perl(Chart::Base) perl(GD) perl(GD::Graph) perl(GD::Text::Align) perl(Net::LDAP) perl(PatchReader) perl(XML::Twig) perl(Image::Magick)
35
36 %description
37 Bugzilla is the Bug-Tracking System from the Mozilla project.
38
39 %description -l pl
40 System ¶ledzenia b³êdów.
41
42 %prep
43 %setup -q
44 %patch0 -p1
45
46 sed -i -e '
47 s,use lib ".",use lib "%{_appdir}",
48 s,use lib qw(.),use lib "%{_appdir}",
49 ' *.cgi
50
51 find -name CVS -type d | xargs rm -rf
52 find '(' -name '*~' -o -name '*.orig' -o -name '.cvsignore' ')' | xargs -r rm -v
53
54 # won't package tests
55 rm -f runtests.pl
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/htdocs,/var/lib/%{name}/{data,graphs}} \
60         $RPM_BUILD_ROOT%{perl_vendorlib}
61
62 install *.pl $RPM_BUILD_ROOT%{_appdir}
63 cp -a template $RPM_BUILD_ROOT%{_appdir}
64 cp -a Bugzilla{,.pm} $RPM_BUILD_ROOT%{perl_vendorlib}
65
66 install *.{cgi,js,txt,dtd,xul} $RPM_BUILD_ROOT%{_appdir}/htdocs
67 cp -a images js skins $RPM_BUILD_ROOT%{_appdir}/htdocs
68
69 ln -s /var/lib/%{name}/graphs $RPM_BUILD_ROOT%{_appdir}/htdocs
70
71 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
72 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
73 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/localconfig.pl
74 install -D %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.daily/bugzilla
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %post
80 if [ "$1" = 1 ]; then
81 # shamelessly stolen from gentoo
82 %banner -e %{name} <<'EOF'
83 0. Bugzilla has been installed into %{_appdir}
84
85 1. To finish the installation, please read
86    http://www.bugzilla.org/docs/%{version}/html/installation.html
87    You will need to run %{_appdir}/checksetup.pl
88
89    IMPORTANT: If you have customized the values in your
90    Status/Resolution field, you must edit checksetup.pl BEFORE YOU RUN
91    IT. Please see the Release Notes for more details.
92
93 2. Please read the Release Notes, especially if you are upgrading:
94    http://www.bugzilla.org/releases/%{version}/release-notes.html
95 EOF
96 fi
97
98 %triggerin -- apache1 < 1.3.37-3, apache1-base
99 %webapp_register apache %{_webapp}
100
101 %triggerun -- apache1 < 1.3.37-3, apache1-base
102 %webapp_unregister apache %{_webapp}
103
104 %triggerin -- apache < 2.2.0, apache-base
105 %webapp_register httpd %{_webapp}
106
107 %triggerun -- apache < 2.2.0, apache-base
108 %webapp_unregister httpd %{_webapp}
109
110 %files
111 %defattr(644,root,root,755)
112 %doc QUICKSTART README UPGRADING* docs/rel_notes.txt docs/txt/Bugzilla-Guide.txt
113 %doc contrib docs/html
114 %dir %attr(750,root,http) %{_sysconfdir}
115 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
116 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
117 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.pl
118
119 %attr(755,root,root) /etc/cron.daily/bugzilla
120
121 %{perl_vendorlib}/Bugzilla
122 %{perl_vendorlib}/Bugzilla.pm
123
124 %dir %{_appdir}
125 %{_appdir}/template
126 %attr(755,root,root) %{_appdir}/*.pl
127
128 %dir %{_appdir}/htdocs
129 %{_appdir}/htdocs/*.dtd
130 %{_appdir}/htdocs/*.js
131 %{_appdir}/htdocs/*.txt
132 %{_appdir}/htdocs/*.xul
133 %{_appdir}/htdocs/graphs
134 %{_appdir}/htdocs/images
135 %{_appdir}/htdocs/js
136 %{_appdir}/htdocs/skins
137 %attr(755,root,root) %{_appdir}/htdocs/*.cgi
138
139 %dir /var/lib/%{name}
140 %attr(770,root,http) /var/lib/%{name}/data
141 %attr(770,root,http) /var/lib/%{name}/graphs
This page took 0.066094 seconds and 2 git commands to generate.