]> git.pld-linux.org Git - packages/eventum.git/blob - eventum.spec
- pl for new subpackages
[packages/eventum.git] / eventum.spec
1 # TODO
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)
7 #  - PEAR packages
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 # - Command-line Interface (misc/cli/eventum)
13 # - eventum-router-qmail, eventum-router-postfix for -route-mails and -route-notes
14 # - need start-stop-daemon (dpkg for now)
15
16 # snapshot: DATE
17 #define _snap 20050117
18
19 %if 0%{?_snap}
20 %define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
21 %else
22 %define _source http://mysql.wildyou.net/Downloads/%{name}/%{name}-%{version}.tar.gz
23 %endif
24
25 %define _rel 1.74
26
27 Summary:        Eventum Issue - a bug tracking system
28 Summary(pl):    Eventum - system ¶ledzenia spraw/b³êdów
29 Name:           eventum
30 Version:        1.4
31 Release:        %{?_snap:0.%{_snap}.}%{_rel}
32 License:        GPL
33 Group:          Applications/WWW
34 Source0:        %{_source}
35 # Source0-md5:  361c1355e46a6bbfa54e420964ec92cf
36 Source1:        %{name}-apache.conf
37 Source2:        %{name}-mail-queue.cron
38 Source3:        %{name}-mail-download.cron
39 Source4:        %{name}-reminder.cron
40 Source5:        %{name}-monitor.cron
41 Source6:        %{name}-cvs.php
42 Source7:        %{name}-irc.php
43 Source8:        %{name}-irc.init
44 Patch0:         %{name}-rpm.patch
45 Patch1:         %{name}-clock-status.patch
46 Patch2:         %{name}-scm-encode.patch
47 Patch3:         %{name}-cvs-config.patch
48 Patch4:         %{name}-irc-config.patch
49 URL:            http://dev.mysql.com/downloads/other/eventum/index.html
50 BuildRequires:  rpmbuild(macros) >= 1.177
51 BuildRequires:  sed >= 4.0
52 Requires:       php >= 4.1.0
53 Requires:       php-gd
54 Requires:       php-imap
55 Requires:       php-mysql
56 Requires:       php-pcre
57 #Requires:      apache-mod_dir
58 # conflict with non-confdir apache
59 Conflicts:      apache1 < 1.3.33-1.1
60 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62 %define         _sysconfdir     /etc/%{name}
63 %define         _appdir %{_datadir}/%{name}
64
65 %define         _apache1dir     /etc/apache
66 %define         _apache2dir     /etc/httpd
67
68 %description
69 Eventum is a user-friendly and flexible issue tracking system that can
70 be used by a support department to track incoming technical support
71 requests, or by a software development team to quickly organize tasks
72 and bugs. Eventum is used by the MySQL AB Technical Support team, and
73 has allowed us to dramatically improve our response times.
74
75 %description -l pl
76 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
77 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
78 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
79 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
80 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
81 reakcji.
82
83 %package setup
84 Summary:        Eventum setup package
85 Summary(pl):    Pakiet do wstêpnej konfiguracji Eventum
86 Group:          Applications/WWW
87 PreReq:         %{name} = %{epoch}:%{version}-%{release}
88
89 %description setup
90 Install this package to configure initial Eventum installation. You
91 should uninstall this package when you're done, as it considered
92 insecure to keep the setup files in place.
93
94 %description setup -l pl
95 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
96 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
97 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
98
99 %package mail-queue
100 Summary:        Eventum mail queue process
101 Summary(pl):    Przetwarzanie kolejki poczty Eventum
102 Group:          Applications/WWW
103 Requires:       %{name} = %{epoch}:%{version}-%{release}
104 Requires:       crondaemon
105 Requires:       php4 >= 4.1.0
106
107 %description mail-queue
108 Beginning with the first release of Eventum, emails are not directly
109 sent out from the various scripts, but rather added to a mail queue
110 table that is processed by a cron job. If an email cannot be sent, it
111 will be marked as such in the mail queue log, and the cron job script
112 will re-try to send it again the next time it runs.
113
114 This package contains the cron job.
115
116 %description mail-queue -l pl
117 Od pierwszego wydania Eventum poczta nie jest wysy³ana bezpo¶rednio z
118 ró¿nych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
119 Je¶li poczta nie mo¿e byæ wys³ana, bêdzie odpowiednio oznaczona w logu
120 kolejki poczty, a skrypt z crona bêdzie próbowa³ wys³aæ j± ponownie
121 nastêpnym razem.
122
123 Ten pakiet zawiera zadanie dla crona.
124
125 %package mail-download
126 Summary:        Eventum email download
127 Summary(pl):    ¦ci±ganie poczty Eventum
128 Group:          Applications/WWW
129 Requires:       %{name} = %{epoch}:%{version}-%{release}
130 Requires:       crondaemon
131 Requires:       php4 >= 4.1.0
132
133 %description mail-download
134 In order for Eventum's email integration feature to work, you need to
135 setup a cron job to run the script every so often.
136
137 This package contains the cron job.
138
139 %description mail-download -l pl
140 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
141 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
142 czêsto.
143
144 Ten pakiet zawiera zadanie dla crona.
145
146 %package reminder
147 Summary:        Eventum Reminder System
148 Summary(pl):    System przypominania dla Eventum
149 Group:          Applications/WWW
150 Requires:       %{name} = %{epoch}:%{version}-%{release}
151 Requires:       php4 >= 4.1.0
152 Requires:       crondaemon
153
154 %description reminder
155 The reminder system was designed with the objective as serving as a
156 safe net for issues that need attention. Depending on what
157 configuration you create, you may have several reminders (or alerts)
158 be sent out whenever an issue needs attention, for whatever parameter
159 you may deem necessary.
160
161 This package contains the cron job.
162
163 %description reminder -l pl
164 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
165 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
166 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
167 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
168 uwa¿aæ za potrzebny.
169
170 Ten pakiet zawiera zadanie dla crona.
171
172 %package monitor
173 Summary:        Eventum Heartbeat Monitor
174 Summary(pl):    Monitor ¿ycia dla Eventum
175 Group:          Applications/WWW
176 Requires:       %{name} = %{epoch}:%{version}-%{release}
177 Requires:       php4 >= 4.1.0
178 Requires:       crondaemon
179
180 %description monitor
181 The heartbeat monitor is a feature designed for the administrator that
182 wants to be alerted whenever a common problem in Eventum is detected,
183 like the database server not being available anymore, or maybe when
184 the recommended permissions for certain configuration files are
185 changed.
186
187 Please note that before running the heartbeat monitor, you may need to
188 customize some of the checks to be appropriate for your own system,
189 particularly the permission and file checks on
190 Monitor::checkConfiguration().
191
192 This package contains the cron job.
193
194 %description monitor -l pl
195 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
196 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
197 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
198 do plików konfiguracyjnych.
199
200 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
201 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
202 testów uprawnieñ i plików w Monitor::checkConfiguration().
203
204 Ten pakiet zawiera zadanie dla crona.
205
206 %package route-emails
207 Summary:        Eventum Email Routing
208 Summary(pl):    Przekazywanie poczty dla Eventum
209 Group:          Applications/WWW
210 Requires:       %{name} = %{epoch}:%{version}-%{release}
211 Requires:       php4 >= 4.1.0
212 #Requires:      eventum-router
213
214 %description route-emails
215 The email routing feature is used to automatically associate a thread
216 of emails into an Eventum issue. By setting up qmail (or even postfix)
217 to deliver emails sent to a specific address (usually
218 issue-<number>@<domain>) to the above script, users are able to use
219 their email clients to reply to emails coming from Eventum, and those
220 replies will be automatically associated with the issue and
221 broadcasted to the entire notification list.
222
223 %description route-emails -l pl
224 Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
225 w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
226 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
227 issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
228 u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
229 Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
230 rozprowadzane do ca³ej listy og³oszeniowej.
231
232 %package route-notes
233 Summary:        Eventum Note Routing
234 Summary(pl):    Przekazywanie notatek dla Eventum
235 Group:          Applications/WWW
236 Requires:       %{name} = %{epoch}:%{version}-%{release}
237 Requires:       php4 >= 4.1.0
238 #Requires:      eventum-router
239
240 %description route-notes
241 The note routing feature is used to automatically associate a thread
242 of notes into an Eventum issue. By setting up qmail (or even postfix)
243 to deliver emails sent to a specific address (usually
244 note-<number>@<domain>) to the above script, users are able to use
245 their email clients to reply to internal notes coming from Eventum,
246 and those replies will be automatically associated with the issue and
247 broadcasted to the notification list staff members.
248
249 %description route-notes -l pl
250 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
251 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
252 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
253 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
254 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
255 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
256 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
257
258 %package irc
259 Summary:        Eventum IRC Notification Bot
260 Summary(pl):    IRC-owy bot powiadamiaj±cy dla Eventum
261 Group:          Applications/WWW
262 Requires:       %{name} = %{epoch}:%{version}-%{release}
263 Requires:       php4 >= 4.1.0
264 # FIXME just need start-stop-daemon
265 Requires:       dpkg
266
267 %description irc
268 The IRC notification bot is a nice feature for remote teams that want
269 to handle issues and want to have a quick and easy way to get simple
270 notifications. Right now the bot notifies of the following actions:
271 - New Issues
272 - Blocked emails
273 - Issues that got their assignment list changed
274
275 NOTE: You will need to manually edit the bot.php script to set your
276 appropriate preferences, like IRC server and channel that the bot
277 should join.
278
279 %description irc -l pl
280 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
281 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
282 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
283 nastêpuj±cych zdarzeniach:
284 - nowych sprawach
285 - zablokowanych listach
286 - sprawach, dla których zmieni³a siê lista powi±zañ
287
288 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
289 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
290
291 %package scm
292 Summary:        Eventum SCM integration
293 Summary(pl):    Integracja SCM dla Eventum
294 Group:          Applications/WWW
295 Requires:       %{name} = %{epoch}:%{version}-%{release}
296 Requires:       php4 >= 4.1.0
297
298 %description scm
299 This feature allows your software development teams to integrate your
300 Source Control Management system with your Issue Tracking System.
301
302 The integration is implemented in such a way that it will be forward
303 compatible with pretty much any SCM system, such as CVS.
304
305 For installation see
306 /eventum/help.php?topic=scm_integration_installation .
307
308 %description scm -l pl
309 Ten pakiet pozwala zespo³om programistów na integracjê systemu
310 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
311 ¶ledzenia spraw.
312
313 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
314 prawie ka¿dym systemem SCM, jak np. CVS.
315
316 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
317 /eventum/help.php?topic=scm_integration_installation .
318
319 %prep
320 %setup -q %{?_snap:-n %{name}-%{_snap}}
321 %patch0 -p1
322 %patch1 -p1
323 %patch2 -p1
324 %patch3 -p1
325 %patch4 -p1
326
327 %build
328
329 %install
330 rm -rf $RPM_BUILD_ROOT
331 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,cron.d},%{_appdir}/{locks,templates_c},/var/log}
332
333 cp -a . $RPM_BUILD_ROOT%{_appdir}
334
335 > $RPM_BUILD_ROOT%{_appdir}/setup.conf.php
336
337 sed -i -e 's,/usr/local/bin/php,/usr/bin/php4,' $RPM_BUILD_ROOT%{_appdir}/misc/cli/eventum
338
339 # change private key, so we can easily grep
340 sed -i -e '
341 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
342 ' $RPM_BUILD_ROOT%{_appdir}/include/private_key.php
343
344 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
345 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
346 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
347 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
348 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
349 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
350 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
351 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
352
353 # in conf
354 mv $RPM_BUILD_ROOT%{_appdir}/{config.inc.php,setup.conf.php} $RPM_BUILD_ROOT%{_sysconfdir}
355 ln -s %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}
356 ln -s %{_sysconfdir}/setup.conf.php $RPM_BUILD_ROOT%{_appdir}
357 mv $RPM_BUILD_ROOT%{_appdir}/include/private_key.php $RPM_BUILD_ROOT%{_sysconfdir}
358 ln -s %{_sysconfdir}/private_key.php $RPM_BUILD_ROOT%{_appdir}/include/private_key.php
359
360 # log directory
361 mv $RPM_BUILD_ROOT%{_appdir}/logs $RPM_BUILD_ROOT/var/log/%{name}
362 ln -s /var/log/%{name} $RPM_BUILD_ROOT%{_appdir}/logs
363
364 # in doc
365 rm -f $RPM_BUILD_ROOT%{_appdir}/{COPYING,ChangeLog,FAQ,INSTALL,README,UPGRADE}
366 rm -rf $RPM_BUILD_ROOT%{_appdir}/{docs,misc/upgrade}
367
368 %clean
369 rm -rf $RPM_BUILD_ROOT
370
371 %post
372 # apache1
373 if [ -f %{_apache1dir}/apache.conf ]; then
374         ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
375         if [ -f /var/lock/subsys/apache ]; then
376                 /etc/rc.d/init.d/apache restart 1>&2
377         fi
378 fi
379 # apache2
380 if [ -d %{_apache2dir}/httpd.conf ]; then
381         ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
382         if [ -f /var/lock/subsys/httpd ]; then
383                 /etc/rc.d/init.d/httpd restart 1>&2
384         fi
385 fi
386
387 # check if the package is configured.
388 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.inc.php; then
389 %banner %{name} -e <<EOF
390
391 You haven't yet configured Eventum!
392
393 Install %{name}-setup and open up http://yourserver/eventum/
394 -- that will help you setup initial config.
395
396 when have configured Eventum, please uninstall the setup package,
397 so that %{name}-setup is able to secure your Eventum installation.
398
399 EOF
400 #' vim stupidity.
401
402 elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
403 %banner %{name} -e <<EOF
404
405 You have default private key installed!
406
407 Install %{name}-setup and open up http://yourserver/eventum/setup/
408 -- that will help you setup initial config.
409
410 when have configured Eventum, please uninstall the setup package,
411 so that %{name}-setup is able to secure your Eventum installation.
412
413 EOF
414         elif [ -d %{_appdir}/setup ]; then
415 %banner %{name} -e <<EOF
416
417 If you have have configured Eventum, please uninstall the setup package,
418 so that %{name}-setup is able to secure your Eventum installation.
419
420 EOF
421 fi
422
423
424 %preun
425 if [ "$1" = "0" ]; then
426         # apache1
427         if [ -f %{_apache1dir}/apache.conf ]; then
428                 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
429                 if [ -f /var/lock/subsys/apache ]; then
430                         /etc/rc.d/init.d/apache restart 1>&2
431                 fi
432         fi
433         # apache2
434         if [ -d %{_apache2dir}/httpd.conf ]; then
435                 rm -f %{_apache1dir}/httpd.conf/99_%{name}.conf
436                 if [ -f /var/lock/subsys/httpd ]; then
437                         /etc/rc.d/init.d/httpd restart 1>&2
438                 fi
439         fi
440 fi
441
442 %post setup
443 chmod 660 %{_sysconfdir}/{config.inc,private_key}.php
444 chown root:http %{_sysconfdir}/{config.inc,private_key}.php
445
446 %postun setup
447 if [ "$1" = "0" ]; then
448         chmod 640 %{_sysconfdir}/{config.inc,private_key}.php
449         chown root:http %{_sysconfdir}/{config.inc,private_key}.php
450 fi
451
452 %files
453 %defattr(644,root,root,755)
454 %doc ChangeLog FAQ INSTALL README UPGRADE misc/upgrade docs/*
455 %attr(751,root,root) %dir %{_sysconfdir}
456 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
457 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.inc.php
458 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
459 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.conf.php
460
461 %dir %attr(731,root,http) /var/log/%{name}
462 %attr(620,root,http) %ghost /var/log/%{name}/*
463
464 %dir %{_appdir}
465 %{_appdir}/*.php
466 %{_appdir}/css
467 %{_appdir}/customer
468 %{_appdir}/images
469 %{_appdir}/js
470 %{_appdir}/logs
471 %{_appdir}/manage
472 %{_appdir}/reports
473 %{_appdir}/rpc
474 %{_appdir}/templates
475
476 %dir %attr(730,root,http) %{_appdir}/locks
477
478 %dir %{_appdir}/include
479 %{_appdir}/include/customer
480 %{_appdir}/include/jpgraph
481 %{_appdir}/include/pear
482 %{_appdir}/include/Smarty
483 %{_appdir}/include/workflow
484 %{_appdir}/include/*.php
485
486 %dir %attr(730,root,http) %{_appdir}/templates_c
487
488 %dir %{_appdir}/misc
489 %{_appdir}/misc/cli
490 %{_appdir}/misc/blank.html
491
492 %files setup
493 %defattr(644,root,root,755)
494 %{_appdir}/setup
495
496 %files mail-queue
497 %defattr(644,root,root,755)
498 %{_appdir}/misc/process_mail_queue.php
499 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
500
501 %files mail-download
502 %defattr(644,root,root,755)
503 %{_appdir}/misc/download_emails.php
504 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
505
506 %files reminder
507 %defattr(644,root,root,755)
508 %{_appdir}/misc/check_reminders.php
509 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
510
511 %files monitor
512 %defattr(644,root,root,755)
513 %{_appdir}/misc/monitor.php
514 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
515
516 %files route-emails
517 %defattr(644,root,root,755)
518 %{_appdir}/misc/route_emails.php
519
520 %files route-notes
521 %defattr(644,root,root,755)
522 %{_appdir}/misc/route_drafts.php
523 %{_appdir}/misc/route_notes.php
524
525 %files irc
526 %defattr(644,root,root,755)
527 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
528 %{_appdir}/misc/irc
529 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
530
531 %files scm
532 %defattr(644,root,root,755)
533 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
534 %dir %{_appdir}/misc/scm
535 %{_appdir}/misc/scm/process_cvs_commits.php
This page took 0.104552 seconds and 4 git commands to generate.