Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
isv:ownCloud:community:8.1:testing
php5-libsmbclient
php5-libsmbclient.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File php5-libsmbclient.spec of Package php5-libsmbclient
%define smbclient_inc %(pkg-config smbclient --variable=includedir) %define php_extdir %(php-config --extension-dir) # FIXME: once we have scl inside the build service, we should use PATH=/opt/rh/php55/root/usr/bin:$PATH php-config --extension-dir %if "%_repository" == "CentOS_6_PHP54" || "%_repository" == "RHEL_6_PHP54" %define php_extdir /opt/rh/php54/root/usr/%{_lib}/php/modules %endif %if "%_repository" == "CentOS_6_PHP55" || "%_repository" == "RHEL_6_PHP55" %define php_extdir /opt/rh/php55/root/usr/%{_lib}/php/modules %endif %if "%_repository" == "CentOS_6_PHP56" || "%_repository" == "RHEL_6_PHP56" %define php_extdir /opt/rh/php56/root/usr/%{_lib}/php/modules %endif %define tar_name libsmbclient-php Name: php5-libsmbclient Version: 0.7.0 Release: <CI_CNT>.<B_CNT>oc Summary: A PHP wrapper for libsmbclient Group: Development/Libraries/PHP License: PHP-3.0 Url: https://github.com/eduardok/libsmbclient-php Source0: %{tar_name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?rhel_version} == 600 %define php_api_checking 0 %else %define php_api_checking 0 %endif %if %{?php_zend_api}0 && %{php_api_checking}0 # must do this for CentOS-6, but must not do this for CentOS-7, sigh. %if 0%{?centos_version} == 600 # http://forums.famillecollet.com/viewtopic.php?pid=5477#p5477 %if "%{php_core_api}" == "20100412-64" %define php_core_api_x 20100412-x86-64 %endif %if "%{php_core_api}" == "20121113-64" %define php_core_api_x 20121113-x86-64 %endif %if "%{php_core_api}" == "20131106-64" %define php_core_api_x 20131106-x86-64 %endif %if "%{php_zend_api}" == "20100525-64" %define php_zend_api_x 20100525-x86-64 %endif %if "%{php_zend_api}" == "20121212-64" %define php_zend_api_x 20121212-x86-64 %endif %if "%{php_zend_api}" == "20131226-64" %define php_zend_api_x 20131226-x86-64 %endif %if "%{php_core_api}" == "20100412-x86-64" %define php_core_api_x 20100412-64 %endif %if "%{php_core_api}" == "20121113-x86-64" %define php_core_api_x 20121113-64 %endif %if "%{php_core_api}" == "20131106-x86-64" %define php_core_api_x 20131106-64 %endif %if "%{php_zend_api}" == "20100525-x86-64" %define php_zend_api_x 20100525-64 %endif %if "%{php_zend_api}" == "20121212-x86-64" %define php_zend_api_x 20121212-64 %endif %if "%{php_zend_api}" == "20131226-x86-64" %define php_zend_api_x 20131226-64 %endif %endif # Recommends does not exist on RHEL or CentOS Recommends: php(api) = %{php_core_api} Recommends: php(zend-abi) = %{php_zend_api} Recommends: php(api) = %{php_core_api_x} Recommends: php(zend-abi) = %{php_zend_api_x} %else # php_zend_api && php_api_checking %requires_eq php5 %endif # php_zend_api && php_api_checking %if 0%{?suse_version} > 1130 BuildRequires: php5-devel %else # for CentOS_6_EPEL we use a "Substitute: php-devel php54w-devel" in prjconf BuildRequires: php-devel %endif BuildRequires: pkg-config BuildRequires: libsmbclient-devel # for human consumtion only... %if %{?php_zend_api}0 Provides: libsmbclient-for-php-zend-abi-%{php_zend_api} %endif %if %{?php_core_api}0 Provides: libsmbclient-for-php-api-%{php_core_api} %endif %description libsmbclient-php is a PHP extension that uses Samba's libsmbclient library to provide Samba related functions to PHP programs. See also: https://github.com/eduardok/libsmbclient-php/blob/master/README.md For CentOS-6, we build this package twice: a) with php-5.3.3 (with a normal CentOS repository) b) with php-5.4 (with the webtatic:el6 repository) php_extdir=%{php_extdir} %prep %setup -n %{tar_name}-%{version} %build phpize ./configure --with-libdir=%{_lib} LIBTOOL='/usr/bin/libtool --tag=CC' # --with-libsmbclient=%%{smbclient_inc} # cannot use, config.m4 must find it by itself, otherwise we get a bogus RPATH error %{__make} %{?jobs:-j%jobs} LIBTOOL='/usr/bin/libtool --tag=CC' %if %{php_api_checking} echo "%{name}: php_api_checking=%{php_api_checking}" echo "%{name} requires: php(zend-abi) = %{php_zend_api}" echo "%{name} requires: php(api) = %{php_core_api}" %else echo "%{name}: php_api_checking=%{php_api_checking}" echo "%{name} was compiled with: php(zend-abi) = %{php_zend_api}" echo "%{name} was compiled with: php(api) = %{php_core_api}" %endif echo php_extdir=%{php_extdir} %install %makeinstall INSTALL_ROOT=%{buildroot} %if "%{php_extdir}" != "/usr/%{_lib}/php/modules" # FIXME: lousy hack. Check if we can call makeinstall to put it into the right place. mkdir -p %{buildroot}/%{php_extdir} test -f %{buildroot}/usr/%{_lib}/php/modules/*.so && mv %{buildroot}/usr/%{_lib}/php/modules/* %{buildroot}/%{php_extdir} %endif rm -f %{buildroot}/%{php_extdir}/*.a %post phpconfdir=/etc/php5/conf.d/ %if "%_repository" == "CentOS_7" || "%_repository" == "RHEL_7" # be independant of installation order. mkdir -p /etc/php.d/ %endif test -d /etc/php.d/ && phpconfdir=/etc/php.d/ # seen in CentOS7 %if "%_repository" == "CentOS_6_PHP54" || "%_repository" == "RHEL_6_PHP54" test -d /opt/rh/php54/etc/php.d/ && phpconfdir=/opt/rh/php54/etc/php.d/ # seen in RH6 with SCL test -d /etc/opt/rh/rh-php54/php.d/ && phpconfdir=/etc/opt/rh/rh-php54/php.d/ # seen in centos6 with SCL test -d /opt/rh/php54/root/etc/php.d/ && phpconfdir=/opt/rh/php54/root/etc/php.d/ # seen in centos6 with rhscl %endif %if "%_repository" == "CentOS_6_PHP55" || "%_repository" == "RHEL_6_PHP55" test -d /opt/rh/php55/etc/php.d/ && phpconfdir=/opt/rh/php55/etc/php.d/ # seen in RH6 with SCL test -d /opt/rh/php55/root/etc/php.d/ && phpconfdir=/opt/rh/php55/root/etc/php.d/ # seen in centos6 with rhscl test -d /etc/opt/rh/rh-php55/php.d/ && phpconfdir=/etc/opt/rh/rh-php55/php.d/ %endif %if "%_repository" == "CentOS_6_PHP56" || "%_repository" == "RHEL_6_PHP56" test -d /opt/rh/php56/etc/php.d/ && phpconfdir=/opt/rh/php56/etc/php.d/ # seen in RH6 with SCL test -d /etc/opt/rh/rh-php56/php.d/ && phpconfdir=/etc/opt/rh/rh-php56/php.d/ # seen in centos6 with SCL %endif seen=$(php -i | grep -q libsmbclient && echo yes) # Avoid double ini file. https://github.com/owncloud/enterprise/issues/826 # Not sure why that happens at all. if [ "$seen" == "yes" ]; then echo "phpp libsmbclient module already enabled, skipping" else if [ -d $phpconfdir ]; then # avoid enterprise#783: if we have numbered ini files, create another numbered ini file. ininame=libsmbclient.ini echo $phpconfdir/[1-9]*.ini | grep -q -v '*' && ininame=99-$ininame # remove in case it is an old symlink. rm -f $phpconfdir/$ininame echo "extension=%{php_extdir}/libsmbclient.so" > $phpconfdir/$ininame else echo "WARNING phpconfdir=$phpconfdir not found. No libsmbclient.ini file installed." # Ugly hack, please avoid by providing existing phpconfdir. test -f /etc/php.ini && echo 'extension=libsmbclient.so' >> /etc/php.ini test -f /etc/php5/php.ini && echo 'extension=libsmbclient.so' >> /etc/php5/php.ini if [ -f /etc/php.ini ]; then echo 'extension=libsmbclient.so' >> /etc/php.ini elif [ -f /etc/php5/php.ini ]; then echo 'extension=libsmbclient.so' >> /etc/php5/php.ini else echo "ERROR: not even a php.ini found to append." exit 1 fi fi fi if [ -x /usr/sbin/service ]; then if [ -f /usr/lib/systemd/system/apache2.service ]; then # openSUSE has this, but build fails unless we check for the *.service file itself. /usr/sbin/service apache2 reload || true fi else if [ -x /sbin/service -a "0%{?suse_version}" -ne 1110 ]; then # CentOS 6, 7 have this. but sle11 just cheats. /sbin/service httpd reload || true else type rchttpd >/dev/null 2>&1 && rchttpd reload || true type rchttpd2 >/dev/null 2>&1 && rchttpd2 reload || true fi fi %clean %{__rm} -rf %{buildroot} %files %defattr(-,root,root,-) %{php_extdir}/libsmbclient.so %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor