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