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