# TODO # - lighttpd support %define _hordeapp hermes Summary: A time-tracking application Name: horde-%{_hordeapp} Version: 1.0.1 Release: 3 License: ASL Group: Applications/WWW Source0: ftp://ftp.horde.org/pub/hermes/%{_hordeapp}-h3-%{version}.tar.gz # Source0-md5: 41c0297304b145adcfc4cb59f06194d2 Source1: %{_hordeapp}-apache.conf Source2: %{_hordeapp}-httpd.conf URL: http://www.horde.org/hermes/ BuildRequires: rpm-php-pearprov >= 4.0.2-98 BuildRequires: rpmbuild(macros) >= 1.264 BuildRequires: tar >= 1:1.15.1 Requires: apache(mod_access) Requires: horde >= 3.2 Requires: horde-nag Requires: horde-turba Requires: horde-whups Requires: webapps Conflicts: apache-base < 2.4.0-1 BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _noautoreq_pear Horde.* %define hordedir /usr/share/horde %define _appdir %{hordedir}/%{_hordeapp} %define _webapps /etc/webapps %define _webapp horde-%{_hordeapp} %define _sysconfdir %{_webapps}/%{_webapp} %description Hermes is a time-tracking application integrated with the Horde Framework. It ties into Turba (to retrieve clients) and Nag and Whups (to retrieve cost objects). It comes with a stop watch, search and reporting capabilities, and an invoice interface. %prep %setup -q -n %{_hordeapp}-h3-%{version} rm */.htaccess for i in config/*.dist; do mv $i config/$(basename $i .dist) done %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/docs} cp -a *.php $RPM_BUILD_ROOT%{_appdir} cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir} echo '' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.php touch $RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak cp -a lib locale templates themes $RPM_BUILD_ROOT%{_appdir} cp -a docs/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf %clean rm -rf $RPM_BUILD_ROOT %post if [ ! -f %{_sysconfdir}/conf.php.bak ]; then install /dev/null -o root -g http -m660 %{_sysconfdir}/conf.php.bak fi if [ "$1" = 1 ]; then %banner %{name} -e <<-EOF IMPORTANT: If you are installing hermes for the first time, You may need to create the hermes database tables. To do so run: zcat %{_docdir}/%{name}-%{version}/scripts/sql/%{_hordeapp}.sql.gz | mysql horde EOF fi %triggerin -- apache1 < 1.3.37-3, apache1-base %webapp_register apache %{_webapp} %triggerun -- apache1 < 1.3.37-3, apache1-base %webapp_unregister apache %{_webapp} %triggerin -- apache-base %webapp_register httpd %{_webapp} %triggerun -- apache-base %webapp_unregister httpd %{_webapp} %files %defattr(644,root,root,755) %doc README docs/* scripts %dir %attr(750,root,http) %{_sysconfdir} %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf %attr(660,root,http) %config(noreplace) %{_sysconfdir}/conf.php %attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/conf.php.bak %attr(640,root,http) %config(noreplace) %{_sysconfdir}/[!c]*.php %attr(640,root,http) %{_sysconfdir}/conf.xml %dir %{_appdir} %{_appdir}/*.php %{_appdir}/config %{_appdir}/docs %{_appdir}/lib %{_appdir}/locale %{_appdir}/templates %{_appdir}/themes