Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 239150e276937ce0d9d09776bc03cb10 > files > 2

php-pear-File_CSV-1.0.0-2.mga3.src.rpm

%define upstream_name File_CSV
%define xmldir  %{_var}/lib/pear
%define peardir %(pear config-get php_dir 2> /dev/null)

Name: 		php-pear-%{upstream_name}
Version:     	1.0.0
Release:     	%mkrel 2
Summary:    	Horde alarm libraries
License:    	LGPL-2.1
Group: 		Networking/Mail
Source0: 	http://pear.php.net/get/File_CSV-%{version}.tgz
URL: 		http://pear.php.net/package/File_CSV
BuildRequires: 	php-pear >= 1.4.7
Requires: 	php-pear-File >= 1.4.0, 
Requires:	php-pear >= 1.7.0
BuildArch: 	noarch

%description
Read and write of CSV files as well as discovering the format the CSV file
is in.

Supports headers and is excel compatible, i.e. ="0004" outputs as 0004
(only read wise)

For more information on CSV: http://rfc.net/rfc4180.html

%prep
%setup -c -T
pear -v -c pearrc \
        -d php_dir=%{peardir} \
        -d doc_dir=/docs \
        -d bin_dir=%{_bindir} \
        -d data_dir=%{peardir}/data \
        -d test_dir=%{peardir}/tests \
        -d ext_dir=%{_libdir} \
        -s

%build

%install
rm -rf %{buildroot}
pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0}
        
# Clean up unnecessary files
rm pearrc
rm %{buildroot}/%{peardir}/.filemap
rm %{buildroot}/%{peardir}/.lock
rm -rf %{buildroot}/%{peardir}/.registry
rm -rf %{buildroot}%{peardir}/.channels
rm %{buildroot}%{peardir}/.depdb
rm %{buildroot}%{peardir}/.depdblock

mv %{buildroot}/docs .


# Install XML package description
mkdir -p %{buildroot}%{xmldir}
tar -xzf %{SOURCE0} package.xml
cp -p package.xml %{buildroot}%{xmldir}/File_CSV.xml

%clean
rm -rf %{buildroot}

%post
pear install --nodeps --soft --force --register-only %{xmldir}/File_CSV.xml

%postun
if [ "$1" -eq "0" ]; then
    pear uninstall --nodeps --ignore-errors --register-only pear.php.net/File_CSV
fi

%files
%defattr(-,root,root)
%doc docs/File_CSV/*
%{peardir}/*
%{xmldir}/File_CSV.xml


%changelog

* Sun Jan 13 2013 umeabot <umeabot> 1.0.0-2.mga3
+ Revision: 376091
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Dec 23 2011 spuhler <spuhler> 1.0.0-1.mga2
+ Revision: 186986
- imported package php-pear-File_CSV