[CentOS] PHP mcrypt

Maciej Żenczykowski maze at cela.pl
Mon Jun 6 18:19:13 UTC 2005


the effort to maintain them is to:
a) patch the spec to support mcrypt
b) when building php include --with mhash and --with mcrypt
c) have the needed devel packages installed (mhash-devel and 
libmcrypt-devel) so that it builds.

afterwards everything should be automatic during rebuilds of php.
(there's no src-rpm for them - they're part of the php.src.rpm).

???
MaZe.


On Mon, 6 Jun 2005, Dag Wieers wrote:

> On Mon, 6 Jun 2005, Maciej ?enczykowski wrote:
>
>> Thanks I got both mhash and mcrypt to work
>> (base from dag).
>>
>> Maybe these (php-mhash/php-mcrypt) would be of some use in a repo?
>> (extras?) they're roughly 70kb.
>
> Send them to suggest at lists.rpmforge.net and specify if you want to
> maintain them or not. In the worst case they will provided on a
> best-effort basis.
>
> --   dag wieers,  dag at wieers.com,  http://dag.wieers.com/   --
> [all I want is a warm bed and a kind word and unlimited power]
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
-------------- next part --------------
--- php.spec_old	2005-04-26 11:38:38.000000000 +0200
+++ php.spec	2005-06-06 18:36:56.136103272 +0200
@@ -2,6 +2,7 @@
 %define with_oci8 %{?_with_oci8:1}%{!?_with_oci8:0}
 %define with_mssql %{?_with_mssql:1}%{!?_with_mssql:0}
 %define with_mhash %{?_with_mhash:1}%{!?_with_mhash:0}
+%define with_mcrypt %{?_with_mcrypt:1}%{!?_with_mcrypt:0}
 
 Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
 Name: php
@@ -220,6 +221,18 @@
 Web server that adds Mhash support to PHP.
 %endif
 
+%if %{with_mcrypt}
+%package mcrypt
+Summary: A module for PHP applications that use Mcrypt.
+Group: Development/Languages
+Requires: php = %{version}-%{release}
+BuildRequires: libmcrypt-devel
+
+%description mcrypt
+The php-mcrypt package is a dynamic shared object (DSO) for the Apache
+Web server that adds Mcrypt support to PHP.
+%endif
+
 %package snmp
 Summary: A module for PHP applications that query SNMP-managed devices.
 Group: Development/Languages
@@ -343,7 +356,7 @@
 # Fails spuriously, bug #140676:
 rm -f ext/standard/tests/time/bug27780.phpt
 
-: Build for oci8=%{with_oci8} mssql=%{with_mssql} mhash=%{with_mhash}
+: Build for oci8=%{with_oci8} mssql=%{with_mssql} mhash=%{with_mhash} mcrypt=%{with_mcrypt}
 
 %build
 
@@ -418,6 +431,7 @@
         %{?_with_oci8:--with-oci8-instant-client=shared} \
         %{?_with_mssql:--with-mssql=shared} \
         %{?_with_mhash:--with-mhash=shared} \
+        %{?_with_mcrypt:--with-mcrypt=shared} \
 	--with-pgsql=shared \
 	--with-snmp=shared,%{_prefix} \
 	--with-snmp=shared \
@@ -496,7 +510,7 @@
 # Generate files lists and stub .ini files for each subpackage
 for mod in pgsql mysql odbc ldap snmp domxml xmlrpc imap \
     mbstring ncurses gd \
-    %{?_with_oci8:oci8} %{?_with_mssql:mssql} %{?_with_mhash:mhash}; do
+    %{?_with_oci8:oci8} %{?_with_mssql:mssql} %{?_with_mhash:mhash} %{?_with_mcrypt:mcrypt}; do
     cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${mod}.ini <<EOF
 ; Enable ${mod} extension module
 extension=${mod}.so
@@ -573,7 +587,14 @@
 %files mhash -f files.mhash
 %endif
 
+%if %{with_mcrypt}
+%files mcrypt -f files.mcrypt
+%endif
+
 %changelog
+* Mon Jun  6 2005 Maciej Zenczykowski <maze at cela.pl> 4.3.9-3.6
+- conditional support for mcrypt
+
 * Tue Apr 26 2005 Joe Orton <jorton at redhat.com> 4.3.9-3.6
 - add fix for curl safe mode bypasses (#147808)
 


More information about the CentOS mailing list