Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 0a3dd71988e4a28e122473a558b17d9e > files > 6

horde2-2.2.1-2mdk.src.rpm

#New ADVX macros
%define ADVXdir %{_datadir}/ADVX
%{expand:%(cat %{ADVXdir}/ADVX-build)}

%define mod_conf 71_horde.conf
%define apachegroup apache

Summary: The common Horde Framework for all Horde modules.
Name: horde2
Version: 2.2.1
Release: 2mdk
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.2.1-config-horde.patch.bz2
Patch1: horde-2.1-passwd-conf.patch.bz2
Patch2: horde-2.2.1-translation.patch.bz2
URL: http://www.horde.org/
BuildArchitectures: noarch
BuildRequires: ADVX-build >= 1.2
BuildRequires: perl-base
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: mod_php >= 4.3.0
#The package does not explicitely require the php executable!
#Requires: php >= 4.3.0
#The package does not explicitely require php-devel
#Requires: php-devel >= 4.3.0
Requires: php-common >= 430
Requires: php-xml >= 4.3.0
Requires: php-domxml >= 4.3.0
Requires: php-pear >= 4.3.0
Requires: php-pear-Log >= 4.3.0
Requires: php-pear-Mail_Mime >= 4.3.0
Requires: php-pear-Net_Socket >= 4.3.0
Requires: apache >= 1.3.22
PreReq: perl-base
Conflicts: horde
Provides: ADVXpackage

%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 -p1
%patch1 -p0
#Fix so that auto requires do not pickup /usr/bin/php as a requirement.
%patch2 -p1
mkdir .tmpdoc
cat << EOF > .tmpdoc/index.html
Your Horde package is installed in <a href=/horde/>%{ap_htdocsdir}/horde</a>.
<p>
Its documentation is installed in <a href=/horde/docs/>%{ap_htdocsdir}/horde/docs</a>.
EOF
	
%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
%ADVXinstconf %{SOURCE1} %{mod_conf}
mkdir -p $RPM_BUILD_ROOT%{ap_htdocsdir}/horde
cp -pR * $RPM_BUILD_ROOT%{ap_htdocsdir}/horde
(cd $RPM_BUILD_ROOT%{ap_htdocsdir}/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%{ap_htdocsdir}/horde/passwd/config
for d in *.dist; do
    d0=`basename $d .dist`
    if [ ! -f "$d0" ]; then
        cp -p $d $d0
    fi
done)
rm %{buildroot}%{ap_htdocsdir}/horde/README -f
rm %{buildroot}%{ap_htdocsdir}/horde/COPYING -f
%ADVXinstdoc %name-%version

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%post
alias FIXME="perl -pi -e"
#Upgrade: remove line and reinstall it (only for Apache 1.3)
if [ $1 -gt 1 ]; then
   for config in %{ap_base}/conf/{httpd,httpd-perl}.conf; do
     if [ -e $config ]; then
	FIXME 's/.*//s if (/Include.*horde.conf$/i);' $config
	echo "Include conf.d/%{mod_conf}" >> $config
     fi
   done
fi
#Install (only for Apache 1.3)
if [ $1 = "1" ]; then
   for config in %{ap_base}/conf/{httpd,httpd-perl}.conf; do
     if [ -e $config ]; then
	echo "Include conf.d/%{mod_conf}" >> $config
     fi
   done
fi
%ADVXpost

%postun
alias FIXME="perl -pi -e"
#Uninstall (only for Apache 1.3)
if [ $1 = "0" ]; then
   for config in %{ap_base}/conf/{httpd,httpd-perl}.conf; do
     if [ -e $config ]; then
	FIXME 's/.*//s if (/Include.*horde.conf$/i);' $config
     fi
   done
fi
%ADVXpost

%files
%defattr(-,root,root)
%ap_webdoc/*
# Apache horde.conf file
%config(noreplace) %{ap_confd}/%{mod_conf}
# Include top level with %dir so not all files are sucked in
%dir %{ap_htdocsdir}/horde
# Include top-level files by hand
%{ap_htdocsdir}/horde/*.php
# Include these dirs so that all files _will_ get sucked in
%{ap_htdocsdir}/horde/graphics
%{ap_htdocsdir}/horde/lib
%{ap_htdocsdir}/horde/locale
%{ap_htdocsdir}/horde/po
%{ap_htdocsdir}/horde/docs
%{ap_htdocsdir}/horde/scripts
%{ap_htdocsdir}/horde/templates
%{ap_htdocsdir}/horde/util
# Passwd modules
%dir %{ap_htdocsdir}/horde/passwd
%{ap_htdocsdir}/horde/passwd/*.php
%{ap_htdocsdir}/horde/passwd/docs
%{ap_htdocsdir}/horde/passwd/graphics
%{ap_htdocsdir}/horde/passwd/lib
%{ap_htdocsdir}/horde/passwd/locale
%{ap_htdocsdir}/horde/passwd/po
%{ap_htdocsdir}/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 %{ap_htdocsdir}/horde/config
%defattr(640,root,%{apachegroup})
%{ap_htdocsdir}/horde/config/.htaccess
%{ap_htdocsdir}/horde/config/*.dist
%config %{ap_htdocsdir}/horde/config/*.php
#
%attr(750,root,%{apachegroup}) %dir %{ap_htdocsdir}/horde/passwd/config
%defattr(640,root,%{apachegroup})
%{ap_htdocsdir}/horde/passwd/config/.htaccess
%{ap_htdocsdir}/horde/passwd/config/*.dist
%config %{ap_htdocsdir}/horde/passwd/config/*.php
%defattr(-,root,root)
%doc README COPYING .tmpdoc/index.html

%changelog
* Sun Feb 16 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.2.1-2mdk
- new macros from ADVX-build

* Sun Feb 16 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.2.1-1mdk
- New version, required by PHP 4.3.0
- fix post scripts
- fix config file
- add Errordocument 404 directives so users know they have to install turba
  and imp3.

* 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