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