2 # - where to put templates_c (templates cache dir)? /var/run/eventum? /var/run/php/eventum? /var/cache/eventum?
3 # - php5 is not tested, but not placing hard conflict on it, as it prevents php4 & php coinstallation
4 # - discard bundled packages (from INSTALL):
5 # - JpGraph 1.5.3 (last GPL version)
6 # - Smarty 2.3.0 (http://smarty.php.net)
8 # - dTree 2.0.5 (http://www.destroydrop.com/javascript/tree/)
9 # - dynCalendar.js (http://www.phpguru.org/dyncalendar.html)
10 # - overLIB 3.5.1 (http://www.bosrup.com/web/overlib/)
11 # - A few other small javascript libraries
12 # - Mail Queue Process, cron or separate package (misc/process_mail_queue.php)
13 # - Email Download (misc/download_emails.php)
14 # - Reminder System (misc/check_reminders.php)
15 # - Heartbeat Monitor (misc/monitor.php)
16 # - Email Routing Script (misc/route_emails.php)
17 # - Note Routing Script (misc/route_notes.php)
18 # - IRC Notification Bot (misc/irc/bot.php)
19 # - Command-line Interface (misc/cli/eventum)
22 #define _snap 20050114
25 %define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
27 %define _source http://mysql.wildyou.net/Downloads/%{name}/%{name}-%{version}.tar.gz
32 Summary: Eventum Issue / Bug Tracking System
35 Release: %{?_snap:0.%{_snap}.}%{_rel}
37 Group: Applications/WWW
39 # Source0-md5: 361c1355e46a6bbfa54e420964ec92cf
40 Source1: %{name}-apache.conf
41 Patch0: %{name}-rpm.patch
42 Patch1: %{name}-clock-status.patch
43 URL: http://dev.mysql.com/downloads/other/eventum/index.html
44 BuildRequires: sed >= 4.0
45 BuildRequires: rpmbuild(macros) >= 1.177
46 Requires: php >= 4.1.0
51 #Requires: apache-mod_dir
52 # conflict with non-confdir apache
53 Conflicts: apache1 < 1.3.33-1.1
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 %define _sysconfdir /etc/%{name}
57 %define _appdir %{_datadir}/%{name}
59 %define _apache1dir /etc/apache
60 %define _apache2dir /etc/httpd
63 Eventum is a user-friendly and flexible issue tracking system that can
64 be used by a support department to track incoming technical support
65 requests, or by a software development team to quickly organize tasks
66 and bugs. Eventum is used by the MySQL AB Technical Support team, and
67 has allowed us to dramatically improve our response times.
70 Summary: Eventum setup package.
71 Group: Applications/WWW
73 Requires: %{name} = %{epoch}:%{version}-%{release}
76 Install this package to configure initial Eventum installation. You
77 should uninstall this package when you're done, as it considered
78 insecure to keep the setup files in place.
81 %setup -q %{?_snap:-n %{name}-%{_snap}}
88 rm -rf $RPM_BUILD_ROOT
90 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{locks,templates_c},/var/log}
92 cp -a . $RPM_BUILD_ROOT%{_appdir}
94 > $RPM_BUILD_ROOT%{_appdir}/setup.conf.php
96 sed -i -e 's,/usr/local/bin/php,/usr/bin/php4,' $RPM_BUILD_ROOT%{_appdir}/misc/cli/eventum
98 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
101 mv $RPM_BUILD_ROOT%{_appdir}/{config.inc.php,setup.conf.php} $RPM_BUILD_ROOT%{_sysconfdir}
102 ln -s %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}
103 ln -s %{_sysconfdir}/setup.conf.php $RPM_BUILD_ROOT%{_appdir}
106 mv $RPM_BUILD_ROOT%{_appdir}/logs $RPM_BUILD_ROOT/var/log/%{name}
107 ln -s /var/log/%{name} $RPM_BUILD_ROOT%{_appdir}/logs
110 rm -f $RPM_BUILD_ROOT%{_appdir}/{COPYING,ChangeLog,FAQ,INSTALL,README,UPGRADE}
111 rm -rf $RPM_BUILD_ROOT%{_appdir}/{docs,misc/upgrade}
114 rm -rf $RPM_BUILD_ROOT
118 if [ -f %{_apache1dir}/apache.conf ]; then
119 ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
120 if [ -f /var/lock/subsys/apache ]; then
121 /etc/rc.d/init.d/apache restart 1>&2
125 if [ -d %{_apache2dir}/httpd.conf ]; then
126 ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
127 if [ -f /var/lock/subsys/httpd ]; then
128 /etc/rc.d/init.d/httpd restart 1>&2
132 # check if the package is configured.
133 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.inc.php; then
134 %banner %{name} -e <<EOF
136 You haven't yet configured Eventum!
138 Install %{name}-setup and open up http://yourserver/eventum/
139 -- that will help you setup initial config.
141 when have configured Eventum, please uninstall the setup package,
142 so that %{name}-setup is able to secure your Eventum installation.
147 if [ -d %{_appdir}/setup ]; then
148 %banner %{name} -e <<EOF
150 If you have have configured Eventum, please uninstall the setup package,
151 so that %{name}-setup is able to secure your Eventum installation.
158 if [ "$1" = "0" ]; then
160 if [ -f %{_apache1dir}/apache.conf ]; then
161 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
162 if [ -f /var/lock/subsys/apache ]; then
163 /etc/rc.d/init.d/apache restart 1>&2
167 if [ -d %{_apache2dir}/httpd.conf ]; then
168 rm -f %{_apache1dir}/httpd.conf/99_%{name}.conf
169 if [ -f /var/lock/subsys/httpd ]; then
170 /etc/rc.d/init.d/httpd restart 1>&2
176 # RACE possible? chmod just in case
177 chmod 640 %{_sysconfdir}/{config.inc,setup.conf}.php
178 chown http:root %{_sysconfdir}/{config.inc,setup.conf}.php
181 if [ "$1" = "0" ]; then
182 # RACE condition possible?
183 chmod 640 %{_sysconfdir}/{config.inc,setup.conf}.php
184 chown root:http %{_sysconfdir}/{config.inc,setup.conf}.php
188 %defattr(644,root,root,755)
189 %doc ChangeLog FAQ INSTALL README UPGRADE misc/upgrade docs/*
191 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
193 %dir %attr(731,root,http) /var/log/%{name}
194 %attr(640,http,root) %ghost /var/log/%{name}/*
209 %dir %attr(750,http,root) %{_appdir}/locks
211 %dir %{_appdir}/include
212 %{_appdir}/include/customer
213 %{_appdir}/include/jpgraph
214 %{_appdir}/include/pear
215 %{_appdir}/include/Smarty
216 %{_appdir}/include/workflow
217 %{_appdir}/include/class.*
218 %{_appdir}/include/db_access.php
219 %{_appdir}/include/jsrsServer.inc.php
220 %attr(640,http,root) %{_appdir}/include/private_key.php
222 %dir %attr(750,http,root) %{_appdir}/templates_c
225 %defattr(644,root,root,755)