[CentOS] Need php-mcrypt

Maciej Ĺťenczykowski maze at cela.pl
Thu Dec 7 05:25:25 UTC 2006


For PHP4 for Centos I have php-mcrypt and php-mhash at my site 
(http://tcs.uj.edu.pl/~buildcentos/)  You can probably look at that diff 
and put together something for PHP5.

You need to:

install php5 src.rpm (get from centosplus)
go to source spec directory  (/usr/src/redhat/SPECS) and apply something 
along the lines of the diff linked above.
compile via
rpmbuild -ba --with=mcrypt php.spec
(maybe ' ' instead of '=', can't remember)
take generated php-mcrypt rpm (inside /usr/src/redhat/RPMS) and enjoy.

If you do more of this you should probably set up a non-root build 
environment.

Basically: create a new user (or use a current user), stick the above 
attachment (after editing) into ~user/.rpmmacros
create ~user/rpm/{BUILD,RPMS,SOURCES,SPECS,SRPMS,tmp} directories

Use above process, except this time running as user and not as root, and 
replacing /usr/src/redhat with ~user/rpm

Another simpler solution is to as root run chown -R user:user 
/usr/src/redhat  (but it's not really nice...)

Cheers,
Maciej

On Tue, 5 Dec 2006, Ferdinando Santacroce wrote:

> Hi all!
> I need this PHP extension.
> I'm in CentOS 4.4, plus extras, plus, dag, freshrpm and rpmforge repos, but I 
> can't find it.
> I found libmcrypt, but PHP seems ignore it... Ah, I use PHP5, MySQL5 and 
> Apache 2.2
> I tried to hand write right conf of *.ini PHP conf files, and I tried to 
> manually soft-link libraries in php.d/modules/.. folder, but nothing works.
> So I would know if there's a Centos repos for this extension.
> FC5 repos have it, but I don't know if including a Fedora repos into CentOS 
> would be high risk....
>
> Can someone make me know?
> Thank you guys, and girls, of course...! ;-)
>
> Nando
> Chiacchiera con i tuoi amici in tempo reale! 
> http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>
-------------- next part --------------
%packager	Maciej ??enczykowski
%distribution	CentOS4
%vendor		TCS-II-UJ
%_signature	gpg
%_gpg_name	maze at tcs.ii.uj.edu.pl
%_gpg_path	~/.gnupg

%_topdir	/home/buildcentos/rpm
%_tmppath	%{_topdir}/tmp

#%_rpmtopdir	%{_topdir}/%{name}
#%_builddir	%{_rpmtopdir}/BUILD
#%_rpmdir	%{_rpmtopdir}/RPMS
#%_sourcedir	%{_rpmtopdir}/SOURCES
#%_specdir	%{_rpmtopdir}/SPECS
#%_srcrpmdir	%{_rpmtopdir}/SRPMS

%disttag	centos4
%repotag	maze

# Change default RPM query format to show ARCH
%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}
# %_query_all_fmt %%{epoch}:%%{name}-%%{version}-%%{release}.%%{arch}

# 
# Please distribute *only* with this comment block.
# 
# These are the macros used in ATrpms' build machine. They may or may
# not work in your setup, but you will get the idea and adapt them to
# your setup or vice-versa.
# 
# If you think that these macros are all you need for rebuilding kmdl
# rpms you are in error, you also need a working kernel source tree
# infrastructure to point these macros to.
# 
# E.g. perform the same steps the Red Hat kernel specfiles do for
# setting up a kernel. You only need to go as far as
# configuring/preparing the tree. Building the kernel/kernel module
# themselves is overkill.

# %_kernel                %(uname -r)

%disttag3               el4
# %_kernel                2.6.9-34.0.1.ELsmp

%kmdl_kernelsrcdir      /lib/modules/%{_kernel}/build
%kmdl_userland          %(test "%{_kernel}" = none && echo 1 || echo 0)
%_kflavour      %(echo %{_kernel} | grep -E '(smp|enterprise|bigmem)' | sed -e's/^.*\\(smp\\|enterprise\\|bigmem\\).*$/\\1/')
%_kversion      %(echo %{_kernel} | sed -e's/^\\(.*\\)\\(smp\\|enterprise\\|bigmem\\).*$/\\1/')
%_krelver       %(echo %{_kversion} | sed -e's/-/_/')
# The name of the kernel with flavour ("kernel", "kernel-smp", ...)
%_kname         %(echo kernel-%{_kflavour} | sed -e's/-$//')
# A very old naming scheme
#_kname2                %(echo kmodule-%{_kflavour} | sed -e's/-$//')
# The old ATrpms naming scheme ("kmdl", "kmdl-smp")
%_kname3                %(echo kmdl-%{_kflavour} | sed -e's/-$//')
%_modflags      -include /tmp/atrpms-mykernel-%{_kernel}-%{_target_cpu}.h -DMODULE -DMODVERSIONS -include %{_kernelsrcdir}/include/linux/modversions.h

# "kernel": the output of "uname -r" of the kernel to build for
# (default: the running one)
# "_kernelsrcdir": The directory of the sources used to build "kernel"
# (default: /lib/modules/%{_kernel}/build)

%kmdl_name %{_kpkgname}-kmdl-%{_kernel}
%kmdl_nameof() %1-kmdl-%{_kernel}
%kmdl_namepure %{_kpkgname}-kmdl
%kmdl_namepureof() %1-kmdl
#
%kmdl_name_old kernel-module-%{_kpkgname}-%{_kernel}
%kmdl_nameof_old() kernel-module-%1-%{_kernel}
%kmdl_namepure_old kernel-module-%{_kpkgname}
%kmdl_namepureof_old() kernel-module-%1
#_kmdl_name_old %{_kpkgname}-kmdl-%{_kernel}
#_kmdl_nameof_old() %1-kmdl-%{_kernel}
#_kmdl_name_old %{_kpkgname}-%{_kname3}-%{_kversion}
#_kmdl_nameof_old() %1-%{_kname3}-%{_kversion}
#_kmdl_namepure_old %{_kpkgname}-kmdl
#_kmdl_namepureof_old() %1-kmdl

%_kernelbuildreq %{nil}

%kmdl() \
%{expand:%%global _kpkgname %1} \
%_kernelbuildreq \
%{nil}

%kmdl_parentdependencies\
Requires: %{kmdl_namepure}-%{evr}

%kmdl_dependencies\
#Requires: atrpms-kmdl-helper \
#Requires: strictdep-%{_kname}-%{_target_cpu} = %{_kversion}\
Requires: /boot/vmlinuz-%{_kernel}\
Requires: %{_kname} = %{_kversion}, /sbin/depmod, modutils >= 2.4.14\
BuildRequires: %_kernelcompiler\
Provides: %kmdl_namepure-%{evr}\
Provides: %kmdl_namepure-%_kernel = %{evr}\
#\
# backward compatibility kernel-module-foo\
#Provides: %kmdl_namepure_old-%{evr}\
#Provides: %kmdl_namepure_old-%_kernel = %{evr}\
Obsoletes: %kmdl_namepure_old-%{evr}, %kmdl_namepure_old-%_kernel <= %{evr}

## backward compatibility foo-kmdl-smp\
#Provides: %{_kpkgname}-%{_kname3}-%{_kversion} = %{evr}\
#Provides: %{_kpkgname}-kmdl\
## backward compatibility with foo-kernel-...\
#Provides: %{_kpkgname}-kernel\
#%{?_kflavour:Provides: %{_kpkgname}-%{_kname}}\
#Provides: %{_kpkgname}-%{_kname}-%{_kversion} = %{evr}\
#Provides: %{_kpkgname}-%{_kname}-%{_kversion}-%{_target_cpu} = %{evr}\
## backward compatibility with unversioned kernel-module-foo\
#Provides: kernel-module-%{_kpkgname}\
#%{?_kflavour:Provides: %{_kname}-module-%{_kpkgname}}\

%_kernelcompiler_el4 /usr/bin/gcc
%_kernelcompiler_el3 /usr/bin/gcc
%_kernelcompiler_fc4 /usr/bin/gcc
%_kernelcompiler_fc3 /usr/bin/gcc
%_kernelcompiler_fc2 /usr/bin/gcc
%_kernelcompiler_fc1 /usr/bin/gcc32
%_kernelcompiler_rh9 /usr/bin/gcc
%_kernelcompiler_rh8_0 /usr/bin/gcc
%_kernelcompiler_rh7_3 /usr/bin/gcc

%_kernelcompiler %{expand:%%_kernelcompiler_%{disttag3}}

%kmdl_moduledir /lib/modules/%{_kernel}/updates

%kmdl_config\
export CC=%_kernelcompiler

%kmdl_desc\
This package contains the %kmdl_name kernel modules for the Linux kernel package:\
%{_kname}-%{_kversion}.%{_target_cpu}.rpm.

%_kernelname %{_kname}-%{_kversion}.%{_target_cpu}.rpm

%kmdl_install\
#%{_datadir}/atrpms/addcustomkmdl '/lib/modules/`uname -r`/updates'\
depmod -ae -F /boot/System.map-%{_kernel} %{_kernel} > /dev/null 2>&1 || :

%kmdl_remove\
depmod -ae -F /boot/System.map-%{_kernel} %{_kernel} > /dev/null 2>&1 || :


More information about the CentOS mailing list