# # File: horde-mdk.spec # # based on # # $Horde: horde/packaging/redhat/horde.spec,v 1.7 2002/01/03 05:32:03 bjn Exp $ # # This is the SPEC file for the Horde Mandrake (RPM v4) RPMs/SRPM. # %define apachedir /etc/httpd %define apacheuser apache %define apachegroup apache %define contentdir /var/www Summary: The common Horde Framework for all Horde modules. Name: horde2 Version: 2.1 Release: 1mdk License: GPL Group: System/Servers Source0: ftp://ftp.horde.org/pub/horde/tarballs/horde-%{version}.tar.bz2 Source1: horde-mdk.conf.bz2 Source2: https://mail.ph.utexas.edu/test2/patches/public/passwd/passwd.tar.bz2 Patch0: horde-2.1-config-horde.patch.bz2 Patch1: horde-2.1-config-registry.patch.bz2 Patch2: horde-2.1-config-passwd.patch.bz2 Patch3: horde-2.1-passwd-conf.patch.bz2 Patch4: horde-2.1-config-turba.patch.bz2 URL: http://www.horde.org/ BuildArchitectures: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: mod_php >= 4.1.2 Requires: php >= 4.1.2 Requires: php-devel >= 4.1.2 Requires: php-common >= 4.1.2 Requires: php-xml >= 4.1.2 Requires: apache >= 1.3.22 PreReq: /usr/bin/perl Conflicts: horde %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 -n horde-%{version} -a 2 %patch0 -p0 -b .horde %patch1 -p0 -b .registry %patch2 -p0 -b .passwd %patch3 -p0 %patch4 -p0 -b .turba %build # clean passwd module cd passwd find . -type f -name '*.orig' -print|xargs rm -f find . -type f -name '*.old' -print|xargs rm -f %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{apachedir}/conf bzcat %{SOURCE1} > $RPM_BUILD_ROOT%{apachedir}/conf/horde.conf mkdir -p $RPM_BUILD_ROOT%{contentdir}/html/horde cp -pR * $RPM_BUILD_ROOT%{contentdir}/html/horde (cd $RPM_BUILD_ROOT%{contentdir}/html/horde/config for d in *.dist; do d0=`basename $d .dist` if [ ! -f "$d0" ]; then cp -p $d $d0 fi done) (cd $RPM_BUILD_ROOT%{contentdir}/html/horde/passwd/config for d in *.dist; do d0=`basename $d .dist` if [ ! -f "$d0" ]; then cp -p $d $d0 fi done) %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %post perl -pi -e 's/$/ index.php/ if (/DirectoryIndex\s.*index\.html/ && !/index\.php/);' %{apachedir}/conf/httpd.conf grep -i 'Include.*horde.conf$' %{apachedir}/conf/httpd.conf >/dev/null 2>&1 if [ $? -eq 0 ]; then perl -pi -e 's/^#+// if (/Include.*horde.conf$/i);' %{apachedir}/conf/httpd.conf else echo "Include %{apachedir}/conf/horde.conf" >>%{apachedir}/conf/httpd.conf fi /sbin/service httpd graceful sleep 1 # settling time vs. installing multiple RPMs at a time # post-install instructions: #cat <<_EOF_ #_EOF_ %postun if [ $1 -eq 0 ]; then perl -pi -e 's/^/#/ if (/^Include.*horde.conf$/i);' %{apachedir}/conf/httpd.conf /sbin/service httpd graceful sleep 1 # settling time vs. installing multiple RPMs at a time fi %files %defattr(-,root,root) # Apache horde.conf file %config(noreplace) %{apachedir}/conf/horde.conf # Include top level with %dir so not all files are sucked in %dir %{contentdir}/html/horde # Include top-level files by hand %{contentdir}/html/horde/*.php # Include these dirs so that all files _will_ get sucked in %{contentdir}/html/horde/graphics %{contentdir}/html/horde/lib %{contentdir}/html/horde/locale %{contentdir}/html/horde/po %{contentdir}/html/horde/scripts %{contentdir}/html/horde/templates %{contentdir}/html/horde/util # Mark documentation files with %doc and %docdir %doc %{contentdir}/html/horde/COPYING %doc %{contentdir}/html/horde/README %docdir %{contentdir}/html/horde/docs %{contentdir}/html/horde/docs # Passwd modules %dir %{contentdir}/html/horde/passwd %{contentdir}/html/horde/passwd/*.php %{contentdir}/html/horde/passwd/docs %{contentdir}/html/horde/passwd/graphics %{contentdir}/html/horde/passwd/lib %{contentdir}/html/horde/passwd/locale %{contentdir}/html/horde/passwd/po %{contentdir}/html/horde/passwd/templates # # Mark configuration files with %config and use secure permissions # (note that .dist files are considered software; don't mark %config) %attr(750,root,%{apachegroup}) %dir %{contentdir}/html/horde/config %defattr(640,root,%{apachegroup}) %{contentdir}/html/horde/config/.htaccess %{contentdir}/html/horde/config/*.dist %config %{contentdir}/html/horde/config/*.php # %attr(750,root,%{apachegroup}) %dir %{contentdir}/html/horde/passwd/config %defattr(640,root,%{apachegroup}) %{contentdir}/html/horde/passwd/config/.htaccess %{contentdir}/html/horde/passwd/config/*.dist %config %{contentdir}/html/horde/passwd/config/*.php %changelog * Wed Jun 19 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.1-1mdk - updated by David Walser <luigiwalser@yahoo.com> : - 2.1 final * Sat Mar 18 2002 David Walser <luigiwalser@yahoo.com> 2.1-0.1mdk - Regenerate patches - Remove admin directory from files (no longer exists) * Mon Mar 11 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0-4mdk - fixed php /usr/share/php -> /usr/lib/php according to php-devel path. * Mon Mar 11 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0-3mdk - renamed to horde2, so to maintain version 1.2.X. * Mon Mar 11 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0-2mdk - changed some config file with predefined values. - added ppphp-xml to Requires. - included passwd module. * Sun Mar 10 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.0-1mdk - 2.0. * Wed Jan 02 2002 Brent J. Nordquist <bjn@horde.org> - 2.0 release 1 * Wed Sep 12 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.2.6-3mdk - replaced pg_connect with pg_pconnect in db.pgsql, to avoid the warning "...is not a valid PostgreSQL link resource". * Tue Sep 11 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.2.6-2mdk - added php-pgsql to horde-pgsql Requires. * Tue Sep 04 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.2.6-1mdk - updated to release 1.2.6. * Wed Aug 29 2001 Philippe Libat <philippe@mandrakesoft.com> 1.2.4-3mdk - fix httpd.conf entry * Mon Feb 26 2001 Giuseppe Ghibo' <ghibo@mandrakesoft.com> 1.2.4-2mdk - add mod_php to Requires. * Sat Feb 24 2001 Giuseppe Ghibo' <ghibo@mandrakesoft.com> 1.2.4-1mdk - initial mandrake release. * Tue Feb 06 2001 Brent J. Nordquist <bjn@horde.org> - 1.2.4 release 1rh7