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