%define name horde %define version 3.3.13 %define release %mkrel 1 %global __requires_exclude pear\\(Horde/Kolab/FreeBusy.php\\) Name: %{name} Version: %{version} Release: %{release} Summary: The Horde framework License: GPL Group: System/Servers Source0: ftp://ftp.horde.org/pub/horde/%{name}-%{version}.tar.gz ############################ # domxml php4 - php5 wrapper # Written by Alexandre Alapetite # Licence: Creative Commons "Attribution-ShareAlike 2.0 France" BY-SA (FR) # https://alexandre.alapetite.net/doc-alex/domxml-php4-php5 Source1: https://alexandre.alapetite.net/doc-alex/domxml-php4-php5/domxml-php4-to-php5.php.txt ############################ Patch2: %{name}-3.3.2-better-default-configuration.patch Patch4: %{name}-3.3.5-registry.patch Patch6: horde-3.2-usr_local.patch URL: https://www.horde.org/ Requires: horde-dimp Requires: horde-gollem Requires: horde-ingo Requires: horde-mimp Requires: horde-nag Requires: horde-turba Requires: horde-passwd Requires: horde-kronolith Requires: horde-imp Requires: horde-vacation Requires: apache-mod_php Requires: php-imagick Requires: php-xml Requires: php-dom Conflicts: horde-accounts <= 2.1.2 Conflicts: horde-forwards <= 2.2.2 Conflicts: horde-password <= 2.2.2 Conflicts: horde-vacation <= 2.2.2 BuildArch: noarch %description The Horde Framework provides a common structure and interface for Horde applications (such as IMP, a web-based mail program). This RPM is required for all other Horde module RPMS. The Horde Project writes web applications in PHP and releases them under the GNU Public License. For more information (including help with Horde and its modules) please visit https://www.horde.org/. %prep %setup -q %patch -P 2 -p 1 %patch -P 4 -p 1 %patch -P 6 -p 1 # fix perms chmod 755 scripts/*.{php,sh,cron} # nuke patch backup files find . -type f -name "*.orig" | xargs rm -f %build %install rm -rf %{buildroot} # apache configuration install -d -m 755 %{buildroot}%{_webappconfdir} cat > %{buildroot}%{_webappconfdir}/%{name}.conf < Order allow,deny Allow from localhost Order allow,deny Deny from all Order allow,deny Deny from all Order allow,deny Deny from all Order allow,deny Deny from all EOF # remove .htaccess files find . -name .htaccess -exec rm -f {} \; # install files install -d -m 755 %{buildroot}%{_datadir}/%{name} cp -pR *.php %{buildroot}%{_datadir}/%{name} cp -pR admin %{buildroot}%{_datadir}/%{name} cp -pR js %{buildroot}%{_datadir}/%{name} cp -pR services %{buildroot}%{_datadir}/%{name} cp -pR themes %{buildroot}%{_datadir}/%{name} cp -pR util %{buildroot}%{_datadir}/%{name} cp -pR lib %{buildroot}%{_datadir}/%{name} cp -pR locale %{buildroot}%{_datadir}/%{name} cp -pR scripts %{buildroot}%{_datadir}/%{name} cp -pR templates %{buildroot}%{_datadir}/%{name} install -d -m 755 %{buildroot}%{_sysconfdir} cp -pR config %{buildroot}%{_sysconfdir}/%{name} pushd %{buildroot}%{_datadir}/%{name} ln -s ../../..%{_sysconfdir}/%{name} config popd # put domxml-php4-to-php5.php in place install -m0644 %{SOURCE1} %{buildroot}%{_datadir}/%{name}/lib/Horde/domxml-php4-to-php5.php # activate configuration files for file in %{buildroot}%{_sysconfdir}/%{name}/*.dist; do mv $file ${file%.dist} done # fix script shellbang for file in `find %{buildroot}%{_datadir}/%{name}/scripts`; do perl -pi -e 's|/usr/local/bin/php|/usr/bin/php|' $file done # registry dir install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/registry.d # logs install -d -m 755 %{buildroot}%{_var}/log/%{name} install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d cat > %{buildroot}%{_sysconfdir}/logrotate.d/%{name} < README.mdv <. Warning, some have still not been ported to horde 3, and have been removed from the distribution (vacation, forwards and accounts notably). EOF %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc README README.mdv COPYING docs scripts/SCRIPTS %config(noreplace) %{_webappconfdir}/%{name}.conf %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/%{name} %attr(-,apache,apache) %config(noreplace) %{_sysconfdir}/%{name}/conf.php %{_datadir}/%{name} %attr(-,apache,apache) %{_var}/log/%{name}