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