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