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