Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 1b5dfcab68b378805cfa7df06993fab0 > files > 4

spip-1.7.2-2mdk.src.rpm

%define	name	spip
%define	Name	SPIP
%define	version	1.7.2
%define	Version	1-7-2
%define	release	2mdk
%define order	71

Name:		%{name}
Version:	%{version}
Release:	%{release}
Summary:	Système de publication pour l'internet
License:	GPL
Group:		System/Servers
Source0:	%{Name}-v%{Version}.tar.bz2
Source1:	%{name}.logrotate.bz2
Patch:		%{name}-1.7-logging.patch.bz2
URL:		http://www.spip.net/
Requires:	mod_php
PreReq:		rpm-helper
BuildArch:	noarch
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

%description
SPIP is a publishing system developed by the minirézo to manage the site
uZine. We provide it to anyone as a free software under GPL licence.
Therefore, you can use it freely for your own site, be it personnal,
co-operative, institutional or commercial.

To finish the installation, just go to http://localhost/spip/ecrire/

%prep
%setup -q -n %{Name}-v%{Version}
%patch
find . -name remove.txt -exec rm -f {} \;
find . -type f -exec chmod 644 {} \;

%build

%install
rm -rf $RPM_BUILD_ROOT

# install files
install -d -m 755 $RPM_BUILD_ROOT%{_var}/www/html/%{name}
cp -pR * $RPM_BUILD_ROOT%{_var}/www/html/%{name}

# move cache directory
install -d -m 755 $RPM_BUILD_ROOT/var/cache
mv $RPM_BUILD_ROOT%{_var}/www/html/%{name}/CACHE $RPM_BUILD_ROOT/var/cache/%{name}
(cd $RPM_BUILD_ROOT%{_var}/www/html/%{name} && ln -s ../../../cache/%{name} CACHE)

# move data directory
install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}
mv $RPM_BUILD_ROOT%{_var}/www/html/%{name}/ecrire/data $RPM_BUILD_ROOT%{_localstatedir}/%{name}
(cd $RPM_BUILD_ROOT%{_var}/www/html/%{name}/ecrire && ln -s ../../../../..%{_localstatedir}/%{name} data)

# logrotate
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
bzcat %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
%create_ghostfile /var/log/httpd/spip.log apache apache 640

%files
%defattr(-,root,root)
%dir %{_var}/www/html/%{name}
%{_var}/www/html/%{name}/*.php3
%{_var}/www/html/%{name}/*.html
%{_var}/www/html/%{name}/*.css
%{_var}/www/html/%{name}/*.gif
%{_var}/www/html/%{name}/*.php
%{_var}/www/html/%{name}/*.js
%{_var}/www/html/%{name}/NAVPICS
%{_var}/www/html/%{name}/oo
%{_var}/www/html/%{name}/CACHE
%{_var}/www/html/%{name}/ecrire/*
%{_var}/www/html/%{name}/IMG/*
%dir %attr(775,root,apache) %{_var}/www/html/%{name}/IMG
%dir %attr(775,root,apache) %{_var}/www/html/%{name}/ecrire
%dir %attr(775,root,apache) %{_localstatedir}/%{name}
%dir %attr(775,root,apache) /var/cache/%{name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}

%changelog
* Fri Feb 18 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1.7.2-2mdk
- spec file cleanups, remove the ADVX-build stuff

* Wed Jul 07 2004 Anne Nicolas <anne@mandrake.org> 1.7.2-1mdk
- new version

* Mon Apr 26 2004 Guillaume Rousse <guillomovitch@mandrake.org> 1.7.1-3mdk
- fix install (cpjc <cpjc@free.fr>)

* Tue Apr 20 2004 Guillaume Rousse <guillomovitch@mandrake.org> 1.7.1-2mdk
- fix order
- fix changelog
- user rpm-helper facility to create empty files

* Tue Apr 20 2004 Anne Nicolas <anne@lea-linux.org> 1.7.1-1mdk
- new release

* Wed Jan 21 2004 Guillaume Rousse <guillomovitch@mandrake.org> 1.7-1mdk
- first mdk release (SOS package strikes again)