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