File php8-uuid.spec of Package php8-uuid
#
# spec file for package php7-uuid
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%define php_name php8
%define pkg_name uuid
#
Name: php8-uuid
Version: 1.2.0
Release: lp151.4.1
Summary: PHP UUID support functions
License: LGPL-2.1
Group: Productivity/Networking/Web/Servers
Url: https://pecl.php.net/uuid
Source: https://pecl.php.net/get/%{pkg_name}-%{version}.tgz
BuildRequires: libuuid-devel
BuildRequires: php8-devel
BuildRequires: php(vhng)
Provides: php-%{pkg_name} = %{version}
Provides: php-%{pkg_name}(vhng) = %{php_vhng_branch}
Obsoletes: php-%{pkg_name} < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{?php_zend_api}0
Requires: php(api) = %{php_core_api}
Requires: php(zend-abi) = %{php_zend_api}
%else
%requires_eq php8
%endif
Requires: php(vhng) = %{php_vhng_branch}
%description
This extension provides functions to generate and analyse
universally unique identifiers (UUIDs).
%prep
%setup -q -n %{pkg_name}-%{version}
mkdir %{name}
%build
%{_bindir}/phpize
pushd %{name}
CFLAGS="%{optflags}"
CXXFLAGS="%{optflags}"
export CFLAGS
export CXXFLAGS
../configure --with-%{pkg_name}=%{_usr} --with-libdir=%{_lib}
make %{?_smp_mflags}
popd
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags} -C %{name} INSTALL_ROOT=%{buildroot}
mkdir -p %{buildroot}%{_sysconfdir}/%{php_name}/conf.d
echo "; comment out next line to disable %{pkg_name} extension in php" > %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/%{pkg_name}.ini
echo 'extension = %{pkg_name}.so' >> %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/%{pkg_name}.ini
%check
# only check if the extension can be loaded
%{_bindir}/php \
--no-php-ini \
--define extension=%{buildroot}%{_libdir}/%{php_name}/extensions/%{pkg_name}.so \
--modules | grep %{pkg_name}
if [ -x %{_bindir}/zts-php ] ; then
%{_bindir}/zts-php \
--no-php-ini \
--define extension=%{buildroot}%{_libdir}/%{php_name}/extensions/%{pkg_name}.so \
--modules | grep %{pkg_name}
fi
%files
%defattr(-,root,root,-)
%{_libdir}/%{php_name}/extensions/%{pkg_name}.so
%config(noreplace) %{_sysconfdir}/%{php_name}/conf.d/%{pkg_name}.ini
%doc LICENSE
%changelog
* Thu Mar 30 2017 jweberhofer@weberhofer.at
- added license to package
* Tue Jan 17 2017 jweberhofer@weberhofer.at
- build PHP7 package
- cleaned up spec
- provides php-uuid symbol
* Tue Jan 12 2016 pgajdos@suse.com
- updated to 1.0.4
* Sun Jul 29 2012 crrodriguez@opensuse.org
- Fix build with newer PHP
* Sun Aug 16 2009 crrodriguez@suse.de
- use new versioning macros if possible
* Wed Apr 2 2008 crrodriguez@suse.de
- update to version 1.0.2
* Wed Mar 26 2008 crrodriguez@suse.de
- update to version 1.0.1, only non-linux specific changes
* Wed Nov 15 2006 soporte@onfocus.cl
- very first build