2 # - php5 is not tested, but not placing hard conflict on it, as it prevents php4 & php coinstallation
3 # - discard bundled packages (from INSTALL):
4 # - JpGraph 1.5.3 (last GPL version)
5 # - Smarty 2.3.0 (http://smarty.php.net)
7 # - dTree 2.0.5 (http://www.destroydrop.com/javascript/tree/)
8 # - dynCalendar.js (http://www.phpguru.org/dyncalendar.html)
9 # - overLIB 3.5.1 (http://www.bosrup.com/web/overlib/)
10 # - A few other small javascript libraries
11 # - Mail Queue Process, cron or separate package (misc/process_mail_queue.php)
12 # - Email Download (misc/download_emails.php)
13 # - Reminder System (misc/check_reminders.php)
14 # - Heartbeat Monitor (misc/monitor.php)
15 # - Email Routing Script (misc/route_emails.php)
16 # - Note Routing Script (misc/route_notes.php)
17 # - IRC Notification Bot (misc/irc/bot.php)
18 # - Command-line Interface (misc/cli/eventum)
21 #define _snap 20050114
24 %define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
26 %define _source http://mysql.wildyou.net/Downloads/%{name}/%{name}-%{version}.tar.gz
31 Summary: Eventum Issue / Bug Tracking System
34 Release: %{?_snap:0.%{_snap}.}%{_rel}
36 Group: Applications/WWW
38 # Source0-md5: 361c1355e46a6bbfa54e420964ec92cf
39 Source1: %{name}-apache.conf
40 Patch0: %{name}-rpm.patch
41 Patch1: %{name}-clock-status.patch
42 URL: http://dev.mysql.com/downloads/other/eventum/index.html
43 BuildRequires: sed >= 4.0
44 BuildRequires: rpmbuild(macros) >= 1.177
45 Requires: php >= 4.1.0
50 #Requires: apache-mod_dir
51 # conflict with non-confdir apache
52 Conflicts: apache1 < 1.3.33-1.1
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 %define _sysconfdir /etc/%{name}
56 %define _appdir %{_datadir}/%{name}
58 %define _apache1dir /etc/apache
59 %define _apache2dir /etc/httpd
62 Eventum is a user-friendly and flexible issue tracking system that can
63 be used by a support department to track incoming technical support
64 requests, or by a software development team to quickly organize tasks
65 and bugs. Eventum is used by the MySQL AB Technical Support team, and
66 has allowed us to dramatically improve our response times.
69 Summary: Eventum setup package.
70 Group: Applications/WWW
72 Requires: %{name} = %{epoch}:%{version}-%{release}
75 Install this package to configure initial Eventum installation. You
76 should uninstall this package when you're done, as it considered
77 insecure to keep the setup files in place.
80 %setup -q %{?_snap:-n %{name}-%{_snap}}
87 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{locks,templates_c}}
91 cp -a . $RPM_BUILD_ROOT%{_appdir}
93 > $RPM_BUILD_ROOT%{_appdir}/setup.conf.php
95 sed -i -e 's,/usr/local/bin/php,/usr/bin/php4,' $RPM_BUILD_ROOT%{_appdir}/misc/cli/eventum
97 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
100 rm -f $RPM_BUILD_ROOT%{_appdir}/{COPYING,ChangeLog,FAQ,INSTALL,README,UPGRADE}
101 rm -rf $RPM_BUILD_ROOT%{_appdir}/misc/upgrade
104 rm -rf $RPM_BUILD_ROOT
108 if [ -f %{_apache1dir}/apache.conf ]; then
109 ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
110 if [ -f /var/lock/subsys/apache ]; then
111 /etc/rc.d/init.d/apache restart 1>&2
115 if [ -d %{_apache2dir}/httpd.conf ]; then
116 ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
117 if [ -f /var/lock/subsys/httpd ]; then
118 /etc/rc.d/init.d/httpd restart 1>&2
122 # check if the package is configured.
123 if grep -q 'header("Location: setup/")' %{_appdir}/config.inc.php; then
124 %banner %{name} -e <<EOF
126 You haven't yet configured Eventum!
128 Install %{name}-setup and open up http://yourserver/eventum/
129 -- that will help you setup initial config.
131 when have configured Eventum, please uninstall the setup package,
132 so that %{name}-setup is able to secure your Eventum installation.
137 if [ -d %{_appdir}/setup ]; then
138 %banner %{name} -e <<EOF
140 If you have have configured Eventum, please uninstall the setup package,
141 so that %{name}-setup is able to secure your Eventum installation.
148 if [ "$1" = "0" ]; then
150 if [ -f %{_apache1dir}/apache.conf ]; then
151 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
152 if [ -f /var/lock/subsys/apache ]; then
153 /etc/rc.d/init.d/apache restart 1>&2
157 if [ -d %{_apache2dir}/httpd.conf ]; then
158 rm -f %{_apache1dir}/httpd.conf/99_%{name}.conf
159 if [ -f /var/lock/subsys/httpd ]; then
160 /etc/rc.d/init.d/httpd restart 1>&2
166 # RACE possible? chmod just in case
167 chmod 640 %{_appdir}/{config.inc,setup.conf}.php
168 chown http:root %{_appdir}/{config.inc,setup.conf}.php
171 if [ "$1" = "0" ]; then
172 # RACE condition possible?
173 chmod 640 %{_appdir}/{config.inc,setup.conf}.php
174 chown root:http %{_appdir}/{config.inc,setup.conf}.php
178 %defattr(644,root,root,755)
179 %doc ChangeLog FAQ INSTALL README UPGRADE misc/upgrade
181 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
184 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/config.inc.php
185 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/setup.conf.php
186 %{_appdir}/*[!cf].php
199 %dir %attr(750,http,root) %{_appdir}/locks
201 %dir %{_appdir}/include
202 %{_appdir}/include/customer
203 %{_appdir}/include/jpgraph
204 %{_appdir}/include/pear
205 %{_appdir}/include/Smarty
206 %{_appdir}/include/workflow
207 %{_appdir}/include/class.*
208 %{_appdir}/include/db_access.php
209 %{_appdir}/include/jsrsServer.inc.php
210 %attr(640,http,root) %{_appdir}/include/private_key.php
212 %dir %attr(731,root,http) %{_appdir}/logs
213 %attr(640,http,root) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/logs/*
215 %dir %attr(750,http,root) %{_appdir}/templates_c
218 %defattr(644,root,root,755)