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)
6 # - dTree 2.0.5 (http://www.destroydrop.com/javascript/tree/)
7 # - dynCalendar.js (http://www.phpguru.org/dyncalendar.html)
8 # - overLIB 3.5.1 (http://www.bosrup.com/web/overlib/)
9 # - A few other small javascript libraries
10 # - create eventum-router-qmail, eventum-router-postfix for -route-mails and -route-notes
11 # - need start-stop-daemon (from dpkg for now)
12 # - use eventum user for irc bot?
15 #define _snap 20050124
18 %define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
20 %define _source http://mysql.wildyou.net/Downloads/%{name}/%{name}-%{version}.tar.gz
25 Summary: Eventum Issue - a bug tracking system
26 Summary(pl): Eventum - system ¶ledzenia spraw/b³êdów
29 Release: %{?_snap:0.%{_snap}.}%{_rel}
31 Group: Applications/WWW
33 # Source0-md5: 361c1355e46a6bbfa54e420964ec92cf
34 Source1: %{name}-apache.conf
35 Source2: %{name}-mail-queue.cron
36 Source3: %{name}-mail-download.cron
37 Source4: %{name}-reminder.cron
38 Source5: %{name}-monitor.cron
39 Source6: %{name}-cvs.php
40 Source7: %{name}-irc.php
41 Source8: %{name}-irc.init
43 Patch0: %{name}-paths.patch
44 Patch1: %{name}-scm-encode.patch
45 Patch2: %{name}-cvs-config.patch
46 Patch3: %{name}-irc-config.patch
48 Patch10: %{name}-clock-status.patch
49 Patch11: %{name}-scm_checkin_associated.patch
50 Patch12: %{name}-mail-queue.tpl.patch
51 URL: http://dev.mysql.com/downloads/other/eventum/index.html
52 BuildRequires: rpmbuild(macros) >= 1.177
53 BuildRequires: sed >= 4.0
54 Requires: php >= 4.1.0
59 Requires: Smarty >= 2.6.2
60 Requires: %{name}-base = %{epoch}:%{version}-%{release}
61 #Requires: apache-mod_dir
62 # conflict with non-confdir apache
63 Conflicts: apache1 < 1.3.33-1.1
64 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66 %define _sysconfdir /etc/%{name}
67 %define _appdir %{_datadir}/%{name}
68 %define _smartyplugindir %{php_pear_dir}/Smarty/plugins
70 %define _apache1dir /etc/apache
71 %define _apache2dir /etc/httpd
74 Eventum is a user-friendly and flexible issue tracking system that can
75 be used by a support department to track incoming technical support
76 requests, or by a software development team to quickly organize tasks
77 and bugs. Eventum is used by the MySQL AB Technical Support team, and
78 has allowed us to dramatically improve our response times.
81 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
82 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
83 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
84 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
85 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
89 Summary: Eventum base package
90 Group: Applications/WWW
93 This package contains base directory structure for Eventum.
96 Summary: Eventum setup package
97 Summary(pl): Pakiet do wstêpnej konfiguracji Eventum
98 Group: Applications/WWW
99 PreReq: %{name} = %{epoch}:%{version}-%{release}
102 Install this package to configure initial Eventum installation. You
103 should uninstall this package when you're done, as it considered
104 insecure to keep the setup files in place.
106 %description setup -l pl
107 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
108 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
109 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
112 Summary: Eventum mail queue process
113 Summary(pl): Przetwarzanie kolejki poczty Eventum
114 Group: Applications/WWW
115 Requires: %{name} = %{epoch}:%{version}-%{release}
117 Requires: php4 >= 4.1.0
119 %description mail-queue
120 Beginning with the first release of Eventum, emails are not directly
121 sent out from the various scripts, but rather added to a mail queue
122 table that is processed by a cron job. If an email cannot be sent, it
123 will be marked as such in the mail queue log, and the cron job script
124 will re-try to send it again the next time it runs.
126 This package contains the cron job.
128 %description mail-queue -l pl
129 Od pierwszego wydania Eventum poczta nie jest wysy³ana bezpo¶rednio z
130 ró¿nych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
131 Je¶li poczta nie mo¿e byæ wys³ana, bêdzie odpowiednio oznaczona w logu
132 kolejki poczty, a skrypt z crona bêdzie próbowa³ wys³aæ j± ponownie
135 Ten pakiet zawiera zadanie dla crona.
137 %package mail-download
138 Summary: Eventum email download
139 Summary(pl): ¦ci±ganie poczty Eventum
140 Group: Applications/WWW
141 Requires: %{name} = %{epoch}:%{version}-%{release}
143 Requires: php4 >= 4.1.0
145 %description mail-download
146 In order for Eventum's email integration feature to work, you need to
147 setup a cron job to run the script every so often.
149 This package contains the cron job.
151 %description mail-download -l pl
152 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
153 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
156 Ten pakiet zawiera zadanie dla crona.
159 Summary: Eventum Reminder System
160 Summary(pl): System przypominania dla Eventum
161 Group: Applications/WWW
162 Requires: %{name} = %{epoch}:%{version}-%{release}
163 Requires: php4 >= 4.1.0
166 %description reminder
167 The reminder system was designed with the objective as serving as a
168 safe net for issues that need attention. Depending on what
169 configuration you create, you may have several reminders (or alerts)
170 be sent out whenever an issue needs attention, for whatever parameter
171 you may deem necessary.
173 This package contains the cron job.
175 %description reminder -l pl
176 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
177 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
178 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
179 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
182 Ten pakiet zawiera zadanie dla crona.
185 Summary: Eventum Heartbeat Monitor
186 Summary(pl): Monitor ¿ycia dla Eventum
187 Group: Applications/WWW
188 Requires: %{name} = %{epoch}:%{version}-%{release}
189 Requires: php4 >= 4.1.0
193 The heartbeat monitor is a feature designed for the administrator that
194 wants to be alerted whenever a common problem in Eventum is detected,
195 like the database server not being available anymore, or maybe when
196 the recommended permissions for certain configuration files are
199 Please note that before running the heartbeat monitor, you may need to
200 customize some of the checks to be appropriate for your own system,
201 particularly the permission and file checks on
202 Monitor::checkConfiguration().
204 This package contains the cron job.
206 %description monitor -l pl
207 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
208 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
209 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
210 do plików konfiguracyjnych.
212 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
213 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
214 testów uprawnieñ i plików w Monitor::checkConfiguration().
216 Ten pakiet zawiera zadanie dla crona.
218 %package route-emails
219 Summary: Eventum Email Routing
220 Summary(pl): Przekazywanie poczty dla Eventum
221 Group: Applications/WWW
222 Requires: %{name} = %{epoch}:%{version}-%{release}
223 Requires: php4 >= 4.1.0
224 #Requires: eventum-router
226 %description route-emails
227 The email routing feature is used to automatically associate a thread
228 of emails into an Eventum issue. By setting up qmail (or even postfix)
229 to deliver emails sent to a specific address (usually
230 issue-<number>@<domain>) to the above script, users are able to use
231 their email clients to reply to emails coming from Eventum, and those
232 replies will be automatically associated with the issue and
233 broadcasted to the entire notification list.
235 %description route-emails -l pl
236 Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
237 w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
238 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
239 issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
240 u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
241 Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
242 rozprowadzane do ca³ej listy og³oszeniowej.
245 Summary: Eventum Note Routing
246 Summary(pl): Przekazywanie notatek dla Eventum
247 Group: Applications/WWW
248 Requires: %{name} = %{epoch}:%{version}-%{release}
249 Requires: php4 >= 4.1.0
250 #Requires: eventum-router
252 %description route-notes
253 The note routing feature is used to automatically associate a thread
254 of notes into an Eventum issue. By setting up qmail (or even postfix)
255 to deliver emails sent to a specific address (usually
256 note-<number>@<domain>) to the above script, users are able to use
257 their email clients to reply to internal notes coming from Eventum,
258 and those replies will be automatically associated with the issue and
259 broadcasted to the notification list staff members.
261 %description route-notes -l pl
262 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
263 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
264 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
265 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
266 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
267 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
268 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
271 Summary: Eventum IRC Notification Bot
272 Summary(pl): IRC-owy bot powiadamiaj±cy dla Eventum
273 Group: Applications/WWW
274 Requires: %{name} = %{epoch}:%{version}-%{release}
275 Requires: php4 >= 4.1.0
276 # FIXME just need start-stop-daemon
280 The IRC notification bot is a nice feature for remote teams that want
281 to handle issues and want to have a quick and easy way to get simple
282 notifications. Right now the bot notifies of the following actions:
285 - Issues that got their assignment list changed
287 NOTE: You will need to manually edit the bot.php script to set your
288 appropriate preferences, like IRC server and channel that the bot
291 %description irc -l pl
292 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
293 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
294 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
295 nastêpuj±cych zdarzeniach:
297 - zablokowanych listach
298 - sprawach, dla których zmieni³a siê lista powi±zañ
300 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
301 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
304 Summary: Eventum command-line interface
305 Summary(pl): Interfejs linii poleceñ dla Eventum
306 Group: Applications/WWW
307 Requires: %{name} = %{epoch}:%{version}-%{release}
308 Requires: php4 >= 4.1.0
311 #Requires: php4-openssl
314 The Eventum command-line interface allows you to access most of the
315 features of the web interface straight from your command shell.
317 %description cli -l pl
318 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
319 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
322 Summary: Eventum SCM integration
323 Summary(pl): Integracja SCM dla Eventum
324 Group: Applications/WWW
325 Requires: %{name}-base = %{epoch}:%{version}-%{release}
326 Requires: php4 >= 4.1.0
329 This feature allows your software development teams to integrate your
330 Source Control Management system with your Issue Tracking System.
332 The integration is implemented in such a way that it will be forward
333 compatible with pretty much any SCM system, such as CVS.
336 /eventum/help.php?topic=scm_integration_installation .
338 %description scm -l pl
339 Ten pakiet pozwala zespo³om programistów na integracjê systemu
340 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
343 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
344 prawie ka¿dym systemem SCM, jak np. CVS.
346 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
347 /eventum/help.php?topic=scm_integration_installation .
350 %setup -q %{?_snap:-n %{name}-%{_snap}}
363 rm -rf $RPM_BUILD_ROOT
364 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_appdir}} \
365 $RPM_BUILD_ROOT{/etc/{rc.d/init.d,cron.d},/var/log} \
366 $RPM_BUILD_ROOT{/var/run/eventum,/var/cache/eventum}
368 rm -f eventumrc %{name}-scm
369 cp -a . $RPM_BUILD_ROOT%{_appdir}
370 # argsh! say no words
371 find $RPM_BUILD_ROOT%{_appdir} -type f -print0 | xargs -0 sed -i -e 's,
374 $,,' misc/cli/eventumrc_example > eventumrc
376 > $RPM_BUILD_ROOT%{_appdir}/setup.conf.php
378 sed -i -e 's,/usr/local/bin/php,/usr/bin/php4,' $RPM_BUILD_ROOT%{_appdir}/misc/cli/eventum
379 echo '#!/usr/bin/php4 -q' > %{name}-scm
380 cat $RPM_BUILD_ROOT%{_appdir}/misc/scm/process_cvs_commits.php >> %{name}-scm
382 # change private key, so we can easily grep
384 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
385 ' $RPM_BUILD_ROOT%{_appdir}/include/private_key.php
387 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
388 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
389 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
390 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
391 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
392 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
393 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
394 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
397 mv $RPM_BUILD_ROOT%{_appdir}/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/config.php
398 mv $RPM_BUILD_ROOT%{_appdir}/setup.conf.php $RPM_BUILD_ROOT%{_sysconfdir}/setup.php
399 mv $RPM_BUILD_ROOT%{_appdir}/include/private_key.php $RPM_BUILD_ROOT%{_sysconfdir}
400 mv $RPM_BUILD_ROOT%{_appdir}/misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
401 ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/config.inc.php
402 ln -s %{_sysconfdir}/setup.php $RPM_BUILD_ROOT%{_appdir}/setup.conf.php
403 ln -s %{_sysconfdir}/private_key.php $RPM_BUILD_ROOT%{_appdir}/include/private_key.php
406 mv $RPM_BUILD_ROOT%{_appdir}/logs $RPM_BUILD_ROOT/var/log/%{name}
409 rm -f $RPM_BUILD_ROOT%{_appdir}/{COPYING,ChangeLog,FAQ,INSTALL,README,UPGRADE}
410 rm -rf $RPM_BUILD_ROOT%{_appdir}/{docs,misc/upgrade}
411 # some sample, not used in eventum
412 rm -rf $RPM_BUILD_ROOT%{_appdir}/rpc/xmlrpc_client.php
415 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
416 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
417 # These plugins are not in Smarty package (Smarty-2.6.2-3)
418 cp -a include/Smarty/plugins/function.{calendar,get_display_style,get_innerhtml,get_textarea_size}.php $RPM_BUILD_ROOT%{_smartyplugindir}
421 mv $RPM_BUILD_ROOT%{_appdir}/misc/cli/eventum $RPM_BUILD_ROOT%{_bindir}
422 rm -f $RPM_BUILD_ROOT%{_appdir}/misc/{cli/eventumrc_example,scm/process_cvs_commits.php}
423 install %{name}-scm $RPM_BUILD_ROOT%{_bindir}/%{name}-scm
426 rm -rf $RPM_BUILD_ROOT
430 if [ -f %{_apache1dir}/apache.conf ]; then
431 ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
432 if [ -f /var/lock/subsys/apache ]; then
433 /etc/rc.d/init.d/apache restart 1>&2
437 if [ -d %{_apache2dir}/httpd.conf ]; then
438 ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
439 if [ -f /var/lock/subsys/httpd ]; then
440 /etc/rc.d/init.d/httpd restart 1>&2
444 # check if the package is configured.
445 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
446 %banner %{name} -e <<EOF
448 You haven't yet configured Eventum!
450 Install %{name}-setup and open up http://yourserver/eventum/
451 -- that will help you setup initial config.
453 when have configured Eventum, please uninstall the setup package,
454 so that %{name}-setup is able to secure your Eventum installation.
459 elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
460 %banner %{name} -e <<EOF
462 You have default private key installed!
464 Install %{name}-setup and open up http://yourserver/eventum/setup/
465 -- that will help you setup initial config.
467 when have configured Eventum, please uninstall the setup package,
468 so that %{name}-setup is able to secure your Eventum installation.
471 elif [ -d %{_appdir}/setup ]; then
472 %banner %{name} -e <<EOF
474 If you have have configured Eventum, please uninstall the setup package,
475 so that %{name}-setup is able to secure your Eventum installation.
482 if [ "$1" = "0" ]; then
484 if [ -f %{_apache1dir}/apache.conf ]; then
485 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
486 if [ -f /var/lock/subsys/apache ]; then
487 /etc/rc.d/init.d/apache restart 1>&2
491 if [ -d %{_apache2dir}/httpd.conf ]; then
492 rm -f %{_apache1dir}/httpd.conf/99_%{name}.conf
493 if [ -f /var/lock/subsys/httpd ]; then
494 /etc/rc.d/init.d/httpd restart 1>&2
500 chmod 660 %{_sysconfdir}/{config,private_key}.php
501 chown root:http %{_sysconfdir}/{config,private_key}.php
504 if [ "$1" = "0" ]; then
505 chmod 640 %{_sysconfdir}/{config,private_key}.php
506 chown root:http %{_sysconfdir}/{config,private_key}.php
510 %defattr(644,root,root,755)
511 %doc ChangeLog FAQ INSTALL README UPGRADE misc/upgrade docs/* rpc/xmlrpc_client.php
512 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
513 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
514 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
515 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
520 %dir %attr(731,root,http) /var/log/%{name}
521 %attr(620,root,http) %ghost /var/log/%{name}/*
523 %{_smartyplugindir}/*
535 %dir %{_appdir}/include
536 %{_appdir}/include/customer
537 %{_appdir}/include/jpgraph
538 %{_appdir}/include/pear
539 %{_appdir}/include/workflow
540 %{_appdir}/include/*.php
542 %dir %attr(730,root,http) /var/run/%{name}
543 %dir %attr(730,root,http) /var/cache/%{name}
545 %{_appdir}/misc/blank.html
548 %defattr(644,root,root,755)
549 %attr(751,root,root) %dir %{_sysconfdir}
552 %defattr(644,root,root,755)
556 %defattr(644,root,root,755)
557 %{_appdir}/misc/process_mail_queue.php
558 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
561 %defattr(644,root,root,755)
562 %{_appdir}/misc/download_emails.php
563 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
566 %defattr(644,root,root,755)
567 %{_appdir}/misc/check_reminders.php
568 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
571 %defattr(644,root,root,755)
572 %{_appdir}/misc/monitor.php
573 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
576 %defattr(644,root,root,755)
577 %{_appdir}/misc/route_emails.php
580 %defattr(644,root,root,755)
581 %{_appdir}/misc/route_drafts.php
582 %{_appdir}/misc/route_notes.php
585 %defattr(644,root,root,755)
586 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
588 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
591 %defattr(644,root,root,755)
593 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cli.php
594 %attr(755,root,root) %{_bindir}/%{name}
595 %dir %{_appdir}/misc/cli
596 %{_appdir}/misc/cli/include
599 %defattr(644,root,root,755)
600 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
601 # FIXME: not sure about this naming.
602 %attr(755,root,root) %{_bindir}/%{name}-scm