The little fix to the imap spec will make it possible to compile php
with imap support, so please either make a separate devel rpm or add
this to the standard rpm.

If you want to compile php with imap support joust add --with-imap=/usr
\ to the CFlags in the spec file.

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]) Start ## 
mkdir -p $RPM_BUILD_ROOT/usr/lib
install -m 755 ./c-client/c-client.a $RPM_BUILD_ROOT/usr/lib
## needed by php4b2
(
 cd $RPM_BUILD_ROOT/usr/lib
 ln c-client.a libc-client.a
)


##
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
##

## Added by Troels Liebe Bentsen([EMAIL PROTECTED]) End ## 

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*
## Added by Troels Liebe Bentsen([EMAIL PROTECTED]) Start ## 
/usr/lib/c-client.a
## Needed by PHP4b2
/usr/lib/libc-client.a
##
/usr/include/rfc822.h
/usr/include/mail.h
/usr/include/linkage.h

## Added by Troels Liebe Bentsen([EMAIL PROTECTED]) End ## 

%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().

Reply via email to