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 # - Reminder System (misc/check_reminders.php)
13 # - Heartbeat Monitor (misc/monitor.php)
14 # - Email Routing Script (misc/route_emails.php)
15 # - Note Routing Script (misc/route_notes.php)
16 # - IRC Notification Bot (misc/irc/bot.php)
17 # - Command-line Interface (misc/cli/eventum)
20 #define _snap 20050115
23 %define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
25 %define _source http://mysql.wildyou.net/Downloads/%{name}/%{name}-%{version}.tar.gz
30 Summary: Eventum Issue / Bug Tracking System
31 Summary(pl): Eventum - system ¶ledzenia spraw/b³êdów
34 Release: %{?_snap:0.%{_snap}.}%{_rel}
36 Group: Applications/WWW
38 # Source0-md5: 361c1355e46a6bbfa54e420964ec92cf
39 Source1: %{name}-apache.conf
40 Source2: %{name}-mail-queue.sh
41 Source3: %{name}-mail-download.sh
42 Patch0: %{name}-rpm.patch
43 Patch1: %{name}-clock-status.patch
44 URL: http://dev.mysql.com/downloads/other/eventum/index.html
45 BuildRequires: rpmbuild(macros) >= 1.177
46 BuildRequires: sed >= 4.0
47 Requires: php >= 4.1.0
52 #Requires: apache-mod_dir
53 # conflict with non-confdir apache
54 Conflicts: apache1 < 1.3.33-1.1
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 %define _sysconfdir /etc/%{name}
58 %define _appdir %{_datadir}/%{name}
60 %define _apache1dir /etc/apache
61 %define _apache2dir /etc/httpd
64 Eventum is a user-friendly and flexible issue tracking system that can
65 be used by a support department to track incoming technical support
66 requests, or by a software development team to quickly organize tasks
67 and bugs. Eventum is used by the MySQL AB Technical Support team, and
68 has allowed us to dramatically improve our response times.
71 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
72 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
73 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
74 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
75 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
79 Summary: Eventum setup package
80 Summary(pl): Pakiet do wstêpnej konfiguracji Eventum
81 Group: Applications/WWW
82 PreReq: %{name} = %{epoch}:%{version}-%{release}
85 Install this package to configure initial Eventum installation. You
86 should uninstall this package when you're done, as it considered
87 insecure to keep the setup files in place.
89 %description setup -l pl
90 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
91 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
92 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
95 Summary: Eventum Mail Queue Process
96 Group: Applications/WWW
97 Requires: %{name} = %{epoch}:%{version}-%{release}
98 Requires: php4 >= 4.1.0
101 %description mail-queue
102 Beginning with the first release of Eventum, emails are not directly
103 sent out from the various scripts, but rather added to a mail queue
104 table that is processed by a cron job. If an email cannot be sent, it
105 will be marked as such in the mail queue log, and the cron job script
106 will re-try to send it again the next time it runs.
108 This package contains the cron job.
110 %package mail-download
111 Summary: Eventum Email Download
112 Group: Applications/WWW
113 Requires: %{name} = %{epoch}:%{version}-%{release}
114 Requires: php4 >= 4.1.0
117 %description mail-download
118 In order for Eventum's email integration feature to work, you need to
119 setup a cron job to run the script every so often.
121 This package contains the cron job.
124 %setup -q %{?_snap:-n %{name}-%{_snap}}
131 rm -rf $RPM_BUILD_ROOT
132 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,%{_appdir}/{locks,templates_c},/var/log}
134 cp -a . $RPM_BUILD_ROOT%{_appdir}
136 > $RPM_BUILD_ROOT%{_appdir}/setup.conf.php
138 sed -i -e 's,/usr/local/bin/php,/usr/bin/php4,' $RPM_BUILD_ROOT%{_appdir}/misc/cli/eventum
140 # change private key, so we can easily grep
142 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
143 ' $RPM_BUILD_ROOT%{_appdir}/include/private_key.php
145 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
146 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
147 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
150 mv $RPM_BUILD_ROOT%{_appdir}/{config.inc.php,setup.conf.php} $RPM_BUILD_ROOT%{_sysconfdir}
151 ln -s %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}
152 ln -s %{_sysconfdir}/setup.conf.php $RPM_BUILD_ROOT%{_appdir}
153 mv $RPM_BUILD_ROOT%{_appdir}/include/private_key.php $RPM_BUILD_ROOT%{_sysconfdir}
154 ln -s %{_sysconfdir}/private_key.php $RPM_BUILD_ROOT%{_appdir}/include/private_key.php
157 mv $RPM_BUILD_ROOT%{_appdir}/logs $RPM_BUILD_ROOT/var/log/%{name}
158 ln -s /var/log/%{name} $RPM_BUILD_ROOT%{_appdir}/logs
161 rm -f $RPM_BUILD_ROOT%{_appdir}/{COPYING,ChangeLog,FAQ,INSTALL,README,UPGRADE}
162 rm -rf $RPM_BUILD_ROOT%{_appdir}/{docs,misc/upgrade}
165 rm -rf $RPM_BUILD_ROOT
169 if [ -f %{_apache1dir}/apache.conf ]; then
170 ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
171 if [ -f /var/lock/subsys/apache ]; then
172 /etc/rc.d/init.d/apache restart 1>&2
176 if [ -d %{_apache2dir}/httpd.conf ]; then
177 ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
178 if [ -f /var/lock/subsys/httpd ]; then
179 /etc/rc.d/init.d/httpd restart 1>&2
183 # check if the package is configured.
184 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.inc.php; then
185 %banner %{name} -e <<EOF
187 You haven't yet configured Eventum!
189 Install %{name}-setup and open up http://yourserver/eventum/
190 -- that will help you setup initial config.
192 when have configured Eventum, please uninstall the setup package,
193 so that %{name}-setup is able to secure your Eventum installation.
198 elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
199 %banner %{name} -e <<EOF
201 You have default private key installed!
203 Install %{name}-setup and open up http://yourserver/eventum/setup/
204 -- that will help you setup initial config.
206 when have configured Eventum, please uninstall the setup package,
207 so that %{name}-setup is able to secure your Eventum installation.
210 elif [ -d %{_appdir}/setup ]; then
211 %banner %{name} -e <<EOF
213 If you have have configured Eventum, please uninstall the setup package,
214 so that %{name}-setup is able to secure your Eventum installation.
221 if [ "$1" = "0" ]; then
223 if [ -f %{_apache1dir}/apache.conf ]; then
224 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
225 if [ -f /var/lock/subsys/apache ]; then
226 /etc/rc.d/init.d/apache restart 1>&2
230 if [ -d %{_apache2dir}/httpd.conf ]; then
231 rm -f %{_apache1dir}/httpd.conf/99_%{name}.conf
232 if [ -f /var/lock/subsys/httpd ]; then
233 /etc/rc.d/init.d/httpd restart 1>&2
239 chmod 660 %{_sysconfdir}/{config.inc,setup.conf,private_key}.php
240 chown root:http %{_sysconfdir}/{config.inc,setup.conf,private_key}.php
243 if [ "$1" = "0" ]; then
244 chmod 640 %{_sysconfdir}/{config.inc,setup.conf,private_key}.php
245 chown root:http %{_sysconfdir}/{config.inc,setup.conf,private_key}.php
249 %defattr(644,root,root,755)
250 %doc ChangeLog FAQ INSTALL README UPGRADE misc/upgrade docs/*
251 %attr(751,root,root) %dir %{_sysconfdir}
252 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
254 %dir %attr(731,root,http) /var/log/%{name}
255 %attr(620,root,http) %ghost /var/log/%{name}/*
269 %dir %attr(730,root,http) %{_appdir}/locks
271 %dir %{_appdir}/include
272 %{_appdir}/include/customer
273 %{_appdir}/include/jpgraph
274 %{_appdir}/include/pear
275 %{_appdir}/include/Smarty
276 %{_appdir}/include/workflow
277 %{_appdir}/include/*.php
279 %dir %attr(730,root,http) %{_appdir}/templates_c
285 %{_appdir}/misc/blank.html
286 %{_appdir}/misc/check_reminders.php
287 %{_appdir}/misc/monitor.php
288 %{_appdir}/misc/route_drafts.php
289 %{_appdir}/misc/route_emails.php
290 %{_appdir}/misc/route_notes.php
293 %defattr(644,root,root,755)
297 %defattr(644,root,root,755)
298 %{_appdir}/misc/process_mail_queue.php
299 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
302 %defattr(644,root,root,755)
303 %{_appdir}/misc/download_emails.php
304 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download