Sophie

Sophie

distrib > Mandriva > 10.1 > i586 > by-pkgid > 9ea97dc9ae47f47200487cf581fe3435 > files > 3

phpSQLiteAdmin-0.1-2mdk.src.rpm

%define name	phpSQLiteAdmin
%define version	0.1
%define release	2mdk
%define webadminroot /var/www/html/admin

Summary:	PhpSQLiteAdmin allows you to administer an sqlite database over a web interface
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPL
Group:		System/Servers
Source0:	%{name}-%{version}.tar.bz2
Patch0:		phpSQLiteAdmin-0.1-pre_0.2_fixes.diff.bz2
URL:		http://www.mind.lu/~yg/phpsla/
Requires:	php-common php-sqlite mod_php
BuildRequires:	perl 
Buildarch: 	noarch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix:		%{webadminroot}

%description
phpSQLiteAdmin allows you to administer an sqlite database over a
web interface.

%prep

%setup -q

# clean up CVS stuff
for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
    if [ -e "$i" ]; then rm -r $i; fi >&/dev/null
done

# fix dir perms
find . -type d | xargs chmod 755

# fix file perms
find . -type f | xargs chmod 644

# strip away annoying ^M
for i in php txt css; do
    find . -type f -name "*.${i}" | xargs perl -p -i -e 's/\r//'
done

%patch0 -p1

%build

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}/%{webadminroot}/%{name}

install -m0644 *.php %{buildroot}/%{webadminroot}/%{name}/
install -m0644 javascript.txt %{buildroot}/%{webadminroot}/%{name}/
install -m0644 *.css %{buildroot}/%{webadminroot}/%{name}/

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc todo.txt
%config(noreplace) %attr(0644,root,root) %{webadminroot}/%{name}/config.php
%{webadminroot}/%{name}

%changelog
* Sun Nov 09 2003 Oden Eriksson <oden.eriksson@linux-mandrake.com> 0.1-2mdk
- argh!, forgot to add %%clean ;)

* Sun Nov 09 2003 Oden Eriksson <oden.eriksson@linux-mandrake.com> 0.1-1mdk
- initial cooker contrib.
- added P0 (fixes from the author)