Would it be possible to compile Mod_PHP3 with IMAP support.
I have edited the spec file so it possible to do a recompile with IMAP
support.
i had to copy some file from the imap src dir to get it to work. Look in
imap.spec!!

The reason i need IMAP support is so I can use a web client like IMP to
check mail.
www.horde.org/imp (Similar to HOTMAIL)

RPM's for IMP are available, so think about including it in cooker!!!

Warning made by a newbie!!

Troels Liebe Bentsen
Summary: Server daemons for IMAP and POP network mail protocols.
Name: imap
Version: 4.5
Release: 5mdk
Copyright: BSD
Group: System Environment/Daemons
Source: ftp://ftp.cac.washington.edu/mail/imap-%{version}.tar.bz2
Source1: imap.pamd
Patch0: imap-4.5-linux.patch.bz2
Patch1: imap-4.4-vfs.patch.bz2
Patch2: imap-4.5-redhat.patch.bz2
Buildroot: /var/tmp/imap-root
Requires: pam >= 0.59

%description
The imap package provides server daemons for both the IMAP (Internet
Message Access Protocol) and POP (Post Office Protocol) mail access
protocols.  The POP protocol uses a "post office" machine to collect mail
for users and allows users to download their mail to their local machine
for reading. The IMAP protocol provides the functionality of POP, but
allows a user to read mail on a remote machine without downloading it to
their local machine.

Install the imap package if you need a server to support the IMAP or the
POP mail access protocols.

%prep

%setup -q
%patch0 -p1 -b .linux
%patch1 -p1 -b .vfs
%patch2 -p1 -b .redhat

%build
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" lnp
## create a shared library
#gcc -shared -Wl,-soname,libimap.so c-client/*.o -o libimap.so.%{version}

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/man/man8
install -m 644 ./src/ipopd/ipopd.8c $RPM_BUILD_ROOT/usr/man/man8/ipopd.8c
install -m 644 ./src/imapd/imapd.8c $RPM_BUILD_ROOT/usr/man/man8/imapd.8c
mkdir -p $RPM_BUILD_ROOT/usr/sbin
install -s -m 755 ./ipopd/ipop2d $RPM_BUILD_ROOT/usr/sbin
install -s -m 755 ./ipopd/ipop3d $RPM_BUILD_ROOT/usr/sbin
install -s -m 755 ./imapd/imapd $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/etc/pam.d
install -m 644 ${RPM_SOURCE_DIR}/imap.pamd $RPM_BUILD_ROOT/etc/pam.d/imap
install -m 644 ${RPM_SOURCE_DIR}/imap.pamd $RPM_BUILD_ROOT/etc/pam.d/pop
## Install the shared lib
#install -m 755 libimap.so.%{version} $RPM_BUILD_ROOT/usr/lib
#ln -sf libimap.so.%{version} $RPM_BUILD_ROOT/usr/lib/libimap.so

## Added by Troels Liebe Bentsen([EMAIL PROTECTED]) ## 
mkdir -p $RPM_BUILD_ROOT/usr/lib
install -m 755 ./c-client/c-client.a $RPM_BUILD_ROOT/usr/lib
mkdir -p $RPM_BUILD_ROOT/usr/include
install -m 755 ./c-client/rfc822.h $RPM_BUILD_ROOT/usr/include
install -m 755 ./c-client/mail.h $RPM_BUILD_ROOT/usr/include
install -m 755 ./c-client/linkage.h $RPM_BUILD_ROOT/usr/include
##

bzip2 -9f $RPM_BUILD_ROOT/usr/man/*/*

for i in `find $RPM_BUILD_ROOT/ -type 'f' -perm '+a=x' ! -name 'lib*so*'`; do
        file $i |grep -q "not stripped" && strip $i
done

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%config /etc/pam.d/imap
%config /etc/pam.d/pop
/usr/man/man8/ipopd.8c.bz2
/usr/man/man8/imapd.8c.bz2
%attr(0755,root,mail)   /usr/sbin/ipop2d
%attr(0755,root,mail)   /usr/sbin/ipop3d
%attr(0755,root,mail)   /usr/sbin/imapd
%doc README
#/usr/lib/libimap*
/usr/lib/c-client.a
/usr/include/rfc822.h
/usr/include/mail.h
/usr/include/linkage.h

%changelog

* Tue May 11 1999 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
- Mandrake adaptions

* Fri Apr 09 1999 Cristian Gafton <[EMAIL PROTECTED]>
- ipop3d service name was changed to "pop" now. Clearly somebody that hasn't
  got a clue about PAM stuff is messing around with the source.

* Sun Mar 21 1999 Cristian Gafton <[EMAIL PROTECTED]> 
- auto rebuild in the new build environment (release 2)

* Sat Mar 13 1999 Cristian Gafton <[EMAIL PROTECTED]>
- verson 4.5
- loose the noflock patch

* Thu Dec 17 1998 Cristian Gafton <[EMAIL PROTECTED]>
- added a -vfs patch because sys/statvfs on glibc 2.1 is different from what
  is available on the sun...
- build against glibc 2.1

* Fri Sep 11 1998 Jeff Johnson <[EMAIL PROTECTED]>
- use only fcntl locking.

* Thu Sep 10 1998 Jeff Johnson <[EMAIL PROTECTED]>
- update to 4.4.
- removed g+s bit to imapd.

* Wed Jul 22 1998 Jeff Johnson <[EMAIL PROTECTED]>
- updated to 4.2.
- added g+s bit to imapd so that lock files can be created.

* Thu May 07 1998 Prospector System <[EMAIL PROTECTED]>
- translations modified for de, fr, tr

* Wed Apr 08 1998 Cristian Gafton <[EMAIL PROTECTED]>
- Updated to the latest imap as of today...

* Wed Dec 10 1997 Cristian Gafton <[EMAIL PROTECTED]>
- Updated to the latest imap as of today...
- Updated the pam patch to reflect the new directory organization

* Thu Oct 23 1997 Michael K. Johnson <[EMAIL PROTECTED]>
- Fix patch for new PAM spec compliance.

* Thu Oct 02 1997 Michael K. Johnson <[EMAIL PROTECTED]>
- Comply with change in PAM spec.
- Use a buildroot.

* Mon Mar 03 1997 Michael K. Johnson <[EMAIL PROTECTED]>
- Moved from pam.conf to pam.d

* Mon Mar 03 1997 Erik Troan <[EMAIL PROTECTED]>
- Fixed buffer overrun in server_login().
Summary: The PHP3 HTML-embedded scripting language for use with Apache.
Summary(fr): Le langage de script embarque-HTML PHP3 pour Apache.
Name: mod_php3
Version: 3.0.9
Release: 6
Group: System Environment/Daemons
Source0: http://www.php.net/distributions/php-%{version}.tar.bz2
Source1: manual.tar.bz2
Source2: php3.conf
Copyright: GPL
BuildRoot: /var/tmp/php3-root
Prereq: postgresql-clients
Requires: webserver

%description
PHP is an HTML-embedded scripting language.  PHP attempts to make it
easy for developers to write dynamically generated web pages.  PHP
also offers built-in database integration for several commercial
and non-commercial database management systems, so writing a
database-enabled web page with PHP is fairly simple.  The most
common use of PHP coding is probably as a replacement for CGI
scripts.  The mod_php module enables the Apache web server to
understand and process the embedded PHP language in web pages.

This package contains PHP3, or PHP version 3.05.  If you use
applications which specifically rely on PHP/FI, you should instead
install the PHP/FI module contained in the mod_php package.
If you're just starting with PHP, you should install this package.
You'll also need to install the Apache web server.

%description -l fr
PHP est un langage de script embarque dans le HTM. PHP essaye de rendre
simple aux developpeurs d'ecrire des pages web generees dynamiquement.
PHP incorpore egalement une integration avec plusieurs systemes de gestion
de bases de donnees commerciaux et non-connerciaux, qui rent facile
la creation de pages web liees avec des bases de donnees. L'utilisation la
plus commune de PHP est probablement en remplacement de scripts CGI. Le
module mod_php permet au serveur web apache de comprendre et de traiter le
langage PHP integre dans des pages web.

Ce package contient PHP3, ou PHP version 3.0.9. Si vous utilisez des
applications qui utilisent specifiquement PHP/FI, vous devrez installer le
module PHP/FI inclus dans le package mod_php. Si vous debutez avec PHP, vous
devriez installer ce package. Vous aurez egalement besoin d'installer le
serveur web Apache.


%prep
%setup -q -n php-%{version}
chown -R root.root .

CFLAGS="$RPM_OPT_FLAGS" ./configure \
        --with-apxs=/usr/sbin/apxs \
        --prefix=/usr \
        --with-gd \
        --with-pgsql=/usr \
        --with-mysql \
        --with-imap=/usr \
        --with-zlib \
        --with-dbase \
        --with-filepro \
        --with-config-file-path=/etc/httpd/conf \
        --with-fdftk=no \
        --enable-debug=no \
        --enable-magic-quotes \
        --enable-debugger \
        --enable-bcmath \
        --enable-track-vars \
        --enable-safe-mode \
        --with-exec-dir=/usr/bin \
        --with-system-regex

make
make -C convertor

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/lib/apache
mkdir -p $RPM_BUILD_ROOT/etc/httpd/conf

install -m 755 libphp3.so $RPM_BUILD_ROOT/usr/lib/apache
install -m 755 convertor/convertor $RPM_BUILD_ROOT/usr/bin
install -m 644 php3.ini-dist $RPM_BUILD_ROOT/etc/httpd/conf/php3.ini
install -m 644 $RPM_SOURCE_DIR/php3.conf $RPM_BUILD_ROOT/etc/httpd/conf/php3.conf

mv -f convertor/README convertor/README.convertor

mkdir -p $RPM_BUILD_ROOT/home/httpd/html/php3-doc

cd $RPM_BUILD_ROOT/home/httpd/html/php3-doc && bzip2 -dc 
$RPM_SOURCE_DIR/manual.tar.bz2 | tar xvf - && ln -s manual.html index.html


find $RPM_BUILD_ROOT/ -type 'f'|grep -E '.*[0-9]'|xargs file|grep troff\
|cut -d: -f1|xargs bzip2 -9
for i in $(find $RPM_BUILD_ROOT/usr/man/ -type 'l');do
        TO=$(/bin/ls -l $i|awk '{print $NF}')
        ln -sf $TO.bz2 $i && mv $i $.bz2
done
for i in `find $RPM_BUILD_ROOT/ -type 'f' -perm '+a=x' ! -name 'lib*so*'`;do
    file $i|grep -q "not stripped" && strip $i
done

%clean
rm -rf $RPM_BUILD_ROOT

%post
if [ -f /etc/httpd/conf/httpd.conf ] && ! grep -q "^Include.*php3.conf" 
/etc/httpd/conf/httpd.conf; then
    echo "Include conf/php3.conf" >> /etc/httpd/conf/httpd.conf
fi    

if [ -f /var/run/httpd.pid ]; then 
   /etc/rc.d/init.d/httpd restart
fi

%postun
touch /etc/httpd/conf/php3.conf
/etc/rc.d/init.d/httpd restart


%files
%dir /home/httpd
%dir /home/httpd/html
/home/httpd/html/php3-doc
%config /etc/httpd/conf/php3.ini
%config /etc/httpd/conf/php3.conf
/usr/lib/apache/
%doc TODO CODING_STANDARDS CREDITS ChangeLog LICENSE BUGS examples

%changelog

* Mon Jun 07 1999 Jean-Michel Dault <[EMAIL PROTECTED]>
- Re-separated PHP3 from the Mandrake apache package
- Upgraded to version 3.0.9
- added RPM_OPT_FLAGS
- added fr locale

* Fri Apr 16 1999 Preston Brown <[EMAIL PROTECTED]>
- pick up php3.ini

* Wed Mar 24 1999 Preston Brown <[EMAIL PROTECTED]>
- build against apache 1.3.6

* Sun Mar 21 1999 Cristian Gafton <[EMAIL PROTECTED]> 
- auto rebuild in the new build environment (release 2)

* Mon Mar 08 1999 Preston Brown <[EMAIL PROTECTED]>
- upgraded to 3.0.7.

* Wed Feb 24 1999 Preston Brown <[EMAIL PROTECTED]>
- Injected new description and group.

* Sun Feb 07 1999 Preston Brown <[EMAIL PROTECTED]>
- upgrade to php 3.0.6, built against apache 1.3.4

* Mon Oct 12 1998 Cristian Gafton <[EMAIL PROTECTED]>
- rebuild for apache 1.3.3

* Thu Oct 08 1998 Preston Brown <[EMAIL PROTECTED]>
- updated to 3.0.5, fixes nasty bugs in 3.0.4.

* Sun Sep 27 1998 Cristian Gafton <[EMAIL PROTECTED]>
- updated to 3.0.4 and recompiled for apache 1.3.2

* Thu Sep 03 1998 Preston Brown <[EMAIL PROTECTED]>
- improvements; builds with apache-devel package installed.

* Tue Sep 01 1998 Preston Brown <[EMAIL PROTECTED]>
- Made initial cut for PHP3.

Reply via email to