pkg://horde-kronolith-2.0.1-5mdk.src.rpm:873416/horde-kronolith.spec
info downloads
%define module kronolith
%define name horde-%{module}
%define version 2.0.1
%define release 5mdk
Name: %{name}
Version: %{version}
Release: %{release}
Summary: The Horde calendar application
License: LGPL
Group: System/Servers
Source0: ftp://ftp.horde.org/pub/%{module}/%{module}-h3-%{version}.tar.bz2
Source1: %{module}-horde.conf.bz2
Patch0: %{module}-2.0.1-calendar_path.patch.bz2
URL: http://www.horde.org/%{module}
PreReq: rpm-helper
Requires: horde-imp >= 4.0
Requires: php-mcal
Requires: php-pear-Date
Requires: php-pear-HTML_Common
Requires: php-pear-HTML_Select
BuildArch: noarch
BuildRequires: file
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Kronolith is the Horde calendar application. It provides a stable and
featureful individual calendar system for every Horde user, and
collaboration/scheduling features are starting to take shape. It makes
extensive use of the Horde Framework to provide integration with other
applications.
%prep
%setup -q -n %{module}-h3-%{version}
%patch0
# 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 %{buildroot}
# horde configuration
install -d -m 755 %{buildroot}%{_sysconfdir}/horde/registry.d
bzcat %{SOURCE1} > %{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 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
# calendar access
mcalpass=`perl -le'print map { (a..z,A..Z,0..9)[rand 62] } 0..pop' 12`
htpasswd -b /etc/mpasswd kronolith "$mcalpass"
perl -pi -e 's|\*\*\*\*|'$mcalpass'|' %{_sysconfdir}/horde/%{module}/conf.xml
# configuration
%create_ghostfile %{_sysconfdir}/horde/%{module}/conf.php apache apache 644
%create_ghostfile %{_sysconfdir}/horde/%{module}/conf.php.bak apache apache 644
fi
%postun
if [ $1 = 0 ]; then
htpasswd -bD /etc/mpasswd kronolith ""
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
* Fri Feb 18 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.1-5mdk
- spec file cleanups, remove the ADVX-build stuff
- strip away annoying ^M
* Thu Jan 27 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.0.1-4mdk
- no automatic config generation, incorrect default values
- horde isn't a prereq
- spec cleanup
* Mon Jan 17 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.0.1-3mdk
- fix inclusion path
- fix configuration perms
- generate configuration at postinstall
- horde and rpm-helper are now a prereq
- only manage calendar access for installation and deinstallation, not upgrade
* Sat Jan 15 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.0.1-2mdk
- fix symlink
- fix scripts shellbang
* Fri Jan 14 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.0.1-1mdk
- new version
- 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}
- drop old obsoletes
- rediff patch0
- no more apache configuration
- rpmbuildupdate aware
- spec cleanup
* Sun Jul 18 2004 Guillaume Rousse <guillomovitch@mandrake.org> 1.1.2-3mdk
- apache config file in %{_sysconfdir}/httpd/webapps.d
* Sat May 01 2004 Guillaume Rousse <guillomovitch@mandrake.org> 1.1.2-2mdk
- renamed to %{name}
- pluggable horde configuration
- standard perms for %{_sysconfdir}/httpd/conf.d/%{order}_%{name}.conf
- don't provide useless ADVXpackage virtual package
* Mon Apr 05 2004 Guillaume Rousse <guillomovitch@mandrake.org> 1.1.2-1mdk
- new version
- dropped patch 1 (no more useful)
* Sun Feb 15 2004 Pascal Terjan <pterjan@mandrake.org> 1.1-10mdk
- require imp not only in changelog...
* Sun Feb 15 2004 Pascal Terjan <pterjan@mandrake.org> 1.1-9mdk
- Requires imp
- fix bad redirect after login (Patch1)
* Sun Feb 15 2004 Pascal Terjan <pterjan@mandrake.org> 1.1-8mdk
- oops remove useless Requires
* Sun Feb 15 2004 Pascal Terjan <pterjan@mandrake.org> 1.1-7mdk
- make kronolith work out-of-the-box using mcal
* Sun Dec 28 2003 Pascal Terjan <pterjan@mandrake.org> 1.1-6mdk
- requires php-pear-HTML_Common and php-pear-HTML_Select
* Sun Dec 28 2003 Pascal Terjan <pterjan@mandrake.org> 1.1-5mdk
- requires php-pear-Date
* Sat Dec 20 2003 Guillaume Rousse <guillomovitch@mandrake.org> 1.1-4mdk
- untagged localisation files
- no more .htaccess files, use %{_sysconfdir}/httpd/conf.d/%{order}_%{module}.conf instead
- scripts now in %{_datadir}/{name}
* Sun Sep 14 2003 Guillaume Rousse <guillomovitch@linux-mandrake.com> 1.1-3mdk
- first mdk release