Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > c4faf283c9c12dc8dac0a0eff4aa97b5 > files > 3

horde-accounts-2.1.2-1mdk.src.rpm

%define	module	accounts
%define	name	horde-%{module}
%define	version	2.1.2
%define	release	1mdk

Name:		%{name}
Version:	%{version}
Release:	%{release}
Summary:	The Horde accounts management application
License:	GPL
Group:		System/Servers
Source0:	ftp://ftp.horde.org/pub/%{module}/%{module}-%{version}.tar.bz2
Source2:	%{module}-horde.conf.bz2
URL:		http://www.horde.org/%{module}/
Requires:	horde >= 3.0
BuildArch:	noarch
BuildRoot:	%{_tmppath}/%{name}-%{version}

%description
Accounts is a very simple module which provides two functions:
* To display some user account information ("My Account" summary) including, if
  possible, an "at a glance" summary of the current forwards and vacation
  module status.
* To provide a method for grouping some related modules (passwd, forwards, and
  vacation) together in order to minimize the number of icons on the Horde menu
  bar (so it will not exceed a reasonable screen width).

Although Accounts can be used by itself, it is normally used along with:
* Forwards
* Passwd
* Vacation

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

# fix encoding
find . -type f | perl -ne 'chomp; print "$_\n" if -T $_' | xargs perl -pi -e 'tr/\r//d'

%build

%install
rm -rf %{buildroot}

# horde configuration
install -d -m 755 %{buildroot}%{_sysconfdir}/horde/registry.d
bzcat %{SOURCE2} > %{buildroot}%{_sysconfdir}/horde/registry.d/%{module}.php

# 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 graphics %{buildroot}%{_var}/www/horde/%{module}
cp -pR lib %{buildroot}%{_datadir}/horde/%{module}
cp -pR locale %{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

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

%clean
rm -rf %{buildroot}

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

%changelog
* Thu Jun 30 2005 Guillaume Rousse <guillomovitch@mandriva.org> 2.1.2-1mdk 
- new version
- better fix encoding
- spec cleanup

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

* Fri Jan 14 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.1.1-3mdk 
- top-level is now %{_var}/www/horde/%{module}
- config is now in %{_sysconfdir}/horde/%{module}
- other non-accessible files are now in %{_datadir}/horde/%{module}
- no more apache configuration
- rpmbuildupdate aware
- spec cleanup

* Mon Nov 15 2004 Guillaume Rousse <guillomovitch@mandrake.org> 2.1.1-2mdk 
- fix description

* Sat Sep 04 2004 Guillaume Rousse <guillomovitch@mandrake.org> 2.2.1-1mdk 
- first mdk release