Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 2398e96f80f9b59675d98c48d3b8033b > files > 2

php-pear-Net_Whois-1.0.5-2.mga3.src.rpm

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

Name: 		php-pear-%{upstream_name}
Version:     	1.0.5
Release:     	%mkrel 2
Summary:    	Net_Whois class provides a tool to query internet domain name and network number directory services
License: 	PHP
Group: 		Development/PHP
Source0: 	http://pear.php.net/get/Net_Whois-%{version}.tgz
URL: 		http://pear.php.net/package/Net_Whois
BuildRequires: 	php-pear >= 1.4.7
Requires: 	php-pear-Net_Socket
Requires:	php-pear >= 1.4.0b1
BuildArch: 	noarch

%description
The PEAR::Net_Whois looks up records in the databases maintained by several
Network Information Centers (NICs).

%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



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

%clean
rm -rf %{buildroot}

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

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

%files
%defattr(-,root,root)

%{peardir}/*
%{xmldir}/Net_Whois.xml


%changelog

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

* Sun Jan 22 2012 spuhler <spuhler> 1.0.5-1.mga2
+ Revision: 199887
- upgrade to 1.0.5
  pearized spec file

* Sat Jan 29 2011 spuhler <spuhler> 1.0.4-1.mga1
+ Revision: 44015
- removed buildroot definition from .spec
  removed the if mdkversion lines
- imported package php-pear-Net_Whois