%define modname pam %define dirname %{modname} %define soname %{modname}.so %define inifile A55_%{modname}.ini Summary: PAM integration for PHP Name: php-%{modname} Version: 1.0.3 Release: %mkrel 11 Group: Development/PHP License: PHP License URL: http://pecl.php.net/package/pam Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz BuildRequires: php-devel >= 3:5.2.0 BuildRequires: pam-devel BuildRequires: dos2unix %description This extension provides PAM (Pluggable Authentication Modules) integration. PAM is a system of libraries that handle the authentication tasks of applications and services. The library provides a stable API for applications to defer to for authentication tasks. %prep %setup -q -n %{modname}-%{version} [ "../package*.xml" != "/" ] && mv ../package*.xml . # lib64 fix perl -pi -e "s|/lib\b|/%{_lib}|g" config.m4 # attribs fix find -type f | xargs chmod 644 # crlf fix find -type f | xargs dos2unix %build %serverbuild phpize %configure2_5x --with-libdir=%{_lib} \ --with-%{modname}=shared,/%{_lib} %make mv modules/*.so . %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_sysconfdir}/php.d install -d %{buildroot}%{_sysconfdir}/pam.d install -d %{buildroot}%{_libdir}/php/extensions install -m755 %{soname} %{buildroot}%{_libdir}/php/extensions/ cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF extension = %{soname} [pam] pam.servicename = "%{name}"; EOF cat > %{buildroot}%{_sysconfdir}/pam.d/%{name} <<EOF #%PAM-1.0 auth include system-auth account include system-auth EOF %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc README CREDITS package*.xml %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/pam.d/%{name} %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/php.d/%{inifile} %attr(0755,root,root) %{_libdir}/php/extensions/%{soname} %changelog * Wed Jan 30 2013 oden <oden> 1.0.3-11.mga3 + Revision: 393313 - rebuilt for php-5.4.11 * Sun Jan 13 2013 umeabot <umeabot> 1.0.3-10.mga3 + Revision: 375875 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Mar 19 2012 luigiwalser <luigiwalser> 1.0.3-9.mga2 + Revision: 224184 - fix dos2unix syntax - httpd restart is handled by filetriggers now + spuhler <spuhler> - rebuild against php-5.3.9 cleaned up spec * Mon Feb 07 2011 spuhler <spuhler> 1.0.3-7.mga1 + Revision: 48192 - removed the if mdkversion lines from spec - removed buildroot definition from .spec - imported package php-pam