A new user interface for you! Read more...

File php7-homegear.spec of Package php7-homegear

#
# spec file for package php7-homegear
#
# Copyright (c) 2018 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/
#


Name:           php7-homegear
Version:        7.2.5
Release:        0
Summary:	PHP7 with pthreads for homegear
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License:        PHP-3.01
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group:          Development/Languages/Other
Url:            http://www.php.net
Source:         php-7.2.5.tar.xz
Source1:        pthreads-3.1.6.tar.gz
BuildRequires:  autoconf
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  libxml2-devel
BuildRequires:  libopenssl-devel
BuildRequires:  pkgconfig(enchant)
BuildRequires:  gmp-devel
#BuildRequires:  libmcrypt-devel
BuildRequires:  libedit-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Special static build of PHP7 mit pthreads support for homegear

%package devel
Summary:        php7 for homegear development
Group:          System/Libraries

%description devel
php7-homegear development files

%prep
%setup -q -n php-%{version} -a 1
mv pthreads-3.1.6 ext/pthreads

%build
target="$(gcc -v 2>&1)" && strpos="${target%%Target:*}" && strpos=${#strpos} && \
    target=${target:strpos} && target=$(echo $target | cut -d ":" -f 2 | cut -d " " -f 2)
%configure --prefix %{_datadir}/homegear/php \
    --enable-embed=static \
    --with-config-file-path=%{_sysconfdir}/homegear \
    --with-config-file-scan-dir=%{_sysconfdir}/homegear/php.conf.d \
    --includedir=%{_includedir}/php7-homegear \
    --libdir=%{_datadir}/homegear/php \
    --libexecdir=%{_libexecdir} \
    --datadir=%{_datadir} \
    --program-suffix=-homegear \
    --sysconfdir=%{_sysconfdir}/homegear \
    --localstatedir=%{_localstatedir} \
    --mandir=%{_mandir} \
    --disable-debug \
    --disable-rpath \
    --with-pic \
    --with-layout=GNU \
    --enable-bcmath \
    --enable-calendar \
    --enable-ctype \
    --enable-dba \
    --without-gdbm \
    --without-qdbm \
    --enable-inifile \
    --enable-flatfile \
    --enable-dom \
    --with-enchant=/usr \
    --enable-exif \
    --with-gettext=/usr \
    --with-gmp=/usr/include/$target \
    --enable-fileinfo \
    --enable-filter \
    --enable-ftp \
    --enable-hash \
    --enable-json \
    --enable-pdo \
    --enable-mbregex \
    --enable-mbregex-backtrack \
    --enable-mbstring \
    --disable-opcache \
    --enable-phar \
    --enable-posix \
    --with-mysqli=mysqlnd \
    --with-zlib-dir=/usr \
    --with-openssl \
    --with-libedit=/usr \
    --enable-libxml \
    --enable-session \
    --enable-simplexml \
    --enable-pthreads \
    --with-xmlrpc \
    --enable-soap \
    --enable-sockets \
    --enable-tokenizer \
    --enable-xml \
    --enable-xmlreader \
    --enable-xmlwriter \
    --with-mhash=yes \
    --enable-sysvmsg \
    --enable-sysvsem \
    --enable-sysvshm \
    --enable-zip \
    --disable-cli \
    --disable-cgi \
    --enable-pcntl \
    --enable-maintainer-zts
make %{?_smp_mflags}

%install
%make_install INSTALL_ROOT=%{buildroot}
mkdir -p %{buildroot}%{_libdir}
mv %{buildroot}%{_datadir}/homegear/php/lib/libphp7.a %{buildroot}%{_libdir}/libphp7-homegear.a
mv %{buildroot}%{_includedir}/php7-homegear/php/* %{buildroot}%{_includedir}/php7-homegear
rmdir %{buildroot}%{_includedir}/php7-homegear/php

%post
%postun

%files
%defattr(-,root,root)
%{_bindir}/php-config-homegear
%{_bindir}/phpdbg-homegear
%{_bindir}/phpize-homegear
%{_mandir}/man1/php-config-homegear.1.gz
%{_mandir}/man1/phpdbg-homegear.1.gz
%{_mandir}/man1/phpize-homegear.1.gz

%files devel
%{_includedir}/php7-homegear
%{_libdir}/libphp7-homegear.a
%dir %{_datadir}/homegear
%dir %{_datadir}/homegear/php
%{_datadir}/homegear/php/build

%changelog