]> git.pld-linux.org Git - packages/eventum.git/blob - eventum.spec
- eventum 1.6.0-RC2
[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             RC2
20
21 %define _rel    6
22
23 %if 0%{?_snap}
24 %if 0%{?_rc}
25 %define _source http://pessoal.org/%{name}-%{version}-%{_rc}.tar.gz
26 %else
27 %define _source http://downloads.mysql.com/snapshots/%{name}/%{name}-nightly-%{_snap}.tar.gz
28 %endif
29 %else
30 %define _source http://mysql.dataphone.se/Downloads/%{name}/%{name}-%{version}.tar.gz
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.0
37 Release:        %{?_snap:0.%{_snap}.}%{?_rc:%{_rc}.}%{_rel}
38 License:        GPL
39 Group:          Applications/WWW
40 Source0:        %{_source}
41 # Source0-md5:  a13d95ff52264d7460c688419794ffcc
42 %{?_snap:NoSource:      0}
43 Source1:        %{name}-apache.conf
44 Source2:        %{name}-mail-queue.cron
45 Source3:        %{name}-mail-download.cron
46 Source4:        %{name}-reminder.cron
47 Source5:        %{name}-monitor.cron
48 Source6:        %{name}-cvs.php
49 Source7:        %{name}-irc.php
50 Source8:        %{name}-irc.init
51 Source9:        %{name}-irc.sysconfig
52 Source10:       %{name}-config.php
53 Source11:       %{name}-router-qmail.sh
54 Source12:       http://dev.mysql.com/common/favicon.ico
55 # Source12-md5: 858be0130832da4144c08d4b59116411
56 Source13:       %{name}-config-setup.php
57 Source14:       %{name}-upgrade.sh
58 Patch0:         %{name}-paths.patch
59 Patch1:         %{name}-cvs-config.patch
60 Patch2:         %{name}-irc-config.patch
61 Patch3:         %{name}-PEAR.patch
62 Patch4:         http://glen.alkohol.ee/pld/%{name}-reply-subject.patch
63 Patch5:         %{name}-lf.patch
64 Patch6:         http://glen.alkohol.ee/pld/%{name}-maq-subject.patch
65 Patch7:         %{name}-bot-reconnect.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 PreReq:         rc-scripts >= 0.4.0.18
359
360 %description irc
361 The IRC notification bot is a nice feature for remote teams that want
362 to handle issues and want to have a quick and easy way to get simple
363 notifications. Right now the bot notifies of the following actions:
364 - New Issues
365 - Blocked emails
366 - Issues that got their assignment list changed
367
368 NOTE: You will need to manually edit the bot.php script to set your
369 appropriate preferences, like IRC server and channel that the bot
370 should join.
371
372 %description irc -l pl
373 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
374 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
375 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
376 nastêpuj±cych zdarzeniach:
377 - nowych sprawach
378 - zablokowanych listach
379 - sprawach, dla których zmieni³a siê lista powi±zañ
380
381 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
382 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
383
384 %package cli
385 Summary:        Eventum command-line interface
386 Summary(pl):    Interfejs linii poleceñ dla Eventum
387 Group:          Applications/WWW
388 Requires:       %{name}-base = %{epoch}:%{version}-%{release}
389 Requires:       php >= 4.1.0
390 Requires:       php-cli
391 Requires:       php-curl
392 Requires:       php-xml
393 Requires:       php-pear-XML_RPC
394
395 %description cli
396 The Eventum command-line interface allows you to access most of the
397 features of the web interface straight from your command shell.
398
399 %description cli -l pl
400 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
401 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
402
403 %package scm
404 Summary:        Eventum SCM integration
405 Summary(pl):    Integracja SCM dla Eventum
406 Group:          Applications/WWW
407 Requires:       %{name}-base = %{epoch}:%{version}-%{release}
408 Requires:       php-cli >= 4.1.0
409 Requires:       php-pcre
410
411 %description scm
412 This feature allows your software development teams to integrate your
413 Source Control Management system with your Issue Tracking System.
414
415 The integration is implemented in such a way that it will be forward
416 compatible with pretty much any SCM system, such as CVS.
417
418 For installation see
419 </eventum/help.php?topic=scm_integration_installation>.
420
421 %description scm -l pl
422 Ten pakiet pozwala zespo³om programistów na integracjê systemu
423 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
424 ¶ledzenia spraw.
425
426 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
427 prawie ka¿dym systemem SCM, jak np. CVS.
428
429 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
430 </eventum/help.php?topic=scm_integration_installation>.
431
432 %prep
433 %setup -q %{?_snap:-n %{name}-%{_snap}}
434 # undos the source
435 find . -type f -print0 | xargs -0 sed -i -e 's,
436 $,,'
437
438 rm -f setup.conf.php
439 rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD
440
441 # packaging
442 %patch0 -p1 -b .paths
443 %patch1 -p1
444 %patch2 -p1
445 %{?with_pear:%patch3 -p1 -b .PEAR}
446
447 # bug fixes.
448 %patch4 -p1
449 %patch5 -p1
450 %patch6 -p1
451 %patch7 -p1
452 %patch22 -p1
453
454 # replace in remaining scripts config.inc.php to system one
455 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
456         s,include_once(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
457 '
458 sed -i -e '
459         s,include(".*config.inc.php"),include_once("%{_sysconfdir}/core.php"),
460 ' misc/download_emails.php
461
462 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
463         s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_sysconfdir}/private_key.php"),
464 '
465 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
466
467 %install
468 rm -rf $RPM_BUILD_ROOT
469 install -d \
470         $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_libdir}} \
471         $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
472         $RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
473         $RPM_BUILD_ROOT/var/lib/%{name}/routed_emails \
474         $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
475
476 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
477 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
478 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
479 cp -a misc/irc $RPM_BUILD_ROOT%{_appdir}
480 cp -a templates $RPM_BUILD_ROOT%{_appdir}
481 cp -a include/{customer,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
482 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
483 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
484 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
485
486 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
487 install %{SOURCE13} $RPM_BUILD_ROOT%{_appdir}/htdocs/setup/config.inc.php
488 install %{SOURCE14} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
489
490 # cli
491 install -d $RPM_BUILD_ROOT%{_appdir}/cli
492 install misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
493 install misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
494 sed -e '1s,#!.*/bin/php,#!%{_bindir}/php4,' \
495         misc/cli/eventum > $RPM_BUILD_ROOT%{_bindir}/%{name}
496 cp -f misc/cli/eventumrc_example eventumrc
497
498 # scm
499 echo '#!%{_bindir}/php4 -q' > %{name}-scm
500 cat misc/scm/process_cvs_commits.php >> %{name}-scm
501 install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
502
503 # private key
504 mv $RPM_BUILD_ROOT{%{_appdir}/include/private_key.php,%{_sysconfdir}}
505 # change private key, so we can easily grep
506 sed -i -e '
507 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
508 ' $RPM_BUILD_ROOT%{_sysconfdir}/private_key.php
509
510 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
511 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
512 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
513 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
514 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
515 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
516 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
517 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
518 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
519 sed -e 's,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}},' \
520         %{SOURCE10} > $RPM_BUILD_ROOT%{_sysconfdir}/core.php
521
522 # config
523 > $RPM_BUILD_ROOT%{_sysconfdir}/setup.php
524 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_sysconfdir}/config}.php
525
526 # sample, not used in eventum
527 rm -f $RPM_BUILD_ROOT%{_appdir}/htdocs/rpc/xmlrpc_client.php
528
529 %if %{with pear}
530 # provided by PEAR
531 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
532 %endif
533
534 # use system Smarty
535 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
536 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
537 # These plugins are not in Smarty package (Smarty-2.6.2-3)
538 cp -a include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
539         $RPM_BUILD_ROOT%{_smartyplugindir}
540
541 # qmail router
542 %if %{with qmail}
543 d=$RPM_BUILD_ROOT/var/lib/%{name}
544 echo 'root' > $d/.qmail
545 echo 'root' > $d/.qmail-default
546 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
547 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
548 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
549 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
550 %endif
551
552 %clean
553 rm -rf $RPM_BUILD_ROOT
554
555 %pre
556 %addusertogroup http %{name}
557
558 %post
559 # check if the package is configured.
560 if grep -q 'header("Location: setup/")' %{_sysconfdir}/config.php; then
561 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
562 %banner %{name} -e <<EOF
563
564 You haven't yet configured Eventum!
565 Please open in browser <http://localhost/eventum/>
566 If you need access from elsewhere, you need to edit
567 %{_sysconfdir}/apache.conf and restart apache.
568
569 IMPORTANT: When You have configured Eventum, please uninstall the
570 setup package, so that %{name}-setup is able to secure your Eventum
571 installation.
572
573 EOF
574 #' vim stupidity.
575 else
576 %banner %{name} -e <<EOF
577
578 You haven't yet configured Eventum!
579
580 To setup eventum, please install %{name}-setup and open in browser
581 <http://localhost/eventum/>.
582 If you need access from elsewhere, you need to edit
583 %{_sysconfdir}/apache.conf and restart apache.
584
585 IMPORTANT: When You have configured Eventum, please uninstall the
586 setup package, so that %{name}-setup is able to secure your Eventum
587 installation.
588
589 EOF
590 #' vim stupidity.
591 fi
592
593 elif grep -q 'DEFAULTPRIVATEKEY' %{_sysconfdir}/private_key.php; then
594 %banner %{name} -e <<EOF
595
596 You have default private key installed!
597
598 Install %{name}-setup and open up http://yourserver/eventum/setup/
599 -- that will help you setup initial config.
600
601 when have configured Eventum, please uninstall the setup package,
602 so that %{name}-setup is able to secure your Eventum installation.
603
604 EOF
605         elif [ -d %{_appdir}/setup ]; then
606 %banner %{name} -e <<EOF
607
608 If you have have configured Eventum, please uninstall the setup package,
609 so that %{name}-setup is able to secure your Eventum installation.
610
611 EOF
612 fi
613
614 # nuke Smarty templates cache after upgrade
615 rm -f /var/cache/eventum/*.php
616
617 %preun
618 if [ "$1" = "0" ]; then
619         # nuke cache
620         rm -f /var/cache/eventum/*.php 2>/dev/null || :
621 fi
622
623 %pre base
624 %groupadd -P %{name}-base -g 146 %{name}
625 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
626
627 %postun base
628 if [ "$1" = "0" ]; then
629         %userremove %{name}
630         %groupremove %{name}
631 fi
632
633 %if %{with qmail}
634 %post router-qmail
635 CF=/etc/qmail/control/virtualdomains
636 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
637         FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_sysconfdir}/config.php 2>/dev/null)
638         [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
639         umask 022
640         echo "#${FQDN}:%{name}" >> $CF
641
642 %banner %{name}-qmail -e <<EOF
643
644 Added "#${FQDN}:%{name}" to $CF,
645 Please verify that it is correct and restart qmail:
646 # service qmail reload
647
648 Consult qmail-send(8) for more information on virtualdomains.
649
650 EOF
651 fi
652
653 %preun router-qmail
654 if [ "$1" = "0" ]; then
655         sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
656 fi
657 %endif
658
659 %post setup
660 chmod 660 %{_sysconfdir}/{config,private_key}.php
661 chown root:eventum %{_sysconfdir}/{config,private_key}.php
662
663 %postun setup
664 if [ "$1" = "0" ]; then
665         chmod 640 %{_sysconfdir}/{config,private_key}.php
666         chown root:eventum %{_sysconfdir}/{config,private_key}.php
667 fi
668
669 %triggerin -- apache1 >= 1.3.33-2
670 %apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
671
672 %triggerun -- apache1 >= 1.3.33-2
673 %apache_config_uninstall -v 1
674
675 %triggerin -- apache >= 2.0.0
676 %apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
677
678 %triggerun -- apache >= 2.0.0
679 %apache_config_uninstall -v 2
680
681 # FIXME
682 # only one upgrade trigger is called if you're upgrading over two
683 # versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
684 # use common trigger (the highest version and rpmvercmp from poldek?)
685 %triggerpostun -- eventum < 1.5.1-0.257
686 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5_to_v1.5.1 <<EOF
687 database_changes.php Perform database changes
688 EOF
689
690 %triggerpostun -- eventum < 1.5.2-0.289
691 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.1_to_v1.5.2 <<EOF
692 database_changes.php Perform database changes
693 set_priority_ranks.php Fix the ranking of priority values
694 EOF
695
696 %triggerpostun -- eventum < 1.5.3-0.291
697 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.2_to_v1.5.3 <<EOF
698 database_changes.php Perform database changes
699 EOF
700
701 %triggerpostun -- eventum < 1.5.4-1.12
702 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.3_to_v1.5.4 <<EOF
703 database_changes.php Perform database changes
704 EOF
705
706 %triggerpostun -- eventum < 1.6.0-RC2.6
707 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.5_to_v1.6.0 <<EOF
708 database_changes.php Perform database changes
709 upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
710 EOF
711
712 %files
713 %defattr(644,root,root,755)
714 %doc ChangeLog FAQ INSTALL README UPGRADE
715 %doc docs/* rpc/xmlrpc_client.php setup/schema.sql
716 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
717 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
718 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/private_key.php
719 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/setup.php
720 %attr(640,root,eventum) %config %verify(not mtime) %{_sysconfdir}/core.php
721
722 %dir %attr(731,root,eventum) /var/log/%{name}
723 %attr(620,root,eventum) %ghost /var/log/%{name}/*
724
725 %dir %{_appdir}/htdocs
726 %{_appdir}/htdocs/*.php
727 %{_appdir}/htdocs/*.ico
728 %{_appdir}/htdocs/css
729 %{_appdir}/htdocs/customer
730 %{_appdir}/htdocs/images
731 %{_appdir}/htdocs/js
732 %{_appdir}/htdocs/manage
733 %{_appdir}/htdocs/reports
734 %{_appdir}/htdocs/rpc
735 %{_appdir}/htdocs/misc
736
737 %{_appdir}/templates
738 %dir %{_appdir}/upgrade
739 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
740 %{_appdir}/upgrade/[!u]*
741
742 %{_smartyplugindir}/*
743 %if %{without pear}
744 %{_appdir}/include/pear
745 %endif
746
747 %dir %{_appdir}/include
748 %{_appdir}/include/customer
749 %{_appdir}/include/jpgraph
750 %{_appdir}/include/workflow
751 %{_appdir}/include/class.[!m]*.php
752 %{_appdir}/include/class.mail.php
753 %{_appdir}/include/class.mail_queue.php
754 %{_appdir}/include/class.mime_helper.php
755 %{_appdir}/include/class.misc.php
756 %{_appdir}/include/db_access.php
757
758 %dir %attr(730,root,eventum) /var/run/%{name}
759 %dir %attr(730,root,eventum) /var/cache/%{name}
760
761 %files base
762 %defattr(644,root,root,755)
763 %attr(751,root,root) %dir %{_sysconfdir}
764 %dir %{_libdir}
765 %dir %{_appdir}
766 # qmail will ignore user, if it's home directory is not owned
767 %attr(750,eventum,eventum) %dir /var/lib/%{name}
768 # for saved routed emails
769 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
770
771 %files setup
772 %defattr(644,root,root,755)
773 %{_appdir}/htdocs/setup
774
775 %files mail-queue
776 %defattr(644,root,root,755)
777 %{_appdir}/process_mail_queue.php
778 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
779
780 %files mail-download
781 %defattr(644,root,root,755)
782 %{_appdir}/download_emails.php
783 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
784
785 %files reminder
786 %defattr(644,root,root,755)
787 %{_appdir}/check_reminders.php
788 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
789
790 %files monitor
791 %defattr(644,root,root,755)
792 %{_appdir}/include/class.monitor.php
793 %{_appdir}/monitor.php
794 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
795
796 %files route-emails
797 %defattr(644,root,root,755)
798 %{_appdir}/route_emails.php
799
800 %files route-notes
801 %defattr(644,root,root,755)
802 %{_appdir}/route_drafts.php
803 %{_appdir}/route_notes.php
804
805 %if %{with qmail}
806 %files router-qmail
807 %defattr(644,root,root,755)
808 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
809 %attr(755,root,root) %{_libdir}/router-qmail
810 %endif
811
812 %files router-postfix
813 %defattr(644,root,root,755)
814
815 %files irc
816 %defattr(644,root,root,755)
817 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
818 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
819 %{_appdir}/irc
820 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
821
822 %files cli
823 %defattr(644,root,root,755)
824 %doc eventumrc
825 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
826 %attr(755,root,root) %{_bindir}/%{name}
827 %{_appdir}/cli
828
829 %files scm
830 %defattr(644,root,root,755)
831 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
832 %attr(755,root,root) %{_libdir}/scm
This page took 0.148279 seconds and 3 git commands to generate.