]> git.pld-linux.org Git - packages/eventum.git/blob - eventum.spec
- fix hilite quoting for routed emails. rel 3
[packages/eventum.git] / eventum.spec
1 # TODO
2 # - system pear is incompatible, at least pear DB class seems broke 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 #  - 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 # - 64bit platforms beware? http://bugs.php.net/bug.php?id=30215 (it's actually Smarty related problem)
11
12 %bcond_with     pear    # build with system PEAR packages (or use bundled ones)
13 %bcond_with     qmail   # build the router-qmail subpackage
14
15 # snapshot: DATE
16 #define _snap 20050227
17
18 # release candidate
19 #define _rc             RC1
20
21 %define _rel    3
22
23 %if 0%{?_rc:1}
24 %define _source http://pessoal.org/%{name}-%{version}-%{_rc}.tar.gz
25 %else
26 %if 0%{?_snap}
27 %define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
28 %else
29 %define _source http://mysql.dataphone.se/Downloads/%{name}/%{name}-%{version}.tar.gz
30 %endif
31 %endif
32
33 Summary:        Eventum Issue / Bug tracking system
34 Summary(pl):    Eventum - system ¶ledzenia spraw/b³êdów
35 Name:           eventum
36 Version:        1.6.1
37 Release:        %{?_snap:0.%{_snap}.}%{?_rc:%{_rc}.}%{_rel}
38 License:        GPL
39 Group:          Applications/WWW
40 Source0:        %{_source}
41 # Source0-md5:  bb05ecdb46b02580ffe892e270e536b3
42 Source1:        %{name}-apache.conf
43 Source2:        %{name}-mail-queue.cron
44 Source3:        %{name}-mail-download.cron
45 Source4:        %{name}-reminder.cron
46 Source5:        %{name}-monitor.cron
47 Source6:        %{name}-cvs.php
48 Source7:        %{name}-irc.php
49 Source8:        %{name}-irc.init
50 Source9:        %{name}-irc.sysconfig
51 Source10:       %{name}-config.php
52 Source11:       %{name}-router-qmail.sh
53 Source12:       http://dev.mysql.com/common/favicon.ico
54 # Source12-md5: 858be0130832da4144c08d4b59116411
55 Source13:       %{name}-config-setup.php
56 Source14:       %{name}-upgrade.sh
57 Patch0:         %{name}-paths.patch
58 Patch1:         %{name}-cvs-config.patch
59 Patch2:         %{name}-irc-config.patch
60 Patch3:         %{name}-PEAR.patch
61 Patch4:         http://glen.alkohol.ee/pld/%{name}-reply-subject.patch
62 Patch5:         %{name}-lf.patch
63 Patch6:         http://glen.alkohol.ee/pld/%{name}-maq-subject.patch
64 Patch7:         %{name}-bot-reconnect.patch
65 Patch9:         http://glen.alkohol.ee/pld/eventum-httpclient-clientside.patch
66 Patch10:        %{name}-hl-quot-fix.patch
67 Patch22:        eventum-cli-wr-separated.patch
68 URL:            http://dev.mysql.com/downloads/other/eventum/
69 BuildRequires:  rpmbuild(macros) >= 1.223
70 BuildRequires:  sed >= 4.0
71 Requires:       php >= 4.2.0
72 Requires:       php-gd
73 Requires:       php-imap
74 Requires:       php-mysql
75 Requires:       php-pcre
76 Requires:       php-session
77 Requires:       %{name}-base = %{epoch}:%{version}-%{release}
78 Requires:       Smarty >= 2.6.2
79 %if %{with pear}
80 Requires:       php-pear-Benchmark
81 Requires:       php-pear-DB
82 Requires:       php-pear-Date
83 Requires:       php-pear-HTTP_Request
84 Requires:       php-pear-Mail
85 Requires:       php-pear-Math_Stats
86 Requires:       php-pear-Net_DIME
87 Requires:       php-pear-Net_POP3
88 Requires:       php-pear-Net_SMTP
89 Requires:       php-pear-Net_SmartIRC
90 Requires:       php-pear-Net_Socket
91 Requires:       php-pear-Net_URL
92 Requires:       php-pear-Net_UserAgent_Detect
93 Requires:       php-pear-PEAR
94 Requires:       php-pear-Text_Diff
95 Requires:       php-pear-XML_RPC
96 %endif
97 Requires:       apache >= 1.3.33-2
98 Requires:       apache(mod_dir)
99 Requires(triggerpostun):        sed >= 4.0
100 BuildArch:      noarch
101 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
102
103 %define         _sysconfdir     /etc/%{name}
104 %define         _libdir         %{_prefix}/lib/%{name}
105 %define         _appdir %{_datadir}/%{name}
106 %define         _smartyplugindir        %{php_pear_dir}/Smarty/plugins
107
108 %description
109 Eventum is a user-friendly and flexible issue tracking system that can
110 be used by a support department to track incoming technical support
111 requests, or by a software development team to quickly organize tasks
112 and bugs. Eventum is used by the MySQL AB Technical Support team, and
113 has allowed us to dramatically improve our response times.
114
115 %description -l pl
116 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
117 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
118 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
119 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
120 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
121 reakcji.
122
123 %package base
124 Summary:        Eventum base package
125 Summary(pl):    Podstawowy pakiet Eventum
126 Group:          Applications/WWW
127 Requires(pre):  /bin/id
128 Requires(pre):  /usr/bin/getgid
129 Requires(pre):  /usr/sbin/useradd
130 Requires(pre):  /usr/sbin/groupadd
131 Requires(postun):       /usr/sbin/userdel
132 Requires(postun):       /usr/sbin/groupdel
133 Provides:       user(eventum)
134 Provides:       group(eventum)
135
136 %description base
137 This package contains base directory structure for Eventum.
138
139 %description base -l pl
140 Ten pakiet zawiera podstawow± strukturê katalogów dla Eventum.
141
142 %package setup
143 Summary:        Eventum setup package
144 Summary(pl):    Pakiet do wstêpnej konfiguracji Eventum
145 Group:          Applications/WWW
146 PreReq:         %{name} = %{epoch}:%{version}-%{release}
147
148 %description setup
149 Install this package to configure initial Eventum installation. You
150 should uninstall this package when you're done, as it considered
151 insecure to keep the setup files in place.
152
153 %description setup -l pl
154 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
155 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
156 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
157
158 %package mail-queue
159 Summary:        Eventum mail queue process
160 Summary(pl):    Przetwarzanie kolejki poczty Eventum
161 Group:          Applications/WWW
162 Requires:       %{name} = %{epoch}:%{version}-%{release}
163 Requires:       crondaemon
164 Requires:       php >= 4.1.0
165
166 %description mail-queue
167 Beginning with the first release of Eventum, emails are not directly
168 sent out from the various scripts, but rather added to a mail queue
169 table that is processed by a cron job. If an email cannot be sent, it
170 will be marked as such in the mail queue log, and the cron job script
171 will re-try to send it again the next time it runs.
172
173 This package contains the cron job.
174
175 %description mail-queue -l pl
176 Od pierwszego wydania Eventum poczta nie jest wysy³ana bezpo¶rednio z
177 ró¿nych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
178 Je¶li poczta nie mo¿e byæ wys³ana, bêdzie odpowiednio oznaczona w logu
179 kolejki poczty, a skrypt z crona bêdzie próbowa³ wys³aæ j± ponownie
180 nastêpnym razem.
181
182 Ten pakiet zawiera zadanie dla crona.
183
184 %package mail-download
185 Summary:        Eventum email download
186 Summary(pl):    ¦ci±ganie poczty Eventum
187 Group:          Applications/WWW
188 Requires:       %{name} = %{epoch}:%{version}-%{release}
189 Requires:       crondaemon
190 Requires:       php >= 4.1.0
191
192 %description mail-download
193 In order for Eventum's email integration feature to work, you need to
194 setup a cron job to run the script every so often.
195
196 This package contains the cron job.
197
198 %description mail-download -l pl
199 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
200 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
201 czêsto.
202
203 Ten pakiet zawiera zadanie dla crona.
204
205 %package reminder
206 Summary:        Eventum Reminder System
207 Summary(pl):    System przypominania dla Eventum
208 Group:          Applications/WWW
209 Requires:       %{name} = %{epoch}:%{version}-%{release}
210 Requires:       php >= 4.1.0
211 Requires:       crondaemon
212
213 %description reminder
214 The reminder system was designed with the objective as serving as a
215 safe net for issues that need attention. Depending on what
216 configuration you create, you may have several reminders (or alerts)
217 be sent out whenever an issue needs attention, for whatever parameter
218 you may deem necessary.
219
220 This package contains the cron job.
221
222 %description reminder -l pl
223 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
224 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
225 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
226 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
227 uwa¿aæ za potrzebny.
228
229 Ten pakiet zawiera zadanie dla crona.
230
231 %package monitor
232 Summary:        Eventum Heartbeat Monitor
233 Summary(pl):    Monitor ¿ycia dla Eventum
234 Group:          Applications/WWW
235 Requires:       %{name} = %{epoch}:%{version}-%{release}
236 Requires:       php >= 4.1.0
237 Requires:       php-posix
238 Requires:       crondaemon
239
240 %description monitor
241 The heartbeat monitor is a feature designed for the administrator that
242 wants to be alerted whenever a common problem in Eventum is detected,
243 like the database server not being available anymore, or maybe when
244 the recommended permissions for certain configuration files are
245 changed.
246
247 Please note that before running the heartbeat monitor, you may need to
248 customize some of the checks to be appropriate for your own system,
249 particularly the permission and file checks on
250 Monitor::checkConfiguration().
251
252 This package contains the cron job.
253
254 %description monitor -l pl
255 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
256 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
257 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
258 do plików konfiguracyjnych.
259
260 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
261 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
262 testów uprawnieñ i plików w Monitor::checkConfiguration().
263
264 Ten pakiet zawiera zadanie dla crona.
265
266 %package route-emails
267 Summary:        Eventum Email Routing
268 Summary(pl):    Przekazywanie poczty dla Eventum
269 Group:          Applications/WWW
270 Requires:       %{name} = %{epoch}:%{version}-%{release}
271 Requires:       php >= 4.1.0
272 Requires:       eventum(router)
273
274 %description route-emails
275 The email routing feature is used to automatically associate a thread
276 of emails into an Eventum issue. By setting up qmail (or even postfix)
277 to deliver emails sent to a specific address (usually
278 issue-<number>@<domain>) to the above script, users are able to use
279 their email clients to reply to emails coming from Eventum, and those
280 replies will be automatically associated with the issue and
281 broadcasted to the entire notification list.
282
283 %description route-emails -l pl
284 Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
285 w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
286 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
287 issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
288 u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
289 Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
290 rozprowadzane do ca³ej listy og³oszeniowej.
291
292 %package route-notes
293 Summary:        Eventum Note Routing
294 Summary(pl):    Przekazywanie notatek dla Eventum
295 Group:          Applications/WWW
296 Requires:       %{name} = %{epoch}:%{version}-%{release}
297 Requires:       php >= 4.1.0
298 Requires:       eventum(router)
299
300 %description route-notes
301 The note routing feature is used to automatically associate a thread
302 of notes into an Eventum issue. By setting up qmail (or even postfix)
303 to deliver emails sent to a specific address (usually
304 note-<number>@<domain>) to the above script, users are able to use
305 their email clients to reply to internal notes coming from Eventum,
306 and those replies will be automatically associated with the issue and
307 broadcasted to the notification list staff members.
308
309 %description route-notes -l pl
310 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
311 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
312 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
313 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
314 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
315 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
316 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
317
318 %package router-qmail
319 Summary:        Eventum Mail Routing - qmail
320 Summary(pl):    Przekazywanie poczty Eventum - qmail
321 Group:          Applications/Mail
322 Requires:       %{name} = %{epoch}:%{version}-%{release}
323 Requires:       qmail >= 1.03
324 Provides:       eventum(router)
325 Obsoletes:      eventum(router)
326
327 %description router-qmail
328 This package provides way of routing notes and emails back to Eventum
329 via qmail.
330
331 %description router-qmail -l pl
332 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
333 przez qmaila.
334
335 %package router-postfix
336 Summary:        Eventum Mail Routing - Postfix
337 Summary(pl):    Przekazywanie poczty Eventum - Postfix
338 Group:          Applications/Mail
339 Requires:       %{name} = %{epoch}:%{version}-%{release}
340 Requires:       postfix
341 Provides:       eventum(router)
342 Obsoletes:      eventum(router)
343
344 %description router-postfix
345 This package provides way of routing notes and emails back to Eventum
346 via Postfix.
347
348 %description router-postfix -l pl
349 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
350 przez Postfiksa.
351
352 %package irc
353 Summary:        Eventum IRC Notification Bot
354 Summary(pl):    IRC-owy bot powiadamiaj±cy dla Eventum
355 Group:          Applications/WWW
356 Requires:       %{name} = %{epoch}:%{version}-%{release}
357 Requires:       php >= 4.1.0
358 Requires:       php-sockets
359 Requires(triggerpostun):        sed >= 4.0
360 PreReq:         rc-scripts >= 0.4.0.18
361
362 %description irc
363 The IRC notification bot is a nice feature for remote teams that want
364 to handle issues and want to have a quick and easy way to get simple
365 notifications. Right now the bot notifies of the following actions:
366 - New Issues
367 - Blocked emails
368 - Issues that got their assignment list changed
369
370 NOTE: You will need to manually edit the bot.php script to set your
371 appropriate preferences, like IRC server and channel that the bot
372 should join.
373
374 %description irc -l pl
375 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
376 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
377 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
378 nastêpuj±cych zdarzeniach:
379 - nowych sprawach
380 - zablokowanych listach
381 - sprawach, dla których zmieni³a siê lista powi±zañ
382
383 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
384 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
385
386 %package cli
387 Summary:        Eventum command-line interface
388 Summary(pl):    Interfejs linii poleceñ dla Eventum
389 Group:          Applications/WWW
390 Requires:       %{name}-base = %{epoch}:%{version}-%{release}
391 Requires:       php >= 4.1.0
392 Requires:       php-cli
393 Requires:       php-curl
394 Requires:       php-xml
395 Requires:       php-pear-XML_RPC
396
397 %description cli
398 The Eventum command-line interface allows you to access most of the
399 features of the web interface straight from your command shell.
400
401 %description cli -l pl
402 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
403 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
404
405 %package scm
406 Summary:        Eventum SCM integration
407 Summary(pl):    Integracja SCM dla Eventum
408 Group:          Applications/WWW
409 Requires:       %{name}-base = %{epoch}:%{version}-%{release}
410 Requires:       php-cli >= 4.1.0
411 Requires:       php-pcre
412
413 %description scm
414 This feature allows your software development teams to integrate your
415 Source Control Management system with your Issue Tracking System.
416
417 The integration is implemented in such a way that it will be forward
418 compatible with pretty much any SCM system, such as CVS.
419
420 For installation see
421 </eventum/help.php?topic=scm_integration_installation>.
422
423 %description scm -l pl
424 Ten pakiet pozwala zespo³om programistów na integracjê systemu
425 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
426 ¶ledzenia spraw.
427
428 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
429 prawie ka¿dym systemem SCM, jak np. CVS.
430
431 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
432 </eventum/help.php?topic=scm_integration_installation>.
433
434 %prep
435 %setup -q %{?_snap:-n %{name}-%{_snap}}
436 # undos the source
437 find . -type f -print0 | xargs -0 sed -i -e 's,
438 $,,'
439
440 rm -f setup.conf.php
441 rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD
442
443 # packaging
444 %patch0 -p1 -b .paths
445 %patch1 -p1
446 %patch2 -p1
447 %{?with_pear:%patch3 -p1 -b .PEAR}
448
449 # bug fixes.
450 %patch4 -p1
451 %patch5 -p1
452 %patch6 -p1
453 %patch7 -p1
454 %patch9 -p1
455 %patch10 -p1
456 %patch22 -p1
457
458 # replace in remaining scripts config.inc.php to system one
459 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
460         s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
461 '
462 sed -i -e '
463         s,include(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
464 ' misc/download_emails.php
465
466 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
467         s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_sysconfdir}/private_key.php"),
468 '
469 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
470
471 %install
472 rm -rf $RPM_BUILD_ROOT
473 install -d \
474         $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \
475         $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
476         $RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
477         $RPM_BUILD_ROOT/var/lib/%{name}/routed_emails \
478         $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
479
480 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
481 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
482 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
483 cp -a misc/irc $RPM_BUILD_ROOT%{_appdir}
484 cp -a templates $RPM_BUILD_ROOT%{_appdir}
485 cp -a include/{customer,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
486 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
487 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
488 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
489
490 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
491 install %{SOURCE13} $RPM_BUILD_ROOT%{_appdir}/htdocs/setup/config.inc.php
492 install %{SOURCE14} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
493
494 # cli
495 install -d $RPM_BUILD_ROOT%{_appdir}/cli
496 install misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
497 install misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
498 sed -e '1s,#!.*/bin/php,#!%{_bindir}/php4,' \
499         misc/cli/eventum > $RPM_BUILD_ROOT%{_bindir}/%{name}
500 cp -f misc/cli/eventumrc_example eventumrc
501
502 # scm
503 echo '#!%{_bindir}/php4 -q' > %{name}-scm
504 cat misc/scm/process_cvs_commits.php >> %{name}-scm
505 install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
506
507 # private key
508 mv $RPM_BUILD_ROOT{%{_appdir}/include/private_key.php,%{_sysconfdir}}
509 # change private key, so we can easily grep
510 sed -i -e '
511 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
512 ' $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php
513
514 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
515 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
516 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
517 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
518 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
519 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
520 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
521 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
522 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
523 sed -e 's,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}},' \
524         %{SOURCE10} > $RPM_BUILD_ROOT%{_sysconfdir}/core.php
525
526 # config
527 > $RPM_BUILD_ROOT%{_sysconfdir}/setup.php
528 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_sysconfdir}/config}.php
529
530 # sample, not used in eventum
531 rm -f $RPM_BUILD_ROOT%{_appdir}/htdocs/rpc/xmlrpc_client.php
532
533 %if %{with pear}
534 # provided by PEAR
535 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
536 %endif
537
538 # use system Smarty
539 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
540 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
541 # These plugins are not in Smarty package (Smarty-2.6.2-3)
542 cp -a \
543         include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
544         include/Smarty/plugins/modifier.highlight_quoted.php \
545         $RPM_BUILD_ROOT%{_smartyplugindir}
546
547 # qmail router
548 %if %{with qmail}
549 d=$RPM_BUILD_ROOT/var/lib/%{name}
550 echo 'root' > $d/.qmail
551 echo 'root' > $d/.qmail-default
552 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
553 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
554 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
555 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
556 %endif
557
558 %clean
559 rm -rf $RPM_BUILD_ROOT
560
561 %pre
562 %addusertogroup http %{name}
563
564 %post
565 # check if the package is configured.
566 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
567 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
568 %banner %{name} -e <<EOF
569
570 You haven't yet configured Eventum!
571 Please open in browser <http://localhost/eventum/>
572 If you need access from elsewhere, you need to edit
573 %{_sysconfdir}/apache.conf and restart apache.
574
575 IMPORTANT: When You have configured Eventum, please uninstall the
576 setup package, so that %{name}-setup is able to secure your Eventum
577 installation.
578
579 EOF
580 #' vim stupidity.
581 else
582 %banner %{name} -e <<EOF
583
584 You haven't yet configured Eventum!
585
586 To setup eventum, please install %{name}-setup and open in browser
587 <http://localhost/eventum/>.
588 If you need access from elsewhere, you need to edit
589 %{_sysconfdir}/apache.conf and restart apache.
590
591 IMPORTANT: When You have configured Eventum, please uninstall the
592 setup package, so that %{name}-setup is able to secure your Eventum
593 installation.
594
595 EOF
596 #' vim stupidity.
597 fi
598
599 elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
600 %banner %{name} -e <<EOF
601
602 You have default private key installed!
603
604 Install %{name}-setup and open up http://yourserver/eventum/setup/
605 -- that will help you setup initial config.
606
607 when have configured Eventum, please uninstall the setup package,
608 so that %{name}-setup is able to secure your Eventum installation.
609
610 EOF
611         elif [ -d %{_appdir}/setup ]; then
612 %banner %{name} -e <<EOF
613
614 If you have have configured Eventum, please uninstall the setup package,
615 so that %{name}-setup is able to secure your Eventum installation.
616
617 EOF
618 fi
619
620 # nuke Smarty templates cache after upgrade
621 rm -f /var/cache/eventum/*.php
622
623 %preun
624 if [ "$1" = "0" ]; then
625         # nuke cache
626         rm -f /var/cache/eventum/*.php 2>/dev/null || :
627 fi
628
629 %pre base
630 %groupadd -P %{name}-base -g 146 %{name}
631 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
632
633 %postun base
634 if [ "$1" = "0" ]; then
635         %userremove %{name}
636         %groupremove %{name}
637 fi
638
639 %if %{with qmail}
640 %post router-qmail
641 CF=/etc/qmail/control/virtualdomains
642 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
643         FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_sysconfdir}/config.php 2>/dev/null)
644         [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
645         umask 022
646         echo "#${FQDN}:%{name}" >> $CF
647
648 %banner %{name}-qmail -e <<EOF
649
650 Added "#${FQDN}:%{name}" to $CF,
651 Please verify that it is correct and restart qmail:
652 # service qmail reload
653
654 Consult qmail-send(8) for more information on virtualdomains.
655
656 EOF
657 fi
658
659 %preun router-qmail
660 if [ "$1" = "0" ]; then
661         sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
662 fi
663 %endif
664
665 %post setup
666 chmod 660 %{_sysconfdir}/{config,private_key}.php
667 chown root:eventum %{_sysconfdir}/{config,private_key}.php
668
669 %postun setup
670 if [ "$1" = "0" ]; then
671         chmod 640 %{_sysconfdir}/{config,private_key}.php
672         chown root:eventum %{_sysconfdir}/{config,private_key}.php
673 fi
674
675 %triggerin -- apache1 >= 1.3.33-2
676 %apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
677
678 %triggerun -- apache1 >= 1.3.33-2
679 %apache_config_uninstall -v 1
680
681 %triggerin -- apache >= 2.0.0
682 %apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
683
684 %triggerun -- apache >= 2.0.0
685 %apache_config_uninstall -v 2
686
687 # FIXME
688 # only one upgrade trigger is called if you're upgrading over two
689 # versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
690 # use common trigger (the highest version and rpmvercmp from poldek?)
691 %triggerpostun -- eventum < 1.5.1-0.257
692 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5_to_v1.5.1 <<EOF
693 database_changes.php Perform database changes
694 EOF
695
696 %triggerpostun -- eventum < 1.5.2-0.289
697 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.1_to_v1.5.2 <<EOF
698 database_changes.php Perform database changes
699 set_priority_ranks.php Fix the ranking of priority values
700 EOF
701
702 %triggerpostun -- eventum < 1.5.3-0.291
703 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.2_to_v1.5.3 <<EOF
704 database_changes.php Perform database changes
705 EOF
706
707 %triggerpostun -- eventum < 1.5.4-1.12
708 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.3_to_v1.5.4 <<EOF
709 database_changes.php Perform database changes
710 EOF
711
712 %triggerpostun -- eventum < 1.6.0-RC2.6
713 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.5_to_v1.6.0 <<EOF
714 database_changes.php Perform database changes
715 upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
716 EOF
717
718 %triggerpostun -- eventum < 1.6.1-0.2
719 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.0_to_v1.6.1 <<EOF
720 database_changes.php Perform database changes
721 EOF
722
723 %triggerpostun irc -- eventum-irc < 1.6.1
724 sed -i -e '
725 s,\$irc_host,$irc_server_hostname,
726 s,\$irc_port,$irc_server_port,
727 s,\$irc_nick,$nickname,
728 s,\$irc_realname,$realname,
729 s,\$irc_username,$username,
730 ' /etc/eventum/irc.php
731
732 %files
733 %defattr(644,root,root,755)
734 %doc ChangeLog FAQ INSTALL README UPGRADE
735 %doc docs/* rpc/xmlrpc_client.php setup/schema.sql
736 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
737 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
738 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
739 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
740 %attr(640,root,eventum) %config %verify(not mtime) %{_sysconfdir}/core.php
741
742 %dir %attr(731,root,eventum) /var/log/%{name}
743 %attr(620,root,eventum) %ghost /var/log/%{name}/*
744
745 %dir %{_appdir}/htdocs
746 %{_appdir}/htdocs/*.php
747 %{_appdir}/htdocs/*.ico
748 %{_appdir}/htdocs/css
749 %{_appdir}/htdocs/customer
750 %{_appdir}/htdocs/images
751 %{_appdir}/htdocs/js
752 %{_appdir}/htdocs/manage
753 %{_appdir}/htdocs/reports
754 %{_appdir}/htdocs/rpc
755 %{_appdir}/htdocs/misc
756
757 %{_appdir}/templates
758 %dir %{_appdir}/upgrade
759 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
760 %{_appdir}/upgrade/[!u]*
761
762 %{_smartyplugindir}/*
763 %if %{without pear}
764 %{_appdir}/include/pear
765 %endif
766
767 %dir %{_appdir}/include
768 %{_appdir}/include/customer
769 %{_appdir}/include/jpgraph
770 %{_appdir}/include/workflow
771 %{_appdir}/include/class.[!m]*.php
772 %{_appdir}/include/class.mail.php
773 %{_appdir}/include/class.mail_queue.php
774 %{_appdir}/include/class.mime_helper.php
775 %{_appdir}/include/class.misc.php
776 %{_appdir}/include/db_access.php
777
778 %dir %attr(730,root,eventum) /var/run/%{name}
779 %dir %attr(730,root,eventum) /var/cache/%{name}
780
781 %files base
782 %defattr(644,root,root,755)
783 %attr(751,root,root) %dir %{_sysconfdir}
784 %dir %{_libdir}
785 %dir %{_appdir}
786 # qmail will ignore user, if it's home directory is not owned
787 %attr(750,eventum,eventum) %dir /var/lib/%{name}
788 # for saved routed emails
789 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
790
791 %files setup
792 %defattr(644,root,root,755)
793 %{_appdir}/htdocs/setup
794
795 %files mail-queue
796 %defattr(644,root,root,755)
797 %{_appdir}/process_mail_queue.php
798 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
799
800 %files mail-download
801 %defattr(644,root,root,755)
802 %{_appdir}/download_emails.php
803 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
804
805 %files reminder
806 %defattr(644,root,root,755)
807 %{_appdir}/check_reminders.php
808 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
809
810 %files monitor
811 %defattr(644,root,root,755)
812 %{_appdir}/include/class.monitor.php
813 %{_appdir}/monitor.php
814 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
815
816 %files route-emails
817 %defattr(644,root,root,755)
818 %{_appdir}/route_emails.php
819
820 %files route-notes
821 %defattr(644,root,root,755)
822 %{_appdir}/route_drafts.php
823 %{_appdir}/route_notes.php
824
825 %if %{with qmail}
826 %files router-qmail
827 %defattr(644,root,root,755)
828 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
829 %attr(755,root,root) %{_libdir}/router-qmail
830 %endif
831
832 %files router-postfix
833 %defattr(644,root,root,755)
834
835 %files irc
836 %defattr(644,root,root,755)
837 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
838 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
839 %{_appdir}/irc
840 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
841
842 %files cli
843 %defattr(644,root,root,755)
844 %doc eventumrc
845 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
846 %attr(755,root,root) %{_bindir}/%{name}
847 %{_appdir}/cli
848
849 %files scm
850 %defattr(644,root,root,755)
851 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
852 %attr(755,root,root) %{_libdir}/scm
This page took 0.090622 seconds and 4 git commands to generate.