]> git.pld-linux.org Git - SPECS.git/blob - horde-hermes.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / horde-hermes.spec
1 # TODO
2 # - lighttpd support
3 %define _hordeapp hermes
4
5 Summary:        A time-tracking application
6 Name:           horde-%{_hordeapp}
7 Version:        1.0.1
8 Release:        3
9 License:        ASL
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
21 Requires:       horde-nag
22 Requires:       horde-turba
23 Requires:       horde-whups
24 Requires:       webapps
25 Conflicts:      apache-base < 2.4.0-1
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _noautoreq_pear Horde.*
30
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}
36
37 %description
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.
42
43 %prep
44 %setup -q -n %{_hordeapp}-h3-%{version}
45
46 rm */.htaccess
47 for i in config/*.dist; do
48         mv $i config/$(basename $i .dist)
49 done
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/docs}
54
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
61
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
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %post
70 if [ ! -f %{_sysconfdir}/conf.php.bak ]; then
71         install /dev/null -o root -g http -m660 %{_sysconfdir}/conf.php.bak
72 fi
73
74 if [ "$1" = 1 ]; then
75 %banner %{name} -e <<-EOF
76         IMPORTANT:
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
80 EOF
81 fi
82
83 %triggerin -- apache1 < 1.3.37-3, apache1-base
84 %webapp_register apache %{_webapp}
85
86 %triggerun -- apache1 < 1.3.37-3, apache1-base
87 %webapp_unregister apache %{_webapp}
88
89 %triggerin -- apache-base
90 %webapp_register httpd %{_webapp}
91
92 %triggerun -- apache-base
93 %webapp_unregister httpd %{_webapp}
94
95 %files
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
105
106 %dir %{_appdir}
107 %{_appdir}/*.php
108 %{_appdir}/config
109 %{_appdir}/docs
110 %{_appdir}/lib
111 %{_appdir}/locale
112 %{_appdir}/templates
113 %{_appdir}/themes
This page took 0.075745 seconds and 3 git commands to generate.