File php-kolab-Net_LDAP3.spec of Package php-kolab-Net_LDAP3

#
# spec file for package php7-pear-Net_LDAP3
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%define php_name %(php -r "print 'php' . PHP_MAJOR_VERSION;")
%define php_major %(php -r "print PHP_MAJOR_VERSION;")
%define pear_name Net_LDAP3

Name:           %{php_name}-kolab-Net_LDAP3
Version:        1.0.7
Release:        0
Summary:        Object oriented interface for searching and manipulating LDAP-entries
License:        GPL-3.0+
Group:          Productivity/Networking/Web/Servers
Url:            http://kolab.org
# From https://cgit.kolab.org/php-Net-LDAP3/
Source0:        https://cgit.kolab.org/php-Net-LDAP3/snapshot/php-Net-LDAP3-pear-Net-LDAP3-%{version}.tar.gz
BuildRequires:  php-devel
BuildArch:      noarch

Requires:       %{php_name}
Requires:       mozldap-tools >= 6.0.5
Requires:       php-pear(Net_LDAP2)

Provides:       php-kolab-%{pear_name} = %{version}
Provides:       php-pear(%{pear_name}) = %{version}

# Fix for renaming (package convention)
Provides:       php-pear-%{pear_name}  = %{version}
Obsoletes:      php-pear-%{pear_name}  <= %{version}
Provides:       %{php_name}-pear-%{pear_name} = %{version}
Obsoletes:      %{php_name}-pear-%{pear_name} <= %{version}

%description
A successor of the PEAR:Net_LDAP2 module providing advanced functionality for
accessing LDAP directories.

%prep
%setup -q -n php-Net-LDAP3-pear-Net-LDAP3-%{version}

%build

%install
mkdir -p %{buildroot}/%{_datadir}/%{php_name}/
cp -a lib/Net %{buildroot}/%{_datadir}/%{php_name}/.

%files
%doc LICENSE
%dir %{_datadir}/%{php_name}
%dir %{_datadir}/%{php_name}/Net
%{_datadir}/%{php_name}/Net/LDAP3.php
%dir %{_datadir}/%{php_name}/Net/LDAP3
%{_datadir}/%{php_name}/Net/LDAP3/Result.php

%changelog
openSUSE Build Service is sponsored by