]> git.pld-linux.org Git - packages/eventum.git/blob - eventum.spec
- update todo
[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 Group:          Applications/WWW
149 Requires:       %{name} = %{epoch}:%{version}-%{release}
150 Requires:       php4 >= 4.1.0
151 Requires:       crondaemon
152
153 %description reminder
154 The reminder system was designed with the objective as serving as a
155 safe net for issues that need attention. Depending on what
156 configuration you create, you may have several reminders (or alerts)
157 be sent out whenever an issue needs attention, for whatever parameter
158 you may deem necessary.
159
160 This package contains the cron job.
161
162 %package monitor
163 Summary:        Eventum Heartbeat Monitor
164 Group:          Applications/WWW
165 Requires:       %{name} = %{epoch}:%{version}-%{release}
166 Requires:       php4 >= 4.1.0
167 Requires:       crondaemon
168
169 %description monitor
170 The heartbeat monitor is a feature designed for the administrator that
171 wants to be alerted whenever a common problem in Eventum is detected,
172 like the database server not being available anymore, or maybe when
173 the recommended permissions for certain configuration files are
174 changed.
175
176 Please note that before running the heartbeat monitor, you may need to
177 customize some of the checks to be appropriate for your own system,
178 particularly the permission and file checks on
179 Monitor::checkConfiguration().
180
181 This package contains the cron job.
182
183 %package route-emails
184 Summary:        Eventum Email Routing
185 Group:          Applications/WWW
186 Requires:       %{name} = %{epoch}:%{version}-%{release}
187 Requires:       php4 >= 4.1.0
188 #Requires:      eventum-router
189
190 %description route-emails
191 The email routing feature is used to automatically associate a thread
192 of emails into an Eventum issue. By setting up qmail (or even postfix)
193 to deliver emails sent to a specific address (usually
194 issue-<number>@<domain>) to the above script, users are able to use
195 their email clients to reply to emails coming from Eventum, and those
196 replies will be automatically associated with the issue and
197 broadcasted to the entire notification list.
198
199 %package route-notes
200 Summary:        Eventum Note Routing
201 Group:          Applications/WWW
202 Requires:       %{name} = %{epoch}:%{version}-%{release}
203 Requires:       php4 >= 4.1.0
204 #Requires:      eventum-router
205
206 %description route-notes
207 The note routing feature is used to automatically associate a thread
208 of notes into an Eventum issue. By setting up qmail (or even postfix)
209 to deliver emails sent to a specific address (usually
210 note-<number>@<domain>) to the above script, users are able to use
211 their email clients to reply to internal notes coming from Eventum,
212 and those replies will be automatically associated with the issue and
213 broadcasted to the notification list staff members.
214
215 %package irc
216 Summary:        Eventum IRC Notification Bot
217 Group:          Applications/WWW
218 Requires:       %{name} = %{epoch}:%{version}-%{release}
219 Requires:       php4 >= 4.1.0
220 # FIXME just need start-stop-daemon
221 Requires:       dpkg
222
223 %description irc
224 The IRC notification bot is a nice feature for remote teams that want
225 to handle issues and want to have a quick and easy way to get simple
226 notifications. Right now the bot notifies of the following actions:
227 - New Issues
228 - Blocked emails
229 - Issues that got their assignment list changed
230
231 NOTE: You will need to manually edit the bot.php script to set your
232 appropriate preferences, like IRC server and channel that the bot
233 should join.
234
235 %package scm
236 Summary:        Eventum SCM integration
237 Summary(pl):    Integracja SCM dla Eventum
238 Group:          Applications/WWW
239 Requires:       %{name} = %{epoch}:%{version}-%{release}
240 Requires:       php4 >= 4.1.0
241
242 %description scm
243 This feature allows your software development teams to integrate your
244 Source Control Management system with your Issue Tracking System.
245
246 The integration is implemented in such a way that it will be forward
247 compatible with pretty much any SCM system, such as CVS.
248
249 For installation see
250 /eventum/help.php?topic=scm_integration_installation .
251
252 %description scm -l pl
253 Ten pakiet pozwala zespo³om programistów na integracjê systemu
254 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
255 ¶ledzenia spraw.
256
257 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
258 prawie ka¿dym systemem SCM, jak np. CVS.
259
260 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
261 /eventum/help.php?topic=scm_integration_installation .
262
263 %prep
264 %setup -q %{?_snap:-n %{name}-%{_snap}}
265 %patch0 -p1
266 %patch1 -p1
267 %patch2 -p1
268 %patch3 -p1
269 %patch4 -p1
270
271 %build
272
273 %install
274 rm -rf $RPM_BUILD_ROOT
275 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,cron.d},%{_appdir}/{locks,templates_c},/var/log}
276
277 cp -a . $RPM_BUILD_ROOT%{_appdir}
278
279 > $RPM_BUILD_ROOT%{_appdir}/setup.conf.php
280
281 sed -i -e 's,/usr/local/bin/php,/usr/bin/php4,' $RPM_BUILD_ROOT%{_appdir}/misc/cli/eventum
282
283 # change private key, so we can easily grep
284 sed -i -e '
285 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
286 ' $RPM_BUILD_ROOT%{_appdir}/include/private_key.php
287
288 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
289 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
290 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
291 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
292 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
293 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
294 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
295 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
296
297 # in conf
298 mv $RPM_BUILD_ROOT%{_appdir}/{config.inc.php,setup.conf.php} $RPM_BUILD_ROOT%{_sysconfdir}
299 ln -s %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}
300 ln -s %{_sysconfdir}/setup.conf.php $RPM_BUILD_ROOT%{_appdir}
301 mv $RPM_BUILD_ROOT%{_appdir}/include/private_key.php $RPM_BUILD_ROOT%{_sysconfdir}
302 ln -s %{_sysconfdir}/private_key.php $RPM_BUILD_ROOT%{_appdir}/include/private_key.php
303
304 # log directory
305 mv $RPM_BUILD_ROOT%{_appdir}/logs $RPM_BUILD_ROOT/var/log/%{name}
306 ln -s /var/log/%{name} $RPM_BUILD_ROOT%{_appdir}/logs
307
308 # in doc
309 rm -f $RPM_BUILD_ROOT%{_appdir}/{COPYING,ChangeLog,FAQ,INSTALL,README,UPGRADE}
310 rm -rf $RPM_BUILD_ROOT%{_appdir}/{docs,misc/upgrade}
311
312 %clean
313 rm -rf $RPM_BUILD_ROOT
314
315 %post
316 # apache1
317 if [ -f %{_apache1dir}/apache.conf ]; then
318         ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
319         if [ -f /var/lock/subsys/apache ]; then
320                 /etc/rc.d/init.d/apache restart 1>&2
321         fi
322 fi
323 # apache2
324 if [ -d %{_apache2dir}/httpd.conf ]; then
325         ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
326         if [ -f /var/lock/subsys/httpd ]; then
327                 /etc/rc.d/init.d/httpd restart 1>&2
328         fi
329 fi
330
331 # check if the package is configured.
332 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.inc.php; then
333 %banner %{name} -e <<EOF
334
335 You haven't yet configured Eventum!
336
337 Install %{name}-setup and open up http://yourserver/eventum/
338 -- that will help you setup initial config.
339
340 when have configured Eventum, please uninstall the setup package,
341 so that %{name}-setup is able to secure your Eventum installation.
342
343 EOF
344 #' vim stupidity.
345
346 elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
347 %banner %{name} -e <<EOF
348
349 You have default private key installed!
350
351 Install %{name}-setup and open up http://yourserver/eventum/setup/
352 -- that will help you setup initial config.
353
354 when have configured Eventum, please uninstall the setup package,
355 so that %{name}-setup is able to secure your Eventum installation.
356
357 EOF
358         elif [ -d %{_appdir}/setup ]; then
359 %banner %{name} -e <<EOF
360
361 If you have have configured Eventum, please uninstall the setup package,
362 so that %{name}-setup is able to secure your Eventum installation.
363
364 EOF
365 fi
366
367
368 %preun
369 if [ "$1" = "0" ]; then
370         # apache1
371         if [ -f %{_apache1dir}/apache.conf ]; then
372                 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
373                 if [ -f /var/lock/subsys/apache ]; then
374                         /etc/rc.d/init.d/apache restart 1>&2
375                 fi
376         fi
377         # apache2
378         if [ -d %{_apache2dir}/httpd.conf ]; then
379                 rm -f %{_apache1dir}/httpd.conf/99_%{name}.conf
380                 if [ -f /var/lock/subsys/httpd ]; then
381                         /etc/rc.d/init.d/httpd restart 1>&2
382                 fi
383         fi
384 fi
385
386 %post setup
387 chmod 660 %{_sysconfdir}/{config.inc,private_key}.php
388 chown root:http %{_sysconfdir}/{config.inc,private_key}.php
389
390 %postun setup
391 if [ "$1" = "0" ]; then
392         chmod 640 %{_sysconfdir}/{config.inc,private_key}.php
393         chown root:http %{_sysconfdir}/{config.inc,private_key}.php
394 fi
395
396 %files
397 %defattr(644,root,root,755)
398 %doc ChangeLog FAQ INSTALL README UPGRADE misc/upgrade docs/*
399 %attr(751,root,root) %dir %{_sysconfdir}
400 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
401 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.inc.php
402 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
403 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.conf.php
404
405 %dir %attr(731,root,http) /var/log/%{name}
406 %attr(620,root,http) %ghost /var/log/%{name}/*
407
408 %dir %{_appdir}
409 %{_appdir}/*.php
410 %{_appdir}/css
411 %{_appdir}/customer
412 %{_appdir}/images
413 %{_appdir}/js
414 %{_appdir}/logs
415 %{_appdir}/manage
416 %{_appdir}/reports
417 %{_appdir}/rpc
418 %{_appdir}/templates
419
420 %dir %attr(730,root,http) %{_appdir}/locks
421
422 %dir %{_appdir}/include
423 %{_appdir}/include/customer
424 %{_appdir}/include/jpgraph
425 %{_appdir}/include/pear
426 %{_appdir}/include/Smarty
427 %{_appdir}/include/workflow
428 %{_appdir}/include/*.php
429
430 %dir %attr(730,root,http) %{_appdir}/templates_c
431
432 %dir %{_appdir}/misc
433 %{_appdir}/misc/cli
434 %{_appdir}/misc/blank.html
435
436 %files setup
437 %defattr(644,root,root,755)
438 %{_appdir}/setup
439
440 %files mail-queue
441 %defattr(644,root,root,755)
442 %{_appdir}/misc/process_mail_queue.php
443 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
444
445 %files mail-download
446 %defattr(644,root,root,755)
447 %{_appdir}/misc/download_emails.php
448 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
449
450 %files reminder
451 %defattr(644,root,root,755)
452 %{_appdir}/misc/check_reminders.php
453 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
454
455 %files monitor
456 %defattr(644,root,root,755)
457 %{_appdir}/misc/monitor.php
458 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
459
460 %files route-emails
461 %defattr(644,root,root,755)
462 %{_appdir}/misc/route_emails.php
463
464 %files route-notes
465 %defattr(644,root,root,755)
466 %{_appdir}/misc/route_drafts.php
467 %{_appdir}/misc/route_notes.php
468
469 %files irc
470 %defattr(644,root,root,755)
471 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
472 %{_appdir}/misc/irc
473 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
474
475 %files scm
476 %defattr(644,root,root,755)
477 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
478 %dir %{_appdir}/misc/scm
479 %{_appdir}/misc/scm/process_cvs_commits.php
This page took 0.129992 seconds and 4 git commands to generate.