Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > c36c81fbada8d642e91f1ebf8337fe8b > files > 2

horde-imp-4.1.4-1mdv2008.0.src.rpm

%define	module	imp
%define	name	horde-%{module}
%define version 4.1.4
%define release %mkrel 1

%define _requires_exceptions pear(\\(Horde.*\\|Text/Flowed.php\\|VFS.*\\))

Name:		%{name}
Version:	%{version}
Release:	%{release}
Summary:	The Horde webmail application
License:	GPL
Group:		System/Servers
Source0:	ftp://ftp.horde.org/pub/%{module}/%{module}-h3-%{version}.tar.bz2
Patch0:		%{name}-4.0.1-path.patch
URL:		http://www.horde.org/%{module}
Requires(post):	rpm-helper
Requires:	horde >= 3.0
Requires:	php-imap
Requires:	php-ldap
BuildArch:	noarch
BuildRoot:	%{_tmppath}/%{name}-%{version}

%description
IMP is the Internet Messaging Program, one of the Horde applications.
It provides webmail access to IMAP and POP3 accounts.

%prep
%setup -q -n %{module}-h3-%{version}
%patch

# fix perms
chmod 644 locale/da_DK/help.xml

# fix encoding
for file in `find . -type f`; do
    perl -pi -e 'BEGIN {exit unless -T $ARGV[0];} tr/\r//d;' $file
done

%build

%install
rm -rf %{buildroot}

# horde configuration
install -d -m 755 %{buildroot}%{_sysconfdir}/horde/registry.d
cat > %{buildroot}%{_sysconfdir}/horde/registry.d/%{module}.php <<EOF
<?php
//
// Imp Horde configuration file
//
 
\$this->applications['imp'] = array(
    'fileroot' => \$this->applications['horde']['fileroot'] . '/imp',
    'webroot'  => \$this->applications['horde']['webroot'] . '/imp',
    'name'     => _("Mail"),
    'status'   => 'active',
    'provides' => 'mail'
);

\$this->applications['imp-folders'] = array(
    'status'      => 'block',
    'app'         => 'imp',
    'blockname'   => 'tree_folders',
    'menu_parent' => 'imp'
);
EOF

# remove .htaccess files
find . -name .htaccess -exec rm -f {} \;

# install files
install -d -m 755 %{buildroot}%{_var}/www/horde/%{module}
install -d -m 755 %{buildroot}%{_datadir}/horde/%{module}
install -d -m 755 %{buildroot}%{_sysconfdir}/horde
cp -pR *.php %{buildroot}%{_var}/www/horde/%{module}
cp -pR themes %{buildroot}%{_var}/www/horde/%{module}
cp -pR lib %{buildroot}%{_datadir}/horde/%{module}
cp -pR locale %{buildroot}%{_datadir}/horde/%{module}
cp -pR scripts %{buildroot}%{_datadir}/horde/%{module}
cp -pR templates %{buildroot}%{_datadir}/horde/%{module}
cp -pR config %{buildroot}%{_sysconfdir}/horde/%{module}

# use symlinks to recreate original structure
pushd %{buildroot}%{_var}/www/horde/%{module}
ln -s ../../../..%{_sysconfdir}/horde/%{module} config
ln -s ../../../..%{_datadir}/horde/%{module}/lib .
ln -s ../../../..%{_datadir}/horde/%{module}/locale .
ln -s ../../../..%{_datadir}/horde/%{module}/templates .
popd
pushd %{buildroot}%{_datadir}/horde/%{module}
ln -s ../../../..%{_sysconfdir}/horde/%{module} config
popd

# activate configuration files
for file in %{buildroot}%{_sysconfdir}/horde/%{module}/*.dist; do
	mv $file ${file%.dist}
done

# fix script shellbang
for file in `find %{buildroot}%{_datadir}/horde/%{module}/scripts`; do
	perl -pi -e 's|/usr/local/bin/php|/usr/bin/php|' $file
done

%clean
rm -rf %{buildroot}

%post
if [ $1 = 1 ]; then
	# configuration
	%create_ghostfile %{_sysconfdir}/horde/%{module}/conf.php apache apache 644
	%create_ghostfile %{_sysconfdir}/horde/%{module}/conf.php.bak apache apache 644
fi

%files
%defattr(-,root,root)
%doc README COPYING docs
%config(noreplace) %{_sysconfdir}/horde/registry.d/%{module}.php
%config(noreplace) %{_sysconfdir}/horde/%{module}
%{_datadir}/horde/%{module}
%{_var}/www/horde/%{module}


%changelog
* Thu Aug 02 2007 Funda Wang <fundawang@mandriva.org> 4.1.4-1mdv2008.0
+ Revision: 58112
- New version 4.1.4


* Mon Sep 04 2006 Andreas Hasenack <andreas@mandriva.com>
+ 2006-09-04 15:33:52 (59799)
- fixed registry file

* Mon Sep 04 2006 Andreas Hasenack <andreas@mandriva.com>
+ 2006-09-04 15:26:50 (59798)
- Import horde-imp

* Fri Aug 25 2006 Guillaume Rousse <guillomovitch@mandriva.org> 4.1.3-1mdv2007.0
- New version 4.1.3

* Mon Jun 26 2006 Guillaume Rousse <guillomovitch@mandriva.org> 4.1.2-1mdv2007.0
- New version 4.1.2
- decompress patch
- use herein document for horde configuration

* Tue Mar 07 2006 Guillaume Rousse <guillomovitch@mandriva.org> 4.1-1mdk
- new version

* Wed Jan 11 2006 Guillaume Rousse <guillomovitch@mandriva.org> 4.0.4-2mdk
- fix automatic dependencies

* Tue Dec 27 2005 Guillaume Rousse <guillomovitch@mandriva.org> 4.0.4-1mdk
- New release 4.0.4
- %%mkrel

* Thu Jun 30 2005 Guillaume Rousse <guillomovitch@mandriva.org> 4.0.3-2mdk 
- better fix encoding
- fix requires

* Sat Apr 16 2005 Guillaume Rousse <guillomovitch@mandrake.org> 4.0.3-1mdk
- New release 4.0.3

* Fri Feb 18 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.0.1-4mdk
- spec file cleanups, remove the ADVX-build stuff
- strip away annoying ^M

* Thu Jan 27 2005 Guillaume Rousse <guillomovitch@mandrake.org> 4.0.1-3mdk 
- no automatic config generation, incorrect default values
- horde isn't a prereq
- spec cleanup

* Mon Jan 17 2005 Guillaume Rousse <guillomovitch@mandrake.org> 4.0.1-2mdk 
- fix inclusion path
- fix configuration perms
- generate configuration at postinstall
- horde and rpm-helper are now a prereq

* Fri Jan 14 2005 Guillaume Rousse <guillomovitch@mandrake.org> 4.0.1-1mdk 
- new version
- top-level is now /var/www/horde/imp
- config is now in /etc/horde/imp
- other non-accessible files are now in /usr/share/horde/imp
- drop safemode build
- drop old obsoletes
- drop all patches
- no more apache configuration
- rpmbuildupdate aware
- spec cleanup

* Tue Sep 14 2004 Guillaume Rousse <guillomovitch@mandrake.org> 3.2.5-3mdk 
- remove post-installation configuration: assuming a local mail server is used is wrong

* Mon Aug 16 2004 Pascal Cavy <pascal@vmfacility.fr> 3.2.5-2mdk
- fix typo in %%post #10815

* Wed Aug 04 2004 Guillaume Rousse <guillomovitch@mandrake.org> 3.2.5-1mdk 
- new version

* Sun Jul 18 2004 Guillaume Rousse <guillomovitch@mandrake.org> 3.2.4-2mdk 
- apache config file in /etc/httpd/webapps.d

* Sat Jun 05 2004 Guillaume Rousse <guillomovitch@mandrake.org> 3.2.4-1mdk 
- new version
- rpmbuildupdate aware

* Sat May 01 2004 Guillaume Rousse <guillomovitch@mandrake.org> 3.2.3-2mdk
- renamed to horde-imp
- pluggable horde configuration
- standard perms for /etc/httpd/conf.d/%%{order}_horde-imp.conf
- don't provide useless ADVXpackage virtual package
- remove redundant requires, as horde already requires them

* Mon Apr 05 2004 Guillaume Rousse <guillomovitch@mandrake.org> 3.2.3-1mdk
- new version

* Sat Dec 20 2003 Guillaume Rousse <guillomovitch@mandrake.org> 3.2.2-3mdk
- untagged localisation files
- no more .htaccess files, use /etc/httpd/conf.d/%%{order}_imp.conf instead
- scripts now in  /usr/share/{name}

* Tue Sep 09 2003 Guillaume Rousse <guillomovitch@linux-mandrake.com> 3.2.2-2mdk
- changed name to imp, old version doesn't exist anymore
- requires horde, not horde2
- standard perms and ownership for config files, access is already denied

* Mon Sep 08 2003 Guillaume Rousse <guillomovitch@linux-mandrake.com> 3.2.2-1mdk
- 3.2.2
- speac cleanup
- remove useless files from webroot (.dist, doc files, .po)
- properly tag localisation files
- drop apache1 integration
- drop ugly configuration scripts, perl rulez
- fixed URL
- removed implicit dependencies