Sophie

Sophie

distrib > Mageia > 9 > x86_64 > by-pkgid > 9e1cffdf6c5c65c246e3dc02e6ce89c4 > files > 2

php-pear-Console_Getopt-1.4.3-1.mga9.src.rpm

%define upstream_name Console_Getopt
%define peardir %(pear config-get php_dir 2> /dev/null || echo %{_datadir}/pear)
%define xmldir  /var/lib/pear

Summary:	Command-line option parser
Name: 		php-pear-%{upstream_name}
Version: 	1.4.3
Release: 	%mkrel 1
License: 	PHP License
Group: 		Development/PHP
URL: 		http://pear.php.net/package/Console_Getopt
Source0: 	http://pear.php.net/get/Console_Getopt-%{version}.tgz
BuildRequires:  php-pear >= 1.4.7
Requires(post): php-pear
Requires(preun): php-pear
Requires:	php-pear
BuildArch: 	noarch

%description
This is a PHP implementation of "getopt" supporting both
short and long options.

%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
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}/Console_Getopt.xml


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

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

%files
%{peardir}/*
%{xmldir}/Console_Getopt.xml


%changelog
* Wed Apr 20 2022 mokraemer <mokraemer> 1.4.3-1.mga9
+ Revision: 1852136
- new version 1.4.3
- package included in php-pear

* Mon Feb 08 2016 umeabot <umeabot> 1.3.1-4.mga6
+ Revision: 947910
- Mageia 6 Mass Rebuild

* Wed Oct 15 2014 umeabot <umeabot> 1.3.1-3.mga5
+ Revision: 739179
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 1.3.1-2.mga5
+ Revision: 687190
- Mageia 5 Mass Rebuild

* Sat Jul 12 2014 spuhler <spuhler> 1.3.1-1.mga5
+ Revision: 651471
- imported package php-pear-Console_Getopt