Blob Blame History Raw
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%define pear_name File_Passwd

Name:           php-pear-File-Passwd
Version:        1.1.6
Release:        4%{?dist}
Summary:        Manipulate many kinds of password files

Group:          Development/Languages
License:        PHP
Source1:        PHP-LICENSE-3.01
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  php-pear >= 1:1.4.9-1.2
Requires:       php-pear(PEAR)
Requires(post): %{__pear}
Requires(postun): %{__pear}
Provides:       php-pear(%{pear_name}) = %{version}

# Samba not required for RHEL
%if !0%{?rhel}
Requires: php-pear(Crypt_CHAP) >= 1.0.0

Provides methods to manipulate and authenticate against standard Unix,
SMB server, AuthUser (.htpasswd), AuthDigest (.htdigest), CVS pserver
and custom formatted password files.

%setup -qc
[ -f package2.xml ] || mv package.xml package2.xml
mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml
install -pm 644 -c %{SOURCE1} LICENSE
cd %{pear_name}-%{version}

cd %{pear_name}-%{version}
# Empty build section, most likely nothing required.

cd %{pear_name}-%{version}
rm -rf $RPM_BUILD_ROOT docdir
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml

# Clean up unnecessary files
rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*

# Install XML package description
install -d $RPM_BUILD_ROOT%{pear_xmldir}
install -pm 644 %{pear_name}.xml $RPM_BUILD_ROOT%{pear_xmldir}

# Remove samba extension for RHEL
%if 0%{?rhel}
rm -f $RPM_BUILD_ROOT%{pear_phpdir}/File/Passwd/Smb.php
rm -f $RPM_BUILD_ROOT%{pear_testdir}/%{pear_name}/tests/*smb.*


%{__pear} install --nodeps --soft --force --register-only \
    %{pear_xmldir}/%{pear_name}.xml >/dev/null || :

if [ $1 -eq 0 ] ; then
    %{__pear} uninstall --nodeps --ignore-errors --register-only \
        %{pear_name} >/dev/null || :

%dir %{pear_phpdir}/File

* Thu Feb 26 2009 Fedora Release Engineering <> - 1.1.6-4
- Rebuilt for

* Sat Jun 14 2008 Christopher Stone <> 1.1.6-3
- Rebuild for vendor tag (bz #451361)

* Sun May 13 2007 Christopher Stone <> 1.1.6-2
- Include samba extension as default for Fedora
- Exclude samba extension from Enterprise Linux

* Tue Mar 13 2007 Christopher Stone <> 1.1.6-1
- Initial Fedora release