#New ADVX macros %define ADVXdir %{_datadir}/ADVX %{expand:%(cat %{ADVXdir}/ADVX-build)} %define name turba %define version 1.1 %define release 3mdk %define apachegroup apache %define mod_conf 73_turba.conf Name: %{name} Version: %{version} Release: %{release} Summary: The Horde contact management application. License: LGPL Group: System/Servers Source0: ftp://ftp.horde.org/pub/turba/tarballs/turba-%{version}.tar.bz2 Source1: turba-mdk.conf.bz2 Patch0: turba-1.1-config-imp.patch.bz2 Patch1: turba-1.1-config-sources-ldap.patch.bz2 URL: http://www.horde.org/ BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: ADVX-build >= 1.2 Requires: horde2 >= 2.2.1 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 PreReq: perl-base Provides: ADVXpackage %description Turba is the Horde contact management application, which allows access to and storage of personal contacts (including name, email address, phone number, and other easily customizable fields). Turba integrates with IMP (Horde's webmail application) as its address book. The Horde Project writes web applications in PHP and releases them under Open Source licenses. For more information (including help with Turba) please visit http://www.horde.org/. %prep %setup -q -n %{name}-%{version} %patch0 -p0 %patch1 -p0 mkdir .tmpdoc cat << EOF > .tmpdoc/index.html Your Turba package is installed in <a href=/horde/>%{ap_htdocsdir}/horde</a>. <p> Its documentation is installed in <a href=/horde/turba/docs/>%{ap_htdocsdir}/horde/turba/docs</a>. EOF %build %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %ADVXinstconf %{SOURCE1} %{mod_conf} mkdir -p %{buildroot}%{ap_htdocsdir}/horde/turba cp -pR * %{buildroot}%{ap_htdocsdir}/horde/turba cd %{buildroot}%{ap_htdocsdir}/horde/turba/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/turba/README -f rm %{buildroot}%{ap_htdocsdir}/horde/turba/COPYING -f %ADVXinstdoc %name-%version %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %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.*turba.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.*turba.conf$/i);' $config fi done fi %ADVXpost %files %defattr(-,root,root) %ap_webdoc/* # Apache turba.conf file %config(noreplace) %{ap_confd}/%{mod_conf} # Include top level with %dir so not all files are sucked in %dir %{ap_htdocsdir}/horde/turba # Include top-level files by hand %{ap_htdocsdir}/horde/turba/*.php # Include these dirs so that all files _will_ get sucked in %{ap_htdocsdir}/horde/turba/graphics %{ap_htdocsdir}/horde/turba/lib %{ap_htdocsdir}/horde/turba/locale %{ap_htdocsdir}/horde/turba/po %{ap_htdocsdir}/horde/turba/docs %{ap_htdocsdir}/horde/turba/scripts %{ap_htdocsdir}/horde/turba/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/turba/config %defattr(640,root,%{apachegroup}) %{ap_htdocsdir}/horde/turba/config/.htaccess %{ap_htdocsdir}/horde/turba/config/*.dist %config %{ap_htdocsdir}/horde/turba/config/*.php %defattr(-,root,root) %doc README COPYING .tmpdoc/index.html %changelog * Sun Feb 16 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.1-3mdk - new macros from ADVX-build * Tue Jul 02 2002 Guillaume Rousse <g.rousse@linux-mandrake.com> 1.1-2mdk - spec cleanup - removed circular requires on imp3 - removed redundant requires on apache * Wed Jun 19 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.1-1mdk - updated by David Walser <luigiwalser@yahoo.com> : - 1.1 final - Regenerate ldap patch * Sat Mar 18 2002 David Walser <luigiwalser@yahoo.com> 1.1-0.2mdk - Add patch1 (ldap sources) * Sat Mar 18 2002 David Walser <luigiwalser@yahoo.com> 1.1-0.1mdk - Regenerate patch * Mon Mar 11 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-3mdk - s/Copyright/License/. * Mon Mar 11 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-2mdk - fixed BuildRequires for horde2 and imp3. * Mon Mar 11 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-1mdk - initial mandrake release. - added imp in config. * Wed Jan 02 2002 Brent J. Nordquist <bjn@horde.org> - 1.0 release 1 * Mon Dec 24 2001 Brent J. Nordquist <bjn@horde.org> - 1.0-RC4 release 1 * Sun Dec 16 2001 Brent J. Nordquist <bjn@horde.org> - initial RPM for Turba 1.0