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