%define name horde %define version 3.2.4 %define release %mkrel 1 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) # http://alexandre.alapetite.net/doc-alex/domxml-php4-php5 Source1: http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/domxml-php4-to-php5.php.txt ############################ Patch2: %{name}-3.2.3-better-default-configuration.patch Patch4: %{name}-3.2.1-registry.patch Patch6: horde-3.2-usr_local.patch URL: http://www.horde.org/ Requires: apache-mod_php Requires: php-xml Requires: php-dom # webapp macros and scriptlets %if %mdkversion < 200700 %define _webconfdir %{_sysconfdir}/httpd/conf %define _webappconfdir %_webconfdir/webapps.d Requires(post): rpm-helper Requires(postun): rpm-helper BuildRequires: rpm-helper BuildRequires: rpm-mandriva-setup %else Requires(post): rpm-helper >= 0.16 Requires(postun): rpm-helper >= 0.16 BuildRequires: rpm-helper >= 0.16 BuildRequires: rpm-mandriva-setup >= 1.23 %endif 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 BuildRoot: %{_tmppath}/%{name}-%{version} %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 http://www.horde.org/. %prep %setup -q %patch2 -p1 %patch4 -p1 %patch6 -p1 # 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 <<EOF # %{name} Apache configuration file Alias /%{name} %{_var}/www/%{name} <Directory %{_var}/www/%{name}> Allow from all </Directory> EOF # remove .htaccess files find . -name .htaccess -exec rm -f {} \; # install files install -d -m 755 %{buildroot}%{_var}/www/%{name} install -d -m 755 %{buildroot}%{_datadir}/%{name} install -d -m 755 %{buildroot}%{_sysconfdir} cp -pR *.php %{buildroot}%{_var}/www/%{name} cp -pR admin %{buildroot}%{_var}/www/%{name} cp -pR js %{buildroot}%{_var}/www/%{name} cp -pR services %{buildroot}%{_var}/www/%{name} cp -pR themes %{buildroot}%{_var}/www/%{name} cp -pR util %{buildroot}%{_var}/www/%{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} cp -pR config %{buildroot}%{_sysconfdir}/%{name} # put domxml-php4-to-php5.php in place install -m0644 %{SOURCE1} %{buildroot}%{_datadir}/%{name}/lib/Horde/domxml-php4-to-php5.php # use symlinks to recreate original structure pushd %{buildroot}%{_var}/www/%{name} ln -s ../../..%{_sysconfdir}/%{name} config ln -s ../../..%{_datadir}/%{name}/lib . ln -s ../../..%{_datadir}/%{name}/locale . ln -s ../../..%{_datadir}/%{name}/templates . popd pushd %{buildroot}%{_datadir}/%{name} ln -s ../../..%{_sysconfdir}/%{name} config popd # 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} <<EOF %{_var}/log/%{name}/*.log { missingok compress } EOF cat > README.mdv <<EOF Mandriva RPM specific notes setup ----- The setup used here differs from default one, to achieve better FHS compliance. - the configuration files are in /etc/horde - the log files are in /var/log/horde - the files accessibles from the web are in /var/www/horde - the files non accessibles from the web are in /usr/share/horde post-installation ----------------- You have to either use a browser to http://your.server.url/horde, so as to configure proper configuration. Additional useful packages -------------------------- - either a SQL database (MySQL or PostgreSQL), an LDAP (openldap) or a Kolab server for storing preferences - php-mcrypt for better encryption - php-iconv and php-mbstring for better utf8 support - php-gd for image manipulations - php-pear-File for CVS import support - php-Date to deal with calendar data - php-Services_Weather to the weather.com block on the portal page Additional horde applications ----------------------------- They are all packaged as horde-<application>. 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} %post %if %mdkversion < 200700 if [ "$1" = "1" ]; then /sbin/service httpd condrestart fi %else %_post_webapp %endif if [ $1 = 1 ]; then # configuration %create_ghostfile %{_sysconfdir}/%{name}/conf.php.bak apache apache 644 fi %postun %if %mdkversion < 200700 if [ "$1" = "0" ]; then /sbin/service httpd condrestart else /sbin/service httpd condreload fi %else %_postun_webapp %endif %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} %{_var}/www/%{name} %attr(-,apache,apache) %{_var}/log/%{name} %changelog * Fri Jan 30 2009 Guillaume Rousse <guillomovitch@mandriva.org> 3.2.4-1mdv2009.0 + Revision: 335503 - new version (security fixes only) - new version (security fixes only) * Thu Sep 11 2008 Guillaume Rousse <guillomovitch@mandriva.org> 3.2.2-1mdv2009.0 + Revision: 283884 - update to new version 3.2.2 * Wed Jun 25 2008 Guillaume Rousse <guillomovitch@mandriva.org> 3.2.1-1mdv2009.0 + Revision: 228893 - new version * Thu Jun 12 2008 Guillaume Rousse <guillomovitch@mandriva.org> 3.2-3mdv2009.0 + Revision: 218443 - really fix wrong automatic dependency issue * Wed Jun 11 2008 Guillaume Rousse <guillomovitch@mandriva.org> 3.2-2mdv2009.0 + Revision: 218230 - fix wrong include name triggering a false automatic dependency (#41288) * Wed May 28 2008 Guillaume Rousse <guillomovitch@mandriva.org> 3.2-1mdv2009.0 + Revision: 212813 - new version drop kolab patches 5, 7 and 8 (merged/unappliable anymore) update patches 4 and 6 * Wed Jan 16 2008 Guillaume Rousse <guillomovitch@mandriva.org> 3.1.6-1mdv2008.1 + Revision: 153777 - new version - update to new version 3.1.6 + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Thu Nov 22 2007 Guillaume Rousse <guillomovitch@mandriva.org> 3.1.5-1mdv2008.1 + Revision: 111213 - update to new version 3.1.5 * Mon Aug 27 2007 Guillaume Rousse <guillomovitch@mandriva.org> 3.1.4-2mdv2008.0 + Revision: 71859 - don't fix eols in spec file, spec-helper is doing it - fix new webroot detection by hardcoding it in registry (fix #32220) * Thu Aug 02 2007 Funda Wang <fundawang@mandriva.org> 3.1.4-1mdv2008.0 + Revision: 58123 - Rediff patch5 - Rediff patch4 - New version 3.1.4 * Mon Feb 19 2007 Oden Eriksson <oeriksson@mandriva.com> 3.1.3-2mdv2007.0 + Revision: 122754 - sync with opensuse to enable a possible furure kolab2 update... + Andreas Hasenack <andreas@mandriva.com> - Import horde * Sat Aug 26 2006 Guillaume Rousse <guillomovitch@mandriva.org> 3.1.3-1mdv2007.0 - New version 3.1.3 * Sat Aug 12 2006 Andreas Hasenack <andreas@mandriva.com> 3.1.2-2mdv2007.0 - make somewhat backportable * Tue Jul 11 2006 Guillaume Rousse <guillomovitch@mandriva.org> 3.1.2-1mdv2007.0 - New version 3.1.2 * Sat Jul 01 2006 Guillaume Rousse <guillomovitch@mandriva.org> 3.1.1-3mdv2007.0 - relax buildrequires versionning * Tue Jun 27 2006 Guillaume Rousse <guillomovitch@mandriva.org> 3.1.1-2mdv2007.0 - new webapp macros - decompress all patches - use herein document for README.mdv * Thu Mar 30 2006 Guillaume Rousse <guillomovitch@mandriva.org> 3.1.1-1mdk - New release 3.1.1 - rediff registry patch * Tue Mar 07 2006 Guillaume Rousse <guillomovitch@mandriva.org> 3.1-1mdk - new version - pre-10.2 compatibility - drop non-interactive setup patch, unused anway - rediff registry patch * Wed Jan 11 2006 Guillaume Rousse <guillomovitch@mandriva.org> 3.0.9-2mdk - add conflict with horde 2 applications - update README.mdk with application packages mention * Tue Dec 27 2005 Guillaume Rousse <guillomovitch@mandriva.org> 3.0.9-1mdk - New release 3.0.9 - %%mkrel * Wed Nov 02 2005 Guillaume Rousse <guillomovitch@mandriva.org> 3.0.6-1mdk - New release 3.0.6 - rediff patches 1 and 4 * Sat Aug 20 2005 Guillaume Rousse <guillomovitch@mandriva.org> 3.0.5-1mdk - New release 3.0.5 - rediff patch 4 - better fix encoding - drop manual pear requires * Thu Jun 30 2005 Guillaume Rousse <guillomovitch@mandriva.org> 3.0.4-3mdk - better requires - better fix encoding - fix requires - use new rpm macros - fix scripts shellbang * Tue Jun 14 2005 Guillaume Rousse <guillomovitch@mandriva.org> 3.0.4-2mdk - new apache setup - requires * Sun Apr 17 2005 Guillaume Rousse <guillomovitch@mandrake.org> 3.0.4-1mdk - New release 3.0.4 * Fri Feb 18 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 3.0.2-4mdk - spec file cleanups, remove the ADVX-build stuff - strip away annoying ^M * Thu Jan 27 2005 Guillaume Rousse <guillomovitch@mandrake.org> 3.0.2-3mdk - reload apache instead of restarting it - no more automatic config generation, incorrect default values - README.mdk - spec cleanup - don't touch log file, make log dir owned by apache * Mon Jan 17 2005 Guillaume Rousse <guillomovitch@mandrake.org> 3.0.2-2mdk - herein document instead of external source for apache config - fix inclusions from /usr/share/horde - fix configuration perms - generate configuration at postinstall - better default configuration (logs) - rpm-helper is now a prereq * Thu Jan 13 2005 Guillaume Rousse <guillomovitch@mandrake.org> 3.0.2-1mdk - New version - top-level is now /var/www/horde - config is now in /etc/horde - other non-accessible files are now in /usr/share/horde - drop safemode build - drop patches 0, 2 and 3 - rediff patch 4 - drop old obsoletes - clean up redundant requires - no more order for apache configuration * Wed Oct 27 2004 Guillaume Rousse <guillomovitch@mandrakesoft.com> 2.2.7-1mdk - New release 2.2.7 * Tue Sep 28 2004 Guillaume Rousse <guillomovitch@mandrakesoft.com> 2.2.6-1mdk - New release 2.2.6 - rpmbuildupdate aware * Mon Jul 19 2004 Guillaume Rousse <guillomovitch@mandrake.org> 2.2.5-3mdk - apache config file in /etc/httpd/webapps.d * Sun May 02 2004 Guillaume Rousse <guillomovitch@mandrake.org> 2.2.5-2mdk - registry patch (stolen from Debian) - standard perms for /etc/httpd/conf.d/%%{order}_horde.conf - don't provide useless ADVXpackage virtual package * Tue Apr 06 2004 Guillaume Rousse <guillomovitch@mandrake.org> 2.2.5-1mdk - new version - dropped original configuration patch, it's up to application packages to register themselves - fixed sendmail path in configuration