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