]> git.pld-linux.org Git - packages/bugzilla.git/blob - bugzilla.spec
194840cf8167e1b8a8eed4d7d0ffd0c604839afb
[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.UTF-8):      System śledzenia błędów
7 Name:           bugzilla
8 Version:        3.3.3
9 Release:        0.1
10 License:        GPL
11 Group:          Applications/WWW
12 Source0:        http://ftp.mozilla.org/pub/mozilla.org/webtools/%{name}-%{version}.tar.gz
13 # Source0-md5:  893273266255f15e5b253719e8abcb50
14 Source1:        %{name}-skins.tar.bz2
15 # Source1-md5:  4e6e8c2b65cab635975eff5ab318057b
16 Source2:        %{name}.conf
17 Source3:        %{name}-localconfig.pl
18 Source4:        %{name}.cron
19 Patch0:         %{name}-pld.patch
20 URL:            http://www.bugzilla.org/
21 BuildRequires:  rpm-perlprov >= 4.1-13
22 BuildRequires:  rpmbuild(macros) >= 1.268
23 BuildRequires:  sed >= 4.0
24 Requires:       perl(Email::MIME::Modifier)
25 Requires:       perl(Email::Send) >= 2.00
26 Requires:       perl-DBD-mysql
27 Requires:       perl-DBI >= 1.41
28 Requires:       perl-MailTools >= 1.67
29 Requires:       smtpdaemon
30 Requires:       webapps
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %define         _webapps        /etc/webapps
35 %define         _webapp         %{name}
36 %define         _sysconfdir     %{_webapps}/%{_webapp}
37 %define         _appdir         %{_datadir}/%{_webapp}
38 # Don't enforce DBD driver and exclude optional packages according to release notes
39 %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)
40
41 #D perl-Apache-DBI-1.01-1, perl-AppConfig-1.56-2, perl-BSD-Resource-1.28-1, perl-Class-Inspector-1.16-1,
42 #D perl-DBD-Pg-1.49-1, perl-Data-Flow-0.09-2, perl-Email-Abstract-2.13-1, perl-Email-Address-1.86-1,
43 #D perl-Email-MIME-1.85-1, perl-Email-MIME-Attachment-Stripper-1.3-1, perl-Email-MIME-ContentType-1.0-1,
44 #D perl-Email-MIME-Creator-1.45-1, perl-Email-MIME-Encodings-1.3-2, perl-Email-MIME-Modifier-1.43-1,
45 #D perl-Email-MessageID-1.35-1, perl-Email-Reply-1.1-1, perl-Email-Send-1.46-1, perl-Email-Simple-1.96-1,
46 #D perl-Email-Simple-Creator-1.41-1, perl-IO-All-0.33-2, perl-IO-String-1.08-1, perl-Module-Pluggable-3.1-4,
47 #D perl-Return-Value-1.28-1, perl-Spiffy-0.30-1, perl-Template-Toolkit-2.15-1, perl-mixin-0.04-1, perl-mod_perl-2.0.3-2
48
49
50 %description
51 Bugzilla is the Bug-Tracking System from the Mozilla project.
52
53 %description -l pl.UTF-8
54 System śledzenia błędów.
55
56 %prep
57 %setup -q %{?_rc:-n %{name}-%{version}%{_rc}} -a1
58 %patch0 -p1
59
60 sed -i -e '
61 s,use lib ".",use lib "%{_appdir}",
62 s,use lib qw(.),use lib "%{_appdir}",
63 ' *.cgi
64
65 find -name CVS -type d | xargs rm -rf
66 find '(' -name '*~' -o -name '*.orig' -o -name '.cvsignore' ')' | xargs -r rm -v
67
68 # won't package tests
69 rm -f runtests.pl
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/htdocs,/var/lib/%{name}/{data,graphs}} \
74         $RPM_BUILD_ROOT%{perl_vendorlib}
75
76 install *.pl $RPM_BUILD_ROOT%{_appdir}
77 cp -a template $RPM_BUILD_ROOT%{_appdir}
78 cp -a Bugzilla{,.pm} $RPM_BUILD_ROOT%{perl_vendorlib}
79
80 install *.{cgi,txt,dtd} js/*.js $RPM_BUILD_ROOT%{_appdir}/htdocs
81 cp -a images js skins $RPM_BUILD_ROOT%{_appdir}/htdocs
82
83 ln -s /var/lib/%{name}/graphs $RPM_BUILD_ROOT%{_appdir}/htdocs
84
85 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
86 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
87 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/localconfig.pl
88 install -D %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.daily/bugzilla
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %post
94 if [ "$1" = 1 ]; then
95 # shamelessly stolen from gentoo
96 %banner -e %{name} <<'EOF'
97 0. Bugzilla has been installed into %{_appdir}
98
99 1. To finish the installation, please read
100    http://www.bugzilla.org/docs/%{version}/html/installation.html
101    You will need to run %{_appdir}/checksetup.pl
102
103    IMPORTANT: If you have customized the values in your
104    Status/Resolution field, you must edit checksetup.pl BEFORE YOU RUN
105    IT. Please see the Release Notes for more details.
106
107 2. Please read the Release Notes, especially if you are upgrading:
108    http://www.bugzilla.org/releases/%{version}/release-notes.html
109 EOF
110 fi
111
112 %triggerin -- apache1 < 1.3.37-3, apache1-base
113 %webapp_register apache %{_webapp}
114
115 %triggerun -- apache1 < 1.3.37-3, apache1-base
116 %webapp_unregister apache %{_webapp}
117
118 %triggerin -- apache < 2.2.0, apache-base
119 %webapp_register httpd %{_webapp}
120
121 %triggerun -- apache < 2.2.0, apache-base
122 %webapp_unregister httpd %{_webapp}
123
124 %files
125 %defattr(644,root,root,755)
126 %doc QUICKSTART README UPGRADING* docs/en/rel_notes.txt docs/en/txt/Bugzilla-Guide.txt
127 %doc contrib docs/en/html
128 %dir %attr(750,root,http) %{_sysconfdir}
129 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
130 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
131 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.pl
132
133 %attr(755,root,root) /etc/cron.daily/bugzilla
134
135 %{perl_vendorlib}/Bugzilla
136 %{perl_vendorlib}/Bugzilla.pm
137
138 %dir %{_appdir}
139 %{_appdir}/template
140 %attr(700,root,root) %{_appdir}/checksetup.pl
141 %attr(755,root,root) %{_appdir}/collectstats.pl
142 %attr(755,root,root) %{_appdir}/email_in.pl
143 %attr(755,root,root) %{_appdir}/importxml.pl
144 %attr(755,root,root) %{_appdir}/install-module.pl
145 %attr(755,root,root) %{_appdir}/jobqueue.pl
146 %attr(755,root,root) %{_appdir}/mod_perl.pl
147 %attr(755,root,root) %{_appdir}/sanitycheck.pl
148 %attr(755,root,root) %{_appdir}/testserver.pl
149 %attr(755,root,root) %{_appdir}/whine.pl
150 %attr(755,root,root) %{_appdir}/whineatnews.pl
151
152 %dir %{_appdir}/htdocs
153 %attr(755,root,root) %{_appdir}/htdocs/*.cgi
154 %{_appdir}/htdocs/*.dtd
155 %{_appdir}/htdocs/*.js
156 %{_appdir}/htdocs/*.txt
157 %{_appdir}/htdocs/graphs
158 %{_appdir}/htdocs/images
159 %{_appdir}/htdocs/js
160 %dir %{_appdir}/htdocs/skins
161 %dir %{_appdir}/htdocs/skins/contrib
162 %dir %{_appdir}/htdocs/skins/contrib/Dusk
163 %dir %{_appdir}/htdocs/skins/custom
164 %{_appdir}/htdocs/skins/standard
165 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/htdocs/skins/custom/*.css
166 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/htdocs/skins/contrib/Dusk/*.css
167
168 %dir /var/lib/%{name}
169 %attr(770,root,http) /var/lib/%{name}/data
170 %attr(770,root,http) /var/lib/%{name}/graphs
This page took 0.079987 seconds and 2 git commands to generate.