]> git.pld-linux.org Git - packages/eventum.git/blob - eventum.spec
- R php-pear-Mail_Mime, 20060306 snap
[packages/eventum.git] / eventum.spec
1 # TODO
2 # - discard bundled packages (from INSTALL):
3 #  - JpGraph 1.5.3 (last GPL version)
4 #  - dTree 2.0.5 (http://www.destroydrop.com/javascript/tree/)
5 #  - dynCalendar.js (http://www.phpguru.org/dyncalendar.html)
6 #  - overLIB 3.5.1 (http://www.bosrup.com/web/overlib/)
7 #  - A few other small javascript libraries
8 # - 64bit platforms beware? http://bugs.php.net/bug.php?id=30215 (it's actually Smarty related problem)
9 #
10 # Conditional build:
11 %bcond_without  pear    # build with system PEAR packages (or use bundled ones)
12 %bcond_with     qmail   # build the router-qmail subpackage
13 #
14 # snapshot: DATE
15 %define _snap 20060306
16
17 %define _rel    0.2
18
19 %{?with_pear:%include   /usr/lib/rpm/macros.php}
20 Summary:        Eventum Issue / Bug tracking system
21 Summary(pl):    Eventum - system ¶ledzenia spraw/b³êdów
22 Name:           eventum
23 Version:        1.7.0
24 Release:        %{?_snap:4.%{_snap}.}%{?_rc:%{_rc}.}%{_rel}
25 License:        GPL
26 Group:          Applications/WWW
27 #Source0:       http://mysql.dataphone.se/Downloads/%{name}/%{name}-%{version}.tar.gz
28 Source0:        http://downloads.mysql.com/snapshots/eventum/%{name}-nightly-%{_snap}.tar.gz
29 # Source0-md5:  1cc82b6e8a502c65341510400b6b1971
30 Source1:        %{name}-apache.conf
31 Source2:        %{name}-mail-queue.cron
32 Source3:        %{name}-mail-download.cron
33 Source4:        %{name}-reminder.cron
34 Source5:        %{name}-monitor.cron
35 Source6:        %{name}-cvs.php
36 Source7:        %{name}-irc.php
37 Source8:        %{name}-irc.init
38 Source9:        %{name}-irc.sysconfig
39 Source10:       %{name}-config.php
40 Source11:       %{name}-router-qmail.sh
41 Source12:       %{name}-config-setup.php
42 Source13:       %{name}-upgrade.sh
43 Source14:       %{name}-router-postfix.sh
44 Patch0:         %{name}-paths.patch
45 Patch1:         %{name}-cvs-config.patch
46 Patch2:         %{name}-irc-config.patch
47 Patch3:         %{name}-PEAR.patch
48 Patch4:         http://glen.alkohol.ee/pld/%{name}-reply-subject.patch
49 Patch5:         %{name}-lf.patch
50 Patch6:         http://glen.alkohol.ee/pld/%{name}-maq-subject.patch
51 Patch7:         %{name}-bot-reconnect.patch
52 Patch8:         %{name}-perms.patch
53 Patch9:         http://glen.alkohol.ee/pld/%{name}-httpclient-clientside.patch
54 Patch10:        %{name}-cli-wr-separated.patch
55 Patch12:        %{name}-htmloptions-truncate.patch
56 Patch13:        http://glen.alkohol.ee/pld/%{name}-link_filter-updates.patch
57 Patch14:        http://glen.alkohol.ee/pld/%{name}-irc-mem.patch
58 Patch16:        http://glen.alkohol.ee/pld/%{name}-recent_activity-usability.patch
59 Patch17:        http://glen.alkohol.ee/pld/%{name}-upload-error-keep-popup.patch
60 Patch18:        http://glen.alkohol.ee/pld/%{name}-scm-parse-response.patch
61 Patch19:        %{name}-double-decode.patch
62 Patch20:        http://glen.alkohol.ee/pld/%{name}-keep-submitbutton.patch
63 Patch21:        http://glen.alkohol.ee/pld/%{name}-tt-unhide.patch
64 Patch22:        %{name}-route-mem.patch
65 URL:            http://dev.mysql.com/downloads/other/eventum/
66 %{?with_pear:BuildRequires:     rpm-php-pearprov >= 4.0.2-98}
67 BuildRequires:  rpmbuild(macros) >= 1.268
68 BuildRequires:  sed >= 4.0
69 Requires:       %{name}-base = %{version}-%{release}
70 Requires:       Smarty >= 2.6.10-4
71 Requires:       php >= 3:4.2.0
72 Requires:       php-gd
73 Requires:       php-imap
74 Requires:       php-mysql
75 Requires:       php-pcre
76 Requires:       php-session
77 %if %{with pear}
78 Requires:       php-pear-Benchmark
79 Requires:       php-pear-DB
80 Requires:       php-pear-Date
81 Requires:       php-pear-HTTP_Request
82 Requires:       php-pear-Mail
83 Requires:       php-pear-Mail_Mime
84 Requires:       php-pear-Math_Stats
85 Requires:       php-pear-Net_DIME
86 Requires:       php-pear-Net_SMTP
87 Requires:       php-pear-Net_Socket
88 Requires:       php-pear-Net_URL
89 Requires:       php-pear-Net_UserAgent_Detect
90 Requires:       php-pear-PEAR-core
91 Requires:       php-pear-Text_Diff
92 Requires:       php-pear-XML_RPC
93 %endif
94 Requires(triggerpostun):        /usr/bin/php
95 Requires(triggerpostun):        sed >= 4.0
96 Requires:       apache(mod_dir)
97 Requires:       webapps
98 Requires:       webserver = apache
99 BuildArch:      noarch
100 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
101
102 %define         _noautoreq      'pear(/etc/webapps/.*)' 'pear(jpgraph_dir.php)' 'pear(.*Smarty.class.php)'
103
104 %define         _libdir         %{_prefix}/lib/%{name}
105 %define         _appdir         %{_datadir}/%{name}
106 %define         _smartyplugindir        %{_appdir}/include/smarty
107 %define         _smartydir      /usr/share/php/Smarty
108 %define         _webapps        /etc/webapps
109 %define         _webapp         %{name}
110 %define         _webappdir      %{_webapps}/%{_webapp}
111 %define         _sysconfdir     /etc/%{name}
112
113 %description
114 Eventum is a user-friendly and flexible issue tracking system that can
115 be used by a support department to track incoming technical support
116 requests, or by a software development team to quickly organize tasks
117 and bugs. Eventum is used by the MySQL AB Technical Support team, and
118 has allowed us to dramatically improve our response times.
119
120 %description -l pl
121 Eventum to przyjazny dla u¿ytkownika system ¶ledzenia spraw, który
122 mo¿e byæ u¿ywany przez dzia³ obs³ugi do ¶ledzenia przychodz±cych ¿±dañ
123 obs³ugi technicznej albo przez zespó³ tworz±cy oprogramowanie do
124 szybkiej organizacji zadañ i b³êdów. Eventum jest u¿ywany przez zespó³
125 Technical Support MySQL AB i umo¿liwi³ im znacz±co poprawiæ czasy
126 reakcji.
127
128 %package base
129 Summary:        Eventum base package
130 Summary(pl):    Podstawowy pakiet Eventum
131 Group:          Applications/WWW
132 Requires(postun):       /usr/sbin/groupdel
133 Requires(postun):       /usr/sbin/userdel
134 Requires(pre):  /bin/id
135 Requires(pre):  /usr/bin/getgid
136 Requires(pre):  /usr/sbin/groupadd
137 Requires(pre):  /usr/sbin/useradd
138 Provides:       group(eventum)
139 Provides:       user(eventum)
140
141 %description base
142 This package contains base directory structure for Eventum.
143
144 %description base -l pl
145 Ten pakiet zawiera podstawow± strukturê katalogów dla Eventum.
146
147 %package setup
148 Summary:        Eventum setup package
149 Summary(pl):    Pakiet do wstêpnej konfiguracji Eventum
150 Group:          Applications/WWW
151 Requires:       %{name} = %{version}-%{release}
152
153 %description setup
154 Install this package to configure initial Eventum installation. You
155 should uninstall this package when you're done, as it considered
156 insecure to keep the setup files in place.
157
158 %description setup -l pl
159 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji Eventum po
160 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
161 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
162
163 %package mail-queue
164 Summary:        Eventum mail queue process
165 Summary(pl):    Przetwarzanie kolejki poczty Eventum
166 Group:          Applications/WWW
167 Requires:       %{name} = %{version}-%{release}
168 Requires:       crondaemon
169
170 %description mail-queue
171 Beginning with the first release of Eventum, emails are not directly
172 sent out from the various scripts, but rather added to a mail queue
173 table that is processed by a cron job. If an email cannot be sent, it
174 will be marked as such in the mail queue log, and the cron job script
175 will re-try to send it again the next time it runs.
176
177 This package contains the cron job.
178
179 %description mail-queue -l pl
180 Od pierwszego wydania Eventum poczta nie jest wysy³ana bezpo¶rednio z
181 ró¿nych skryptów, lecz dodawana do kolejki przetwarzanej z crona.
182 Je¶li poczta nie mo¿e byæ wys³ana, bêdzie odpowiednio oznaczona w logu
183 kolejki poczty, a skrypt z crona bêdzie próbowa³ wys³aæ j± ponownie
184 nastêpnym razem.
185
186 Ten pakiet zawiera zadanie dla crona.
187
188 %package mail-download
189 Summary:        Eventum email download
190 Summary(pl):    ¦ci±ganie poczty Eventum
191 Group:          Applications/WWW
192 Requires:       %{name} = %{version}-%{release}
193 Requires:       crondaemon
194
195 %description mail-download
196 In order for Eventum's email integration feature to work, you need to
197 setup a cron job to run the script every so often.
198
199 This package contains the cron job.
200
201 %description mail-download -l pl
202 Aby integracja poczty elektronicznej w Eventum dzia³a³a, trzeba
203 ustawiæ zadanie crona, aby uruchamia³ odpowiedni skrypt wystarczaj±co
204 czêsto.
205
206 Ten pakiet zawiera zadanie dla crona.
207
208 %package reminder
209 Summary:        Eventum Reminder System
210 Summary(pl):    System przypominania dla Eventum
211 Group:          Applications/WWW
212 Requires:       %{name} = %{version}-%{release}
213 Requires:       crondaemon
214
215 %description reminder
216 The reminder system was designed with the objective as serving as a
217 safe net for issues that need attention. Depending on what
218 configuration you create, you may have several reminders (or alerts)
219 be sent out whenever an issue needs attention, for whatever parameter
220 you may deem necessary.
221
222 This package contains the cron job.
223
224 %description reminder -l pl
225 System przypominania zosta³ zaprojektowany tak, aby s³u¿y³ jako
226 bezpieczna sieæ dla spraw wymagaj±cych uwagi. W zale¿no¶ci od
227 konfiguracji mo¿na ustawiæ ró¿ne przypominajki (lub alarmy) wysy³ane
228 przy ka¿dej sprawie wymagaj±cej uwagi lub przy parametrze, który mo¿na
229 uwa¿aæ za potrzebny.
230
231 Ten pakiet zawiera zadanie dla crona.
232
233 %package monitor
234 Summary:        Eventum Heartbeat Monitor
235 Summary(pl):    Monitor ¿ycia dla Eventum
236 Group:          Applications/WWW
237 Requires:       %{name} = %{version}-%{release}
238 Requires:       crondaemon
239 Requires:       php-posix
240
241 %description monitor
242 The heartbeat monitor is a feature designed for the administrator that
243 wants to be alerted whenever a common problem in Eventum is detected,
244 like the database server not being available anymore, or maybe when
245 the recommended permissions for certain configuration files are
246 changed.
247
248 Please note that before running the heartbeat monitor, you may need to
249 customize some of the checks to be appropriate for your own system,
250 particularly the permission and file checks on
251 Monitor::checkConfiguration().
252
253 This package contains the cron job.
254
255 %description monitor -l pl
256 Monitor ¿ycia to funkcjonalno¶æ zaprojektowana dla administratora
257 chc±cego byæ alarmowanym przy ka¿dym wykryciu popularnego problemu z
258 Eventum, jak nie dzia³anie serwera bazy danych albo zmiana uprawnieñ
259 do plików konfiguracyjnych.
260
261 Nale¿y zauwa¿yæ, ¿e przed uruchomieniem tego monitora mo¿e byæ
262 konieczne dostosowanie niektórych testów do systemu, w szczególno¶ci
263 testów uprawnieñ i plików w Monitor::checkConfiguration().
264
265 Ten pakiet zawiera zadanie dla crona.
266
267 %package route-drafts
268 Summary:        Eventum Draft Routing
269 Summary(pl):    Przekazywanie szkiców dla Eventum
270 Group:          Applications/WWW
271 Requires:       %{name} = %{version}-%{release}
272 Requires:       eventum(router)
273
274 %description route-drafts
275 The draft routing feature is used to automatically associate a thread
276 of drafts into an Eventum issue. By setting up qmail (or even Postfix)
277 to deliver emails sent to a specific address (usually
278 draft-<number>@<domain>) to the above script, users are able to send
279 drafts written in their mail client to be stored in Eventum. These
280 drafts will NOT broadcasted to the notification list.
281
282 %description route-drafts -l pl
283 Przekazywanie szkiców s³u¿y do automatycznego wi±zania w±tku szkiców z
284 problemem w Eventum. Ustawiaj±c qmaila (czy nawet Postfiksa), aby
285 dostarcza³ pocztê wys³an± na podany adres (zwykle
286 draft-<liczba>@<domena>) do tego skryptu umo¿liwia siê u¿ytkownikom
287 wysy³anie szkiców napisanych w ich kliencie pocztowym do zapisania w
288 Eventum. Szkice te NIE bêd± wysy³ane na listê powiadomieñ.
289
290 %package route-emails
291 Summary:        Eventum Email Routing
292 Summary(pl):    Przekazywanie poczty dla Eventum
293 Group:          Applications/WWW
294 Requires:       %{name} = %{version}-%{release}
295 Requires:       eventum(router)
296
297 %description route-emails
298 The email routing feature is used to automatically associate a thread
299 of emails into an Eventum issue. By setting up qmail (or even postfix)
300 to deliver emails sent to a specific address (usually
301 issue-<number>@<domain>) to the above script, users are able to use
302 their email clients to reply to emails coming from Eventum, and those
303 replies will be automatically associated with the issue and
304 broadcasted to the entire notification list.
305
306 %description route-emails -l pl
307 Funkcjonalno¶æ przekazywania poczty s³u¿y do automatycznego wi±zania
308 w±tku listów ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
309 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
310 issue-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
311 u¿ywaæ klientów pocztowych do odpowiadania na listy przychodz±ce z
312 Eventum, a odpowiedzi te bêd± automatycznie wi±zane ze spraw± i
313 rozprowadzane do ca³ej listy og³oszeniowej.
314
315 %package route-notes
316 Summary:        Eventum Note Routing
317 Summary(pl):    Przekazywanie notatek dla Eventum
318 Group:          Applications/WWW
319 Requires:       %{name} = %{version}-%{release}
320 Requires:       eventum(router)
321
322 %description route-notes
323 The note routing feature is used to automatically associate a thread
324 of notes into an Eventum issue. By setting up qmail (or even postfix)
325 to deliver emails sent to a specific address (usually
326 note-<number>@<domain>) to the above script, users are able to use
327 their email clients to reply to internal notes coming from Eventum,
328 and those replies will be automatically associated with the issue and
329 broadcasted to the notification list staff members.
330
331 %description route-notes -l pl
332 Funkcjonalno¶æ przekazywania notatek s³u¿y do automatycznego wi±zania
333 w±tku notatek ze spraw± w Eventum. Po ustawieniu qmaila (czy nawet
334 postfiksa), aby dostarcza³ listy wysy³ane na pewien adres (zwykle
335 note-<numer>@<domena>) na powy¿szy skrypt, u¿ytkownicy bêd± mogli
336 u¿ywaæ klientów pocztowych do odpowiadania na wewnêtrzne notatki
337 pochodz±ce od Eventu, a odpowiedzi te bêd± automatycznie wi±zane ze
338 spraw± i rozprowadzane do cz³onków personelu listy og³oszeniowej.
339
340 %package router-qmail
341 Summary:        Eventum Mail Routing - qmail
342 Summary(pl):    Przekazywanie poczty Eventum - qmail
343 Group:          Applications/Mail
344 # loose dep is intentional. qmail subpackage isn't built on PLD
345 # builders and there really nothing changes.
346 Requires:       %{name} >= %{version}-%{release}
347 Requires:       qmail >= 1.03
348 Provides:       eventum(router)
349 Obsoletes:      eventum(router)
350
351 %description router-qmail
352 This package provides way of routing notes and emails back to Eventum
353 via qmail.
354
355 %description router-qmail -l pl
356 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
357 przez qmaila.
358
359 %package router-postfix
360 Summary:        Eventum Mail Routing - Postfix
361 Summary(pl):    Przekazywanie poczty Eventum - Postfix
362 Group:          Applications/Mail
363 Requires:       %{name} = %{version}-%{release}
364 Requires:       postfix
365 Provides:       eventum(router)
366 Obsoletes:      eventum(router)
367
368 %description router-postfix
369 This package provides way of routing notes and emails back to Eventum
370 via Postfix.
371
372 The Postfix configuration instructions you can find from
373 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
374
375 %description router-postfix -l pl
376 Ten pakiet udostêpnia metodê przekazywania notatek i listów do Eventum
377 przez Postfiksa.
378
379 Opis konfiguracji Postfiksa mo¿na znale¼æ pod adresem
380 <http://eventum.mysql.org/wiki/index.php/Setting_up_email_routing_with_postfix>.
381
382 %package irc
383 Summary:        Eventum IRC Notification Bot
384 Summary(pl):    IRC-owy bot powiadamiaj±cy dla Eventum
385 Group:          Applications/WWW
386 Requires(triggerpostun):        sed >= 4.0
387 Requires:       %{name} = %{version}-%{release}
388 Requires:       php-pear-Net_SmartIRC
389 Requires:       php-sockets
390 Requires:       rc-scripts >= 0.4.0.18
391
392 %description irc
393 The IRC notification bot is a nice feature for remote teams that want
394 to handle issues and want to have a quick and easy way to get simple
395 notifications. Right now the bot notifies of the following actions:
396 - New Issues
397 - Blocked emails
398 - Issues that got their assignment list changed
399
400 NOTE: You will need to manually edit the bot.php script to set your
401 appropriate preferences, like IRC server and channel that the bot
402 should join.
403
404 %description irc -l pl
405 IRC-owy bot powiadamiaj±cy to mi³a funkcjonalno¶æ dla zdalnych
406 zespo³ów chc±cych obs³ugiwaæ sprawy i mieæ szybki i ³atwy sposób na
407 uzyskiwanie prostych powiadomieñ. Aktualnie bot powiadamia o
408 nastêpuj±cych zdarzeniach:
409 - nowych sprawach
410 - zablokowanych listach
411 - sprawach, dla których zmieni³a siê lista powi±zañ
412
413 UWAGA: w celu wprowadzenia w³asnych ustawieñ, takich jak serwer IRC i
414 kana³ u¿ywany przez bota, trzeba rêcznie zmodyfikowaæ skrypt bot.php .
415
416 %package cli
417 Summary:        Eventum command-line interface
418 Summary(pl):    Interfejs linii poleceñ dla Eventum
419 Group:          Applications/WWW
420 Requires:       %{name}-base = %{version}-%{release}
421 Requires:       php-cli
422 Requires:       php-common >= 3:4.1.0
423 Requires:       php-curl
424 Requires:       php-pear-XML_RPC
425 Requires:       php-xml
426
427 %description cli
428 The Eventum command-line interface allows you to access most of the
429 features of the web interface straight from your command shell.
430
431 %description cli -l pl
432 Interfejs linii poleceñ Eventum pozwala na dostêp do wiêkszo¶ci
433 funkcji interfejsu WWW prosto z linii poleceñ pow³oki.
434
435 %package scm
436 Summary:        Eventum SCM integration
437 Summary(pl):    Integracja SCM dla Eventum
438 Group:          Applications/WWW
439 Requires:       %{name}-base = %{version}-%{release}
440 Requires:       php-cli
441 Requires:       php-common >= 3:4.1.0
442 Requires:       php-pcre
443
444 %description scm
445 This feature allows your software development teams to integrate your
446 Source Control Management system with your Issue Tracking System.
447
448 The integration is implemented in such a way that it will be forward
449 compatible with pretty much any SCM system, such as CVS.
450
451 For installation see
452 </eventum/help.php?topic=scm_integration_installation>.
453
454 %description scm -l pl
455 Ten pakiet pozwala zespo³om programistów na integracjê systemu
456 zarz±dzania ¼ród³ami (SCM - Source Control Management) z systemem
457 ¶ledzenia spraw.
458
459 Integracja jest zaimplementowana tak, aby byæ kompatybilna w przód z
460 prawie ka¿dym systemem SCM, jak np. CVS.
461
462 Szczegó³y na temat instalacji mo¿na przeczytaæ pod
463 </eventum/help.php?topic=scm_integration_installation>.
464
465 %prep
466 %setup -q %{?_snap:-n %{name}-%{_snap}}
467 # undos the source
468 find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,'
469
470 rm -f setup.conf.php # not to be installed by *.php glob
471 rm -rf misc/upgrade/*v1.[123]* # too old to support in PLD Linux
472 rm -f misc/upgrade/flush_compiled_templates.php
473 rm -rf misc/upgrade/*/upgrade_config.php # not needed nor supported in PLD Linux
474
475 # sample, not used in eventum
476 rm -f rpc/xmlrpc_client.php
477
478 # packaging
479 %patch0 -p1
480 %patch1 -p1
481 %patch14 -p1
482 %patch2 -p1
483 %{?with_pear:%patch3 -p1}
484
485 # bug fixes.
486 %patch4 -p1
487 %patch5 -p1
488 %patch6 -p1
489 %patch7 -p1
490 %patch8 -p1
491 %patch9 -p1
492 %patch10 -p1
493 %patch12 -p1
494 %patch13 -p1
495 %patch16 -p1
496 %patch17 -p1
497 %patch18 -p1
498 %patch19 -p1
499 %patch20 -p1
500 %patch21 -p1
501 %patch22 -p1
502
503 sed -e '1s,#!.*/bin/php -q,#!%{_bindir}/php,' misc/cli/eventum > %{name}-cli
504 sed -e '1i#!%{_bindir}/php' misc/scm/process_cvs_commits.php > %{name}-scm
505 sed -e '1i#!%{_bindir}/php' misc/irc/bot.php > %{name}-bot
506 mv misc/cli/eventumrc_example eventumrc
507 sed -i -e '1i#!%{_bindir}/php' misc/*.php
508 chmod +x misc/*.php
509
510 sed -e '
511 s,$private_key\s*=\s*".*";,$private_key = "DEFAULTPRIVATEKEYPLEASERUNSETUP!";,
512 ' < include/private_key.php > private_key.php.in
513 rm -f include/private_key.php
514
515 # replace in remaining scripts config.inc.php to system one
516 grep -rl 'include_once(".*config.inc.php")' . | xargs sed -i -e '
517         s,include_once(".*config.inc.php"),include_once("%{_webappdir}/core.php"),
518 '
519
520 grep -rl 'APP_INC_PATH..*"private_key.php"' . | xargs sed -i -e '
521         s,include_once(APP_INC_PATH.*"private_key.php"),include_once("%{_webappdir}/private_key.php"),
522 '
523
524 # remove backups from patching as we use globs to package files to buildroot
525 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
526
527 %install
528 rm -rf $RPM_BUILD_ROOT
529 install -d \
530         $RPM_BUILD_ROOT{%{_webappdir},%{_sysconfdir},%{_bindir},%{_sbindir},%{_libdir}} \
531         $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,sysconfig} \
532         $RPM_BUILD_ROOT/var/{run,log,cache,lib}/%{name} \
533         $RPM_BUILD_ROOT/var/lib/%{name}/routed_{emails,drafts,notes} \
534         $RPM_BUILD_ROOT%{_appdir}/{include,htdocs/misc,upgrade} \
535
536 cp -a *.php css customer images js manage reports rpc setup $RPM_BUILD_ROOT%{_appdir}/htdocs
537 cp -a misc/*.html $RPM_BUILD_ROOT%{_appdir}/htdocs/misc
538 cp -a misc/*.php $RPM_BUILD_ROOT%{_appdir}
539 cp -a templates $RPM_BUILD_ROOT%{_appdir}
540 cp -a include/{customer,custom_field,jpgraph,pear,workflow} $RPM_BUILD_ROOT%{_appdir}/include
541 cp -a include/*.php $RPM_BUILD_ROOT%{_appdir}/include
542 cp -a logs/* $RPM_BUILD_ROOT/var/log/%{name}
543 cp -a misc/upgrade $RPM_BUILD_ROOT%{_appdir}
544
545 cp -a favicon.ico $RPM_BUILD_ROOT%{_appdir}/htdocs/favicon.ico
546 install %{SOURCE12} $RPM_BUILD_ROOT%{_appdir}/htdocs/setup/config.inc.php
547 install %{SOURCE13} $RPM_BUILD_ROOT%{_appdir}/upgrade/upgrade.sh
548
549 # cli
550 install -d $RPM_BUILD_ROOT%{_appdir}/cli
551 cp -a misc/cli/include/class.{misc,command_line}.php $RPM_BUILD_ROOT%{_appdir}/cli
552 cp -a misc/cli/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/cli.php
553 install %{name}-cli $RPM_BUILD_ROOT%{_bindir}/%{name}
554 install %{name}-bot $RPM_BUILD_ROOT%{_sbindir}
555
556 # scm
557 install %{name}-scm $RPM_BUILD_ROOT%{_libdir}/scm
558 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cvs.php
559
560 # private key
561 cp -a private_key.php.in $RPM_BUILD_ROOT%{_webappdir}/private_key.php
562
563 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
564 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
565 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-queue
566 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name}-mail-download
567 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/%{name}-reminder
568 install %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}-monitor
569 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/irc.php
570 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/eventum-irc
571 install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/eventum-irc
572
573 sed -e '
574 s,%%{APP_VERSION}%%,%{version}%{?_snap:-%{_snap}},
575 s,%%{PHP_PEAR_DIR}%%,%{?with_pear:%{php_pear_dir}}%{!?with_pear:%{_appdir}/includes/pear},
576 s,%%{APP_PATH}%%,%{_appdir},
577 s,%%{SMARTY_DIR}%%,%{_smartydir},
578 s,%%{SYSCONFDIR}%%,%{_webappdir},
579 ' %{SOURCE10} > $RPM_BUILD_ROOT%{_webappdir}/core.php
580
581 # config
582 > $RPM_BUILD_ROOT%{_webappdir}/setup.php
583 mv $RPM_BUILD_ROOT{%{_appdir}/htdocs/config.inc,%{_webappdir}/config}.php
584
585 %if %{with pear}
586 # provided by PEAR
587 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/pear
588 %endif
589
590 # use system Smarty
591 rm -rf $RPM_BUILD_ROOT%{_appdir}/include/Smarty
592 install -d $RPM_BUILD_ROOT%{_smartyplugindir}
593 # These plugins are not in Smarty package (Smarty-2.6.2-3)
594 cp -a \
595         include/Smarty/plugins/function.{calendar,get_{display_style,innerhtml,textarea_size}}.php \
596         include/Smarty/plugins/modifier.highlight_quoted.php \
597         $RPM_BUILD_ROOT%{_smartyplugindir}
598
599 # qmail router
600 %if %{with qmail}
601 d=$RPM_BUILD_ROOT/var/lib/%{name}
602 echo 'root' > $d/.qmail
603 echo 'root' > $d/.qmail-default
604 echo '| %{_libdir}/router-qmail drafts' > $d/.qmail-draft-default
605 echo '| %{_libdir}/router-qmail emails 1' > $d/.qmail-issue-default
606 echo '| %{_libdir}/router-qmail notes' > $d/.qmail-note-default
607 install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/router-qmail
608 %endif
609 # postfix router
610 install %{SOURCE14} $RPM_BUILD_ROOT%{_libdir}/router-postfix
611
612 %clean
613 rm -rf $RPM_BUILD_ROOT
614
615 %pre
616 %addusertogroup http %{name}
617
618 %post
619 # check if the package is configured.
620 if grep -q 'header("Location: setup/")' %{_webappdir}/config.php; then
621 if [ -f %{_appdir}/htdocs/setup/index.php ]; then
622 %banner %{name} -e <<EOF
623
624 You haven't yet configured Eventum!
625 Please open in browser <http://localhost/eventum/>
626 If you need access from elsewhere, you need to edit
627 %{_webappdir}/apache.conf and restart apache.
628
629 IMPORTANT: When You have configured Eventum, please uninstall the
630 setup package, so that %{name}-setup is able to secure your Eventum
631 installation.
632
633 EOF
634 #' vim syntax hack
635 else
636 %banner %{name} -e <<EOF
637
638 You haven't yet configured Eventum!
639
640 To setup eventum, please install %{name}-setup and open in browser
641 <http://localhost/eventum/>.
642 If you need access from elsewhere, you need to edit
643 %{_webappdir}/apache.conf and restart apache.
644
645 IMPORTANT: When You have configured Eventum, please uninstall the
646 setup package, so that %{name}-setup is able to secure your Eventum
647 installation.
648
649 EOF
650 #' vim syntax hack
651 fi
652
653 elif grep -q 'DEFAULTPRIVATEKEY' %{_webappdir}/private_key.php; then
654 %banner %{name} -e <<EOF
655
656 You have default private key installed!
657
658 Install %{name}-setup and open up http://yourserver/eventum/setup/
659 -- that will help you setup initial config.
660
661 when have configured Eventum, please uninstall the setup package,
662 so that %{name}-setup is able to secure your Eventum installation.
663
664 EOF
665         elif [ -d %{_appdir}/setup ]; then
666 %banner %{name} -e <<EOF
667
668 If you have have configured Eventum, please uninstall the setup package,
669 so that %{name}-setup is able to secure your Eventum installation.
670
671 EOF
672 fi
673
674 # nuke Smarty templates cache after upgrade
675 rm -f /var/cache/eventum/*.php
676
677 %preun
678 if [ "$1" = "0" ]; then
679         # nuke cache
680         rm -f /var/cache/eventum/*.php 2>/dev/null || :
681 fi
682
683 %pre base
684 %groupadd -P %{name}-base -g 146 %{name}
685 %useradd -P %{name}-base -u 146 -d /var/lib/%{name} -g %{name} -c "Eventum User" %{name}
686
687 %postun base
688 if [ "$1" = "0" ]; then
689         %userremove %{name}
690         %groupremove %{name}
691 fi
692
693 %post router-qmail
694 CF=/etc/qmail/control/virtualdomains
695 if ! grep -q ':%{name}\b' $CF 2>/dev/null; then
696         FQDN=$(awk -F'"' '/define/ && $2 ~ /APP_HOSTNAME/ {print $4}' %{_webappdir}/config.php 2>/dev/null)
697         [ "$FQDN" ] || FQDN=$(hostname -f 2>/dev/null || echo localhost)
698         umask 022
699         echo "#${FQDN}:%{name}" >> $CF
700
701 %banner %{name}-qmail -e <<EOF
702
703 Added "#${FQDN}:%{name}" to $CF,
704 Please verify that it is correct and restart qmail:
705 # service qmail reload
706
707 Consult qmail-send(8) for more information on virtualdomains.
708
709 EOF
710 fi
711
712 %preun router-qmail
713 if [ "$1" = "0" ]; then
714         sed -i -e '/:%{name}\b/d' /etc/qmail/control/virtualdomains
715 fi
716
717 %post setup
718 chmod 660 %{_webappdir}/{config,private_key}.php
719 chown root:eventum %{_webappdir}/{config,private_key}.php
720
721 %postun setup
722 if [ "$1" = "0" ]; then
723         chmod 640 %{_webappdir}/{config,private_key}.php
724         chown root:eventum %{_webappdir}/{config,private_key}.php
725 fi
726
727 %post irc
728 /sbin/chkconfig --add eventum-irc
729 %service eventum-irc restart "Eventum IRC Bot"
730
731 %triggerin -- apache1
732 %webapp_register apache %{_webapp}
733
734 %triggerun -- apache1
735 %webapp_unregister apache %{_webapp}
736
737 %triggerin -- apache >= 2.0.0
738 %webapp_register httpd %{_webapp}
739
740 %triggerun -- apache >= 2.0.0
741 %webapp_unregister httpd %{_webapp}
742
743 # FIXME
744 # only one upgrade trigger is called if you're upgrading over two
745 # versions, say 1.5 to 1.5.3, only 1.5.3 trigger is called.
746 # use common trigger (the highest version and rpmvercmp from poldek?)
747 %triggerpostun -- eventum < 1.5.1-0.257
748 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5_to_v1.5.1 <<EOF
749 database_changes.php Perform database changes
750 EOF
751
752 %triggerpostun -- eventum < 1.5.2-0.289
753 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.1_to_v1.5.2 <<EOF
754 database_changes.php Perform database changes
755 set_priority_ranks.php Fix the ranking of priority values
756 EOF
757
758 %triggerpostun -- eventum < 1.5.3-0.291
759 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.2_to_v1.5.3 <<EOF
760 database_changes.php Perform database changes
761 EOF
762
763 %triggerpostun -- eventum < 1.5.4-1.12
764 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.3_to_v1.5.4 <<EOF
765 database_changes.php Perform database changes
766 EOF
767
768 %triggerpostun -- eventum < 1.6.0-RC2.6
769 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.5.5_to_v1.6.0 <<EOF
770 database_changes.php Perform database changes
771 upgrade_saved_searches.php Upgrade existing custom filters (saved searches)
772 EOF
773
774 %triggerpostun -- eventum < 1.6.1-0.2
775 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.0_to_v1.6.1 <<EOF
776 database_changes.php Perform database changes
777 EOF
778
779 %triggerpostun irc -- eventum-irc < 1.6.1-3.14
780 sed -i -e '
781 s,\$irc_host,$irc_server_hostname,
782 s,\$irc_port,$irc_server_port,
783 s,\$irc_nick,$nickname,
784 s,\$irc_realname,$realname,
785 s,\$irc_username,$username,
786 s,\$irc_password,$password,
787 ' /etc/eventum/irc.php
788
789 %triggerpostun -- eventum < 1.7.0-2.0.48
790 # migrate from apache-config macros
791 if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
792         if [ -d /etc/apache/webapps.d ]; then
793                 cp -f %{_webapps}/%{_webapp}/apache.conf{,.rpmnew}
794                 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/apache.conf
795         fi
796
797         if [ -d /etc/httpd/webapps.d ]; then
798                 cp -f %{_webapps}/%{_webapp}/httpd.conf{,.rpmnew}
799                 cp -f /etc/%{name}/apache.conf.rpmsave %{_webapps}/%{_webapp}/httpd.conf
800         fi
801 fi
802
803 if [ -L /etc/apache/conf.d/99_%{_webapp}.conf ]; then
804         /usr/sbin/webapp register apache %{_webapp}
805         rm -f /etc/apache/conf.d/99_%{_webapp}.conf
806         %service -q apache reload
807 fi
808 if [ -L /etc/httpd/httpd.conf/99_%{_webapp}.conf ]; then
809         /usr/sbin/webapp register httpd %{_webapp}
810         rm -f /etc/httpd/httpd.conf/99_%{_webapp}.conf
811         %service -q httpd reload
812 fi
813
814 %{_appdir}/upgrade/upgrade.sh %{_appdir}/upgrade/v1.6.1_to_v1.7.0 <<EOF
815 database_changes.php Perform database changes
816 set_root_message_ids.php Set iss_root_message_id
817 EOF
818
819 # regular configs
820 for i in apache.conf config.php private_key.php setup.php; do
821         if [ -f /etc/eventum/$i.rpmsave ]; then
822                 mv -f %{_webappdir}/$i{,.rpmnew}
823                 mv -f /etc/eventum/$i.rpmsave %{_webappdir}/$i
824         fi
825 done
826
827 %triggerpostun cli -- %{name}-cli < 1.7.0-3.4
828 if [ -f %{_webappdir}/cli.php.rpmsave ]; then
829         mv -f %{_sysconfdir}/cli.php{,.rpmnew}
830         mv -f %{_webappdir}/cli.php.rpmsave %{_sysconfdir}/cli.php
831 fi
832
833 %triggerpostun irc -- %{name}-irc < 1.7.0-3.4
834 if [ -f %{_webappdir}/irc.php.rpmsave ]; then
835         mv -f %{_sysconfdir}/irc.php{,.rpmnew}
836         mv -f %{_webappdir}/irc.php.rpmsave %{_sysconfdir}/irc.php
837 fi
838
839 %files
840 %defattr(644,root,root,755)
841 %doc ChangeLog FAQ INSTALL README UPGRADE CONTRIB
842 %doc docs/* setup/schema.sql
843 %attr(751,root,root) %dir %{_webappdir}
844 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
845 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
846 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
847 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/private_key.php
848 %attr(660,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/setup.php
849 %attr(640,root,eventum) %config %verify(not mtime) %{_webappdir}/core.php
850
851 %dir %attr(731,root,eventum) /var/log/%{name}
852 %attr(620,root,eventum) %ghost /var/log/%{name}/*
853
854 %dir %{_appdir}/htdocs
855 %{_appdir}/htdocs/*.php
856 %{_appdir}/htdocs/*.ico
857 %{_appdir}/htdocs/css
858 %{_appdir}/htdocs/customer
859 %{_appdir}/htdocs/images
860 %{_appdir}/htdocs/js
861 %{_appdir}/htdocs/manage
862 %{_appdir}/htdocs/reports
863 %{_appdir}/htdocs/rpc
864 %{_appdir}/htdocs/misc
865
866 %{_appdir}/templates
867 %dir %{_appdir}/upgrade
868 %attr(755,root,root) %{_appdir}/upgrade/upgrade.sh
869 %{_appdir}/upgrade/[!u]*
870
871 %{_smartyplugindir}
872 %if %{without pear}
873 %{_appdir}/include/pear
874 %endif
875
876 %dir %{_appdir}/include
877 %{_appdir}/include/customer
878 %{_appdir}/include/custom_field
879 %{_appdir}/include/jpgraph
880 %{_appdir}/include/workflow
881 %{_appdir}/include/class.[!m]*.php
882 %{_appdir}/include/class.mail.php
883 %{_appdir}/include/class.mail_queue.php
884 %{_appdir}/include/class.mime_helper.php
885 %{_appdir}/include/class.misc.php
886 %{_appdir}/include/db_access.php
887
888 %dir %attr(730,root,eventum) /var/run/%{name}
889 %dir %attr(730,root,eventum) /var/cache/%{name}
890
891 %files base
892 %defattr(644,root,root,755)
893 %attr(751,root,root) %dir %{_sysconfdir}
894 %dir %{_libdir}
895 %dir %{_appdir}
896 # qmail will ignore user, if it's home directory is not owned
897 %attr(750,eventum,eventum) %dir /var/lib/%{name}
898 # saved mail copies
899 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_emails
900 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_drafts
901 %attr(770,root,eventum) %dir /var/lib/%{name}/routed_notes
902
903 %files setup
904 %defattr(644,root,root,755)
905 %{_appdir}/htdocs/setup
906
907 %files mail-queue
908 %defattr(644,root,root,755)
909 %attr(755,root,root) %{_appdir}/process_mail_queue.php
910 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-queue
911
912 %files mail-download
913 %defattr(644,root,root,755)
914 %attr(755,root,root) %{_appdir}/download_emails.php
915 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-mail-download
916
917 %files reminder
918 %defattr(644,root,root,755)
919 %attr(755,root,root) %{_appdir}/check_reminders.php
920 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-reminder
921
922 %files monitor
923 %defattr(644,root,root,755)
924 %{_appdir}/include/class.monitor.php
925 %attr(755,root,root) %{_appdir}/monitor.php
926 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}-monitor
927
928 %files route-drafts
929 %defattr(644,root,root,755)
930 %attr(755,root,root) %{_appdir}/route_drafts.php
931
932 %files route-emails
933 %defattr(644,root,root,755)
934 %attr(755,root,root) %{_appdir}/route_emails.php
935
936 %files route-notes
937 %defattr(644,root,root,755)
938 %attr(755,root,root) %{_appdir}/route_notes.php
939
940 %if %{with qmail}
941 %files router-qmail
942 %defattr(644,root,root,755)
943 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/.qmail*
944 %attr(755,root,root) %{_libdir}/router-qmail
945 %endif
946
947 %files router-postfix
948 %defattr(644,root,root,755)
949 %attr(755,root,root) %{_libdir}/router-postfix
950
951 %files irc
952 %defattr(644,root,root,755)
953 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/irc.php
954 %attr(640,root,eventum) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/eventum-irc
955 %attr(755,root,root) %{_sbindir}/%{name}-bot
956 %attr(754,root,root) /etc/rc.d/init.d/%{name}-irc
957
958 %files cli
959 %defattr(644,root,root,755)
960 %doc eventumrc
961 %attr(644,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/cli.php
962 %attr(755,root,root) %{_bindir}/%{name}
963 %{_appdir}/cli
964
965 %files scm
966 %defattr(644,root,root,755)
967 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvs.php
968 %attr(755,root,root) %{_libdir}/scm
This page took 0.110582 seconds and 4 git commands to generate.