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