%define name tradeclient %define version 0.9.0 %define release 1mdk %define summary Email Client with PIM features for X %define group Networking/Mail %define iconname %{name}.png Summary: %{summary} Name: %{name} URL: http://%{name}.sf.net Version: %{version} Release: %{release} Source: http://prdownloads.sf.net/%{name}/%{name}-%{version}.tar.bz2 Source1: %{name}-imap-2000-glibc-2.2.2.patch.bz2 Source2: %{name}-imap-2000-glibc-2.2.2-env_unix.patch.bz2 Patch: %{name}-Makefile.diff.bz2 Patch1: %{name}-0.9.0-openldap2.patch.bz2 License: GPL Group: %{group} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: libldap2-devel >= 1.2, libopenssl0-devel >= 0.9, libgtk+1.2-devel >= 1.2.8 Requires: libldap2 >= 1.2, libopenssl0 >= 0.9, libgtk+1.2 >= 1.2.8 Requires: libsasl7 BuildRequires: perl, ImageMagick Prefix: %{_prefix} %description TradeClient is a UNIX mail client and personal information manager for X. It uses GTK+ and includes support for multiple accounts, both POP3 and IMAP, SMTP, and LDAP. It includes an address book that can interact fully with an LDAP server, and a personal calendaring system. LDAP support is currently not compiled in, however. %prep %setup -q # Apply patch to allow building with OpenLDAP 2 %patch1 -p0 -b .openldap2 # Patch the Makefile, so that it compiles with SSL and LDAP # and so that the automatically applied patch to the inner # IMAP source is correctly applied %patch -p0 -b .settings # Set the "right" optflags perl -pi -e 's|^(\s*CFLAGS\+=)-m486|$1%{optflags}|' Makefile # If IMAP source isn't present, make gives an error # So unpack the stuff manually :( tar xzf imap-4.7c.tar.Z # The Makefile applies the patch wrong; do it manually here cd imap-4.7c/src/c-client patch -p1 < ../../../patches/c-client-4.7.patch date > ../../../patches/c-client-4.7.patch.patched # Apply patch from the main/real imap package by Mandrake cd ../osdep/unix bzip2 -cd %{SOURCE1} | patch -p4 -B .mandrake-glibc2.2.2 bzip2 -cd %{SOURCE2} | patch -p0 -B .mandrake-glibc2.2.2-env_unix %build perl -pi -e 's|^WANTLDAP=.*|WANTLDAP=1|;s|^WANTSSL=.*|WANTSSL=1|' Makefile %make %install rm -rf $RPM_BUILD_ROOT mkdir -p %{buildroot}%{_bindir} cp tradeclient %{buildroot}%{_bindir} # Menustuff mkdir -p %{buildroot}{%{_menudir},%{_liconsdir},%{_iconsdir},%{_miconsdir}} cat > %{buildroot}%{_menudir}/%{name} <<EOF ?package(%{name}):\ command="%{_bindir}/%{name}" \ icon="%{iconname}" \ title="TradeClient" \ longtitle="%{summary}" \ needs="x11" \ section="%{group}" EOF convert pics/bynari-logo.xpm -geometry 16x16 %{buildroot}%{_miconsdir}/%{iconname} convert pics/bynari-logo.xpm -geometry 32x32 %{buildroot}%{_iconsdir}/%{iconname} convert pics/bynari-logo.xpm -geometry 48x48 %{buildroot}%{_liconsdir}/%{iconname} %clean rm -rf $RPM_BUILD_ROOT %post %{update_menus} %postun %{clean_menus} %files %defattr(-,root,root) %doc README %{_bindir}/tradeclient %{_menudir}/%{name} %{_miconsdir}/%{iconname} %{_iconsdir}/%{iconname} %{_liconsdir}/%{iconname} %changelog * Fri Dec 14 2001 Alexander Skwar <ASkwar@Linux-Mandrake.com> 0.9.0-1mdk - First release for Mandrake Contribs - Also include some patches from the (real) imap Mandrake package