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