3 %define _hordeapp hermes
5 Summary: A time-tracking application
6 Name: horde-%{_hordeapp}
10 Group: Applications/WWW
11 Source0: ftp://ftp.horde.org/pub/hermes/%{_hordeapp}-h3-%{version}.tar.gz
12 # Source0-md5: 41c0297304b145adcfc4cb59f06194d2
13 Source1: %{_hordeapp}-apache.conf
14 Source2: %{_hordeapp}-httpd.conf
15 URL: http://www.horde.org/hermes/
16 BuildRequires: rpm-php-pearprov >= 4.0.2-98
17 BuildRequires: rpmbuild(macros) >= 1.264
18 BuildRequires: tar >= 1:1.15.1
19 Requires: apache(mod_access)
20 Requires: horde >= 3.2
25 Conflicts: apache-base < 2.4.0-1
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define _noautoreq_pear Horde.*
31 %define hordedir /usr/share/horde
32 %define _appdir %{hordedir}/%{_hordeapp}
33 %define _webapps /etc/webapps
34 %define _webapp horde-%{_hordeapp}
35 %define _sysconfdir %{_webapps}/%{_webapp}
38 Hermes is a time-tracking application integrated with the Horde
39 Framework. It ties into Turba (to retrieve clients) and Nag and Whups
40 (to retrieve cost objects). It comes with a stop watch, search and
41 reporting capabilities, and an invoice interface.
44 %setup -q -n %{_hordeapp}-h3-%{version}
47 for i in config/*.dist; do
48 mv $i config/$(basename $i .dist)
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/docs}
55 cp -a *.php $RPM_BUILD_ROOT%{_appdir}
56 cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
57 echo '<?php ?>' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.php
58 touch $RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
59 cp -a lib locale templates themes $RPM_BUILD_ROOT%{_appdir}
60 cp -a docs/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
62 ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
63 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
64 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
67 rm -rf $RPM_BUILD_ROOT
70 if [ ! -f %{_sysconfdir}/conf.php.bak ]; then
71 install /dev/null -o root -g http -m660 %{_sysconfdir}/conf.php.bak
75 %banner %{name} -e <<-EOF
77 If you are installing hermes for the first time, You may need to
78 create the hermes database tables. To do so run:
79 zcat %{_docdir}/%{name}-%{version}/scripts/sql/%{_hordeapp}.sql.gz | mysql horde
83 %triggerin -- apache1 < 1.3.37-3, apache1-base
84 %webapp_register apache %{_webapp}
86 %triggerun -- apache1 < 1.3.37-3, apache1-base
87 %webapp_unregister apache %{_webapp}
89 %triggerin -- apache-base
90 %webapp_register httpd %{_webapp}
92 %triggerun -- apache-base
93 %webapp_unregister httpd %{_webapp}
96 %defattr(644,root,root,755)
97 %doc README docs/* scripts
98 %dir %attr(750,root,http) %{_sysconfdir}
99 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
100 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
101 %attr(660,root,http) %config(noreplace) %{_sysconfdir}/conf.php
102 %attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/conf.php.bak
103 %attr(640,root,http) %config(noreplace) %{_sysconfdir}/[!c]*.php
104 %attr(640,root,http) %{_sysconfdir}/conf.xml