[packages/php-pecl-blenc] support building for multiple php versions
glen
glen at pld-linux.org
Fri Jun 21 19:19:56 CEST 2013
commit 8b5cd5f98b649b8583dfa6163758ea933875aee1
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Jun 21 20:18:29 2013 +0300
support building for multiple php versions
php-pecl-blenc.spec | 48 ++++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/php-pecl-blenc.spec b/php-pecl-blenc.spec
index e782e32..1373a1b 100644
--- a/php-pecl-blenc.spec
+++ b/php-pecl-blenc.spec
@@ -1,25 +1,25 @@
# TODO
-# - doesn't build
-%define _modname blenc
-%define _status alpha
-#
-Summary: %{_modname} - transparent PHP script encryption using Blowfish
-Summary(pl.UTF-8): %{_modname} - transparentne szyfrowanie skryptów algorytmem Blowfish
-Name: php-pecl-%{_modname}
-Version: 1.0
+# - doesn't build for php > 5.2
+%define php_name php%{?php_suffix}
+%define modname blenc
+%define status alpha
+Summary: %{modname} - transparent PHP script encryption using Blowfish
+Summary(pl.UTF-8): %{modname} - transparentne szyfrowanie skryptów algorytmem Blowfish
%define _ver alpha
%define _rel 1.2
+Name: %{php_name}-pecl-%{modname}
+Version: 1.0
Release: 0.%{_ver}.%{_rel}
License: PHP
Group: Development/Languages/PHP
-Source0: http://pecl.php.net/get/%{_modname}-%{version}%{_ver}.tgz
+Source0: http://pecl.php.net/get/%{modname}-%{version}%{_ver}.tgz
# Source0-md5: 178ea0333257b396cc19dfea8ea0e429
URL: http://pecl.php.net/package/blenc/
-BuildRequires: php-devel >= 3:5.0.0
-BuildRequires: rpmbuild(macros) >= 1.344
+BuildRequires: %{php_name}-devel >= 3:5.0.0
+BuildRequires: rpmbuild(macros) >= 1.650
%{?requires_php_extension}
-Requires: php-common >= 4:5.0.4
-Obsoletes: php-pear-%{_modname}
+Requires: php(core) >= 5.0.4
+Obsoletes: php-pear-%{modname}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -30,7 +30,7 @@ possible to disassemble the script into op codes using a package such
as XDebug), however it does keep people out of your code and make
reverse engineering difficult.
-In PECL status of this extension is: %{_status}.
+In PECL status of this extension is: %{status}.
%description -l pl.UTF-8
BLENC jest rozszerzeniem przyczepiającym się do silnika Zend,
@@ -40,13 +40,13 @@ przy użyciu algorytmu blowfish. Nie dostarcza on kompleksowej ochrony
użyciu narzędzi takich jak XDebug), jednakże trzyma ludzi z dala od
kodu i utrudnia jakikolwiek reverse engineering.
-To rozszerzenie ma w PECL status: %{_status}.
+To rozszerzenie ma w PECL status: %{status}.
%prep
-%setup -q -c -n %{name}-%{version}%{_ver}
+%setup -qc
+mv %{modname}-%{version}%{?_ver}/* .
%build
-cd %{_modname}-%{version}%{_ver}
phpize
%configure
%{__make}
@@ -55,10 +55,10 @@ phpize
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
-install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
-cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
-; Enable %{_modname} extension module
-extension=%{_modname}.so
+install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
+; Enable %{modname} extension module
+extension=%{modname}.so
EOF
%clean
@@ -74,6 +74,6 @@ fi
%files
%defattr(644,root,root,755)
-%doc %{_modname}-%{version}%{_ver}/CREDITS
-%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
-%attr(755,root,root) %{php_extensiondir}/%{_modname}.so
+%doc CREDITS
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{modname}.so
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-blenc.git/commitdiff/8b5cd5f98b649b8583dfa6163758ea933875aee1
More information about the pld-cvs-commit
mailing list