%define module chora %define name horde-%{module} %define version 2.0 %define release 4mdk Name: %{name} Version: %{version} Release: %{release} Summary: The Horde CVS viewer License: GPL Group: System/Servers Source0: ftp://ftp.horde.org/pub/%{module}/%{module}-h3-%{version}.tar.bz2 Source1: %{module}-horde.conf.bz2 URL: http://www.horde.org/%{module} PreReq: rpm-helper Requires: horde >= 3.0 Requires: cvs BuildArch: noarch BuildRequires: file BuildRoot: %{_tmppath}/%{name}-%{version} %description Chora is the Horde CVS viewer, and it provides an advanced web-based view of any CVS repository. It now includes annotation support, visual branch viewing capability, and human-readable diffs. %prep %setup -q -n %{module}-h3-%{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 %{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 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 COPYING 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.0-4mdk - spec file cleanups, remove the ADVX-build stuff - strip away annoying ^M * Thu Jan 27 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.0-3mdk - 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-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> 2.0-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 - no more apache configuration - rpmbuildupdate aware - spec cleanup * Wed Aug 04 2004 Guillaume Rousse <guillomovitch@mandrake.org> 1.2.2-1mdk - new version * Sun Jul 18 2004 Guillaume Rousse <guillomovitch@mandrake.org> 1.2-4mdk - apache config file in %{_sysconfdir}/httpd/webapps.d * Sat May 01 2004 Guillaume Rousse <guillomovitch@mandrake.org> 1.2-3mdk - renamed to %{name} - pluggable horde configuration - standard perms for %{_sysconfdir}/httpd/conf.d/%{order}_%{name}.conf - don't provide useless ADVXpackage virtual package - untagged localisation files - removed .htaccess files * Tue Sep 09 2003 Guillaume Rousse <guillomovitch@linux-mandrake.com> 1.2-2mdk - changed order to 72, as all other horde apps - 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> 1.2-1mdk - 1.2 - spec cleanup - remove useless files from webroot (.dist, doc files, .po) - properly tag localisation files - ADVX macros - apache2 integration - fixed URL * Thu Jan 16 2003 Yves Duret <yves@zarb.org> 1.1-2mdk - rebuild. - added missing doc. * Mon Oct 28 2002 Yves Duret <yves@zarb.org> 1.1-1mdk - first mandrake release