Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > by-pkgid > 4e6c3e3d07749e0c36988b398c380433 > files > 3

horde-accounts-2.1.1-4mdk.src.rpm

%define	module	accounts
%define	name	horde-%{module}
%define	version	2.1.1
%define	release	4mdk

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
BuildRequires:	file
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

%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}

# strip away annoying ^M
find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//'
find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//'

%build

%install
rm -rf $RPM_BUILD_ROOT

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

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

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

# use symlinks to recreate original structure
pushd $RPM_BUILD_ROOT%{_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 $RPM_BUILD_ROOT%{_sysconfdir}/horde/%{module}/*.dist; do
	mv $file ${file%.dist}
done

%clean
rm -rf $RPM_BUILD_ROOT

%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
* 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