]> git.pld-linux.org Git - packages/eventum.git/blob - eventum.spec
95831e45f568a8d2ad73fd6a25b7cbca82c54380
[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    2
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 \
541         include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
542         include/Smarty/plugins/modifier.highlight_quoted.php \
543         $RPM_BUILD_ROOT%{_smartyplugindir}
544
545 # qmail router
546 %if %{with qmail}
547 d=$RPM_BUILD_ROOT/var/lib/%{name}
548 echo 'root' > $d/.qmail
549 echo 'root' > $d/.qmail-default
550 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
551 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
552 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
553 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
554 %endif
555
556 %clean
557 rm -rf $RPM_BUILD_ROOT
558
559 %pre
560 %addusertogroup http %{name}
561
562 %post
563 # check if the package is configured.
564 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
565 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
566 %banner %{name} -e <<EOF
567
568 You haven't yet configured Eventum!
569 Please open in browser <http://localhost/eventum/>
570 If you need access from elsewhere, you need to edit
571 %{_sysconfdir}/apache.conf and restart apache.
572
573 IMPORTANT: When You have configured Eventum, please uninstall the
574 setup package, so that %{name}-setup is able to secure your Eventum
575 installation.
576
577 EOF
578 #' vim stupidity.
579 else
580 %banner %{name} -e <<EOF
581
582 You haven't yet configured Eventum!
583
584 To setup eventum, please install %{name}-setup and open in browser
585 <http://localhost/eventum/>.
586 If you need access from elsewhere, you need to edit
587 %{_sysconfdir}/apache.conf and restart apache.
588
589 IMPORTANT: When You have configured Eventum, please uninstall the
590 setup package, so that %{name}-setup is able to secure your Eventum
591 installation.
592
593 EOF
594 #' vim stupidity.
595 fi
596
597 elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
598 %banner %{name} -e <<EOF
599
600 You have default private key installed!
601
602 Install %{name}-setup and open up http://yourserver/eventum/setup/
603 -- that will help you setup initial config.
604
605 when have configured Eventum, please uninstall the setup package,
606 so that %{name}-setup is able to secure your Eventum installation.
607
608 EOF
609         elif [ -d %{_appdir}/setup ]; then
610 %banner %{name} -e <<EOF
611
612 If you have have configured Eventum, please uninstall the setup package,
613 so that %{name}-setup is able to secure your Eventum installation.
614
615 EOF
616 fi
617
618 # nuke Smarty templates cache after upgrade
619 rm -f /var/cache/eventum/*.php
620
621 %preun
622 if [ "$1" = "0" ]; then
623         # nuke cache
624         rm -f /var/cache/eventum/*.php 2>/dev/null || :
625 fi
626
627 %pre base
628 %groupadd -P %{name}-base -g 146 %{name}
629 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
630
631 %postun base
632 if [ "$1" = "0" ]; then
633         %userremove %{name}
634         %groupremove %{name}
635 fi
636
637 %if %{with qmail}
638 %post router-qmail
639 CF=/etc/qmail/control/virtualdomains
640 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
641         FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_sysconfdir}/config.php 2>/dev/null)
642         [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
643         umask 022
644         echo "#${FQDN}:%{name}" >> $CF
645
646 %banner %{name}-qmail -e <<EOF
647
648 Added "#${FQDN}:%{name}" to $CF,
649 Please verify that it is correct and restart qmail:
650 # service qmail reload
651
652 Consult qmail-send(8) for more information on virtualdomains.
653
654 EOF
655 fi
656
657 %preun router-qmail
658 if [ "$1" = "0" ]; then
659         sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
660 fi
661 %endif
662
663 %post setup
664 chmod 660 %{_sysconfdir}/{config,private_key}.php
665 chown root:eventum %{_sysconfdir}/{config,private_key}.php
666
667 %postun setup
668 if [ "$1" = "0" ]; then
669         chmod 640 %{_sysconfdir}/{config,private_key}.php
670         chown root:eventum %{_sysconfdir}/{config,private_key}.php
671 fi
672
673 %triggerin -- apache1 >= 1.3.33-2
674 %apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
675
676 %triggerun -- apache1 >= 1.3.33-2
677 %apache_config_uninstall -v 1
678
679 %triggerin -- apache >= 2.0.0
680 %apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
681
682 %triggerun -- apache >= 2.0.0
683 %apache_config_uninstall -v 2
684
685 # FIXME
686 # only one upgrade trigger is called if you're upgrading over two
687 # versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
688 # use common trigger (the highest version and rpmvercmp from poldek?)
689 %triggerpostun -- eventum < 1.5.1-0.257
690 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5_to_v1.5.1 <<EOF
691 database_changes.php Perform database changes
692 EOF
693
694 %triggerpostun -- eventum < 1.5.2-0.289
695 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.1_to_v1.5.2 <<EOF
696 database_changes.php Perform database changes
697 set_priority_ranks.php Fix the ranking of priority values
698 EOF
699
700 %triggerpostun -- eventum < 1.5.3-0.291
701 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.2_to_v1.5.3 <<EOF
702 database_changes.php Perform database changes
703 EOF
704
705 %triggerpostun -- eventum < 1.5.4-1.12
706 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.3_to_v1.5.4 <<EOF
707 database_changes.php Perform database changes
708 EOF
709
710 %triggerpostun -- eventum < 1.6.0-RC2.6
711 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.5_to_v1.6.0 <<EOF
712 database_changes.php Perform database changes
713 upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
714 EOF
715
716 %triggerpostun -- eventum < 1.6.1-0.2
717 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.0_to_v1.6.1 <<EOF
718 database_changes.php Perform database changes
719 EOF
720
721 %triggerpostun irc -- eventum-irc < 1.6.1
722 sed -i -e '
723 s,\$irc_host,$irc_server_hostname,
724 s,\$irc_port,$irc_server_port,
725 s,\$irc_nick,$nickname,
726 s,\$irc_realname,$realname,
727 s,\$irc_username,$username,
728 ' /etc/eventum/irc.php
729
730 %files
731 %defattr(644,root,root,755)
732 %doc ChangeLog FAQ INSTALL README UPGRADE
733 %doc docs/* rpc/xmlrpc_client.php setup/schema.sql
734 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
735 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
736 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
737 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
738 %attr(640,root,eventum) %config %verify(not mtime) %{_sysconfdir}/core.php
739
740 %dir %attr(731,root,eventum) /var/log/%{name}
741 %attr(620,root,eventum) %ghost /var/log/%{name}/*
742
743 %dir %{_appdir}/htdocs
744 %{_appdir}/htdocs/*.php
745 %{_appdir}/htdocs/*.ico
746 %{_appdir}/htdocs/css
747 %{_appdir}/htdocs/customer
748 %{_appdir}/htdocs/images
749 %{_appdir}/htdocs/js
750 %{_appdir}/htdocs/manage
751 %{_appdir}/htdocs/reports
752 %{_appdir}/htdocs/rpc
753 %{_appdir}/htdocs/misc
754
755 %{_appdir}/templates
756 %dir %{_appdir}/upgrade
757 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
758 %{_appdir}/upgrade/[!u]*
759
760 %{_smartyplugindir}/*
761 %if %{without pear}
762 %{_appdir}/include/pear
763 %endif
764
765 %dir %{_appdir}/include
766 %{_appdir}/include/customer
767 %{_appdir}/include/jpgraph
768 %{_appdir}/include/workflow
769 %{_appdir}/include/class.[!m]*.php
770 %{_appdir}/include/class.mail.php
771 %{_appdir}/include/class.mail_queue.php
772 %{_appdir}/include/class.mime_helper.php
773 %{_appdir}/include/class.misc.php
774 %{_appdir}/include/db_access.php
775
776 %dir %attr(730,root,eventum) /var/run/%{name}
777 %dir %attr(730,root,eventum) /var/cache/%{name}
778
779 %files base
780 %defattr(644,root,root,755)
781 %attr(751,root,root) %dir %{_sysconfdir}
782 %dir %{_libdir}
783 %dir %{_appdir}
784 # qmail will ignore user, if it's home directory is not owned
785 %attr(750,eventum,eventum) %dir /var/lib/%{name}
786 # for saved routed emails
787 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
788
789 %files setup
790 %defattr(644,root,root,755)
791 %{_appdir}/htdocs/setup
792
793 %files mail-queue
794 %defattr(644,root,root,755)
795 %{_appdir}/process_mail_queue.php
796 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
797
798 %files mail-download
799 %defattr(644,root,root,755)
800 %{_appdir}/download_emails.php
801 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
802
803 %files reminder
804 %defattr(644,root,root,755)
805 %{_appdir}/check_reminders.php
806 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
807
808 %files monitor
809 %defattr(644,root,root,755)
810 %{_appdir}/include/class.monitor.php
811 %{_appdir}/monitor.php
812 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
813
814 %files route-emails
815 %defattr(644,root,root,755)
816 %{_appdir}/route_emails.php
817
818 %files route-notes
819 %defattr(644,root,root,755)
820 %{_appdir}/route_drafts.php
821 %{_appdir}/route_notes.php
822
823 %if %{with qmail}
824 %files router-qmail
825 %defattr(644,root,root,755)
826 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
827 %attr(755,root,root) %{_libdir}/router-qmail
828 %endif
829
830 %files router-postfix
831 %defattr(644,root,root,755)
832
833 %files irc
834 %defattr(644,root,root,755)
835 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
836 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
837 %{_appdir}/irc
838 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
839
840 %files cli
841 %defattr(644,root,root,755)
842 %doc eventumrc
843 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
844 %attr(755,root,root) %{_bindir}/%{name}
845 %{_appdir}/cli
846
847 %files scm
848 %defattr(644,root,root,755)
849 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
850 %attr(755,root,root) %{_libdir}/scm
This page took 0.083826 seconds and 3 git commands to generate.