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