File cyrus-sasl.spec of Package cyrus-sasl

#
# spec file for package cyrus-sasl (Version 2.1.22)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           cyrus-sasl
Version:        2.1.22
Release:        173
BuildRequires:  db-devel krb5-devel openssl-devel opie pam-devel
Obsoletes:      cyrus-sasl2 <= %{version}
Provides:       cyrus-sasl2 = %{version}
License:        BSD 4-Clause
Group:          Productivity/Networking/Other
Url:            http://asg.web.cmu.edu/sasl/
AutoReqProv:    on
# bug437293
%ifarch ppc64
Obsoletes:      cyrus-sasl-64bit
%endif
%ifarch  ppc
Obsoletes:      cyrus-sasl-32bit
%endif
#
Summary:        Implementation of Cyrus SASL API
Source:         cyrus-sasl-%{version}.tar.bz2
Source1:        cyrus-sasl-rc.tar.bz2
Source2:        README.Source
Patch:          cyrus-sasl-%{version}.dif
Patch1:         shared_link_on_ppc.patch
Patch2:         cyrus-sasl-gcc4.patch
Patch3:         cyrus-sasl-implicitfunc.dif
PreReq:         %insserv_prereq %fillup_prereq
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#

%package      gssapi
License:        BSD 4-Clause
Obsoletes:      cyrus-sasl2-gssapi <= %{version}
Provides:       cyrus-sasl2-gssapi = %{version}
Summary:        cyrus-sasl plugin for the GSSAPI mechanism
AutoReqProv:    on
Group:          Development/Libraries/C and C++
Requires:       cyrus-sasl
#

%package      crammd5
License:        BSD 4-Clause
Summary:        cyrus-sasl plugin for the CRAMMD5 mechanism
AutoReqProv:    on
Group:          Development/Libraries/C and C++
Requires:       cyrus-sasl
# cyrus-sasl2 was split in to several subpackages 
# after SLES8, this "Provides" should be removed after 
# EndOfLife of SLES8
Provides:       cyrus-sasl2:%{_libdir}/sasl2/libcrammd5.so
#

%package      digestmd5
License:        BSD 4-Clause
Summary:        cyrus-sasl plugin for the DIGESTMD5 mechanism
AutoReqProv:    on
Group:          Development/Libraries/C and C++
Requires:       cyrus-sasl
# cyrus-sasl2 was split in to several subpackages 
# after SLES8, this "Provides" should be removed after 
# EndOfLife of SLES8
Provides:       cyrus-sasl2:%{_libdir}/sasl2/libdigestmd5.so
#

%package      otp
License:        BSD 4-Clause
Summary:        cyrus-sasl plugin for the OTP mechanism
AutoReqProv:    on
Group:          Development/Libraries/C and C++
Requires:       cyrus-sasl
# cyrus-sasl2 was split in to several subpackages 
# after SLES8, this "Provides" should be removed after 
# EndOfLife of SLES8
Provides:       cyrus-sasl2:%{_libdir}/sasl2/libotp.so
#

%package      plain
License:        BSD 4-Clause
Summary:        cyrus-sasl plugin for the PLAIN mechanism
AutoReqProv:    on
Group:          Development/Libraries/C and C++
Requires:       cyrus-sasl
# cyrus-sasl2 was split in to several subpackages 
# after SLES8, this "Provides" should be removed after 
# EndOfLife of SLES8
Provides:       cyrus-sasl2:%{_libdir}/sasl2/libplain.so
#

%package      ntlm
License:        BSD 4-Clause
Summary:        Implementation of Cyrus SASL API
AutoReqProv:    on
Group:          Productivity/Networking/Other
Requires:       cyrus-sasl
#

%package      devel
License:        BSD 4-Clause
Obsoletes:      cyrus-sasl2-devel <= %{version}
Provides:       cyrus-sasl2-devel = %{version}
# bug437293
%ifarch ppc64
Obsoletes:      cyrus-sasl-devel-64bit
%endif
%ifarch  ppc
Obsoletes:      cyrus-sasl-devel-32bit
%endif
#
Summary:        Cyrus SASL API Implementation, Libraries and Header Files
AutoReqProv:    on
Group:          Development/Libraries/C and C++
Requires:       cyrus-sasl = %{version}, glibc-devel

%description
This is the Cyrus SASL API. It can be used on the client or server side
to provide authentication. See RFC 2222 for more information.



Authors:
--------
    <tech-transfer> tech-transfer@andrew.cmu.edu

%description gssapi
This is the Cyrus SASL API implementation. It can be used on the client
or server side to provide authentication. See RFC 2222 for more
information.



Authors:
--------
    <tech-transfer> tech-transfer@andrew.cmu.edu

%description devel
This is the Cyrus SASL API. It can be used on the client or server side
to provide authentication. See RFC 2222 for more information.



Authors:
--------
    <tech-transfer> tech-transfer@andrew.cmu.edu

%description digestmd5
This is the Cyrus SASL API implementation. It can be used on the client
or server side to provide authentication. See RFC 2222 for more
information.



Authors:
--------
    <tech-transfer> tech-transfer@andrew.cmu.edu

%description crammd5
This is the Cyrus SASL API implementation. It can be used on the client
or server side to provide authentication. See RFC 2222 for more
information.



Authors:
--------
    <tech-transfer> tech-transfer@andrew.cmu.edu

%description otp
This is the Cyrus SASL API implementation. It can be used on the client
or server side to provide authentication. See RFC 2222 for more
information.



Authors:
--------
    <tech-transfer> tech-transfer@andrew.cmu.edu

%description plain
This is the Cyrus SASL API implementation. It can be used on the client
or server side to provide authentication. See RFC 2222 for more
information.



Authors:
--------
    <tech-transfer> tech-transfer@andrew.cmu.edu

%description ntlm
This is the Cyrus SASL API. It can be used on the client or server side
to provide authentication. See RFC 2222 for more information.



Authors:
--------
    <tech-transfer> tech-transfer@andrew.cmu.edu

%prep
%setup -n cyrus-sasl-%{version} -a 1
if [ -e %{_builddir}/%{name}-%{version}/dlcompat-*/ ]
then
    echo "dlcompat contains potential legal risks."
    exit 1;
fi
%patch
%patch1
%patch2
%patch3 -p1

%build
find . -name \*.cvsignore -print0 | xargs -0 rm -fv
%{suse_update_config -f config}
%{suse_update_config -f saslauthd/config}
# has old libtool macros (and nothing else)
rm -f acinclude.m4
rm -f saslauthd/acinclude.m4
rm -rf autom4te.cache
rm -rf saslauthd/autom4te.cache
# libtoolize --force
# cyrus-sasl2 does not work, when using newer libtool
aclocal -I cmulocal -I config
autoconf
cd saslauthd
autoconf
cd -
export CFLAGS="-fno-strict-aliasing $RPM_OPT_FLAGS"
export CPPFLAGS=-I/usr/include/heimdal
./configure 	--libdir=%{_libdir} \
		--with-plugindir=%{_libdir}/sasl2 \
                --with-configdir=/etc/sasl2/:%{_libdir}/sasl2 \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=%{_mandir} \
		--with-saslauthd=/var/run/sasl2/ \
		--enable-pam \
		--enable-sample \
		--enable-login \
		--enable-gssapi \
		--enable-ntlm \
		--enable-krb4=no \
                --enable-sql=no \
		--with-devrandom=/dev/urandom
make sasldir=%{_libdir}/sasl2

%install
make DESTDIR=$RPM_BUILD_ROOT sasldir=%{_libdir}/sasl2 install
install -m 755 -d $RPM_BUILD_ROOT/var/run/sasl2
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/etc/sasl2
install -m 755 sample/.libs/client $RPM_BUILD_ROOT/usr/bin/cyrus_sasl_sample_client
install -m 755 sample/.libs/server $RPM_BUILD_ROOT/usr/bin/cyrus_sasl_sample_server
chmod 0644 doc/*
rm -f doc/Makefile*
cd utils
gcc -Wall -W -O2 -fmessage-length=0 -o dbconverter dbconverter-2.o ../sasldb/.libs/libsasldb.al -lresolv ../lib/.libs/libsasl2.so -ldl -ldb
#gcc -Wall -W -O2 -fmessage-length=0 -o dbconverter dbconverter-2.o ../sasldb/.libs/libsasldb.al -lresolv ../lib/.libs/libsasl2.so -ldl -ldb -Wl,--rpath -Wl,/usr/src/packages/BUILD/cyrus-sasl-2.1.12/lib/.libs
install -m 755 dbconverter $RPM_BUILD_ROOT/usr/sbin/dbconverter
rm -f $RPM_BUILD_ROOT/%{_mandir}/cat?/*
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/saslauthd*
rm -f $RPM_BUILD_ROOT/usr/sbin/saslauthd
rm -f $RPM_BUILD_ROOT/usr/sbin/testsaslauthd
find $RPM_BUILD_ROOT/%{_libdir}/sasl2 -name "*.la" | xargs rm -f

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%dir %{_libdir}/sasl2
%dir /etc/sasl2/
%{_libdir}/sasl2/libanonymous.so*
%{_libdir}/sasl2/liblogin.so*
%{_libdir}/sasl2/libsasldb.so*
%{_libdir}/libsasl2.so.*
/usr/sbin/*
/usr/bin/*
%dir %attr(0755,root,root) /var/run/sasl2
#%doc %{_mandir}/cat8
%doc %{_mandir}/man3/sasl.*.gz
%doc %{_mandir}/man8/*.gz
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README doc
%doc saslauthd/AUTHORS saslauthd/COPYING saslauthd/ChangeLog saslauthd/INSTALL saslauthd/LDAP_SASLAUTHD saslauthd/NEWS saslauthd/README 

%files gssapi
%defattr(-,root,root)
%{_libdir}/sasl2/libgssapiv2.so*

%files crammd5
%defattr(-,root,root)
%{_libdir}/sasl2/libcrammd5.so*

%files digestmd5
%defattr(-,root,root)
%{_libdir}/sasl2/libdigestmd5.so*

%files otp
%defattr(-,root,root)
%{_libdir}/sasl2/libotp.so*

%files plain
%defattr(-,root,root)
%{_libdir}/sasl2/libplain.so*

%files ntlm
%defattr(-,root,root)
%{_libdir}/sasl2/libntlm.so*

%files devel
%defattr(-,root,root)
/usr/include/sasl
%doc %{_mandir}/man3/sasl_*.gz
%{_libdir}/libsasl2.so
%{_libdir}/libsasl2.la

%changelog
* Tue Dec 09 2008 ro@suse.de
- remove ix86 from ifarch statement obsoleting 32bit package
* Thu Oct 30 2008 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Mon Aug 18 2008 rhafer@suse.de
- Fixed init-scripts Required-Stop Tags
* Tue Jul 29 2008 rhafer@suse.de
- Enhance sysconfig file and init script to allow to pass arbitrary
  parameters to saslauthd (bnc#397808)
- Fixed description of the SASLAUTHD_THREADS sysconfig option.
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Fri Mar 28 2008 rhafer@suse.de
- Moved "Version:" up to the top to make versioned
  Obsoletes/Requires work correctly.
* Wed Mar 26 2008 rhafer@suse.de
- Enabled NTLM authentication plugin (bnc#343665), created new
  subpackage cyrus-sasl-ntlm
- Replaced %%run_ldconfig macro as suggested by rpmlint
- Replaced unversioned Obsoltes/Provides with versioned ones
- Removed unneeded Split-Provides
* Fri Oct 26 2007 rhafer@suse.de
- Fixed some RPMLINT complaints
- re-enabled accidently disabled "kerberos5" authmech for saslauthd
  (Bug #335754)
* Tue Mar 20 2007 rhafer@suse.de
- Add SASLAUTHD_THREADS to /etc/sysconfig/saslauthd to be able to
  set the number of threads that saslauthd should spawn
  (Bug #199114)
* Fri Oct 27 2006 rhafer@suse.de
- Use /etc/sasl2/ as directory for config files of services
  %%{_libdir} can still be used for backwards compatibilty
  (Bug #206414)
* Mon Sep 25 2006 rhafer@suse.de
- Remove unneeded automake/autoheader calls
* Mon Sep 11 2006 rhafer@suse.de
- Build -sqlauxprop from cyrus-sasl-saslauthd.spec to reduce
  BuildRequires of cyrus-sasl.spec
- Removed unneeded openldap2 from BuildRequires of
  cyrus-sasl-saslauthd
* Tue Aug 29 2006 rhafer@suse.de
- Enabled the ldapdb auxprop plugin and created new subpackage
  cyrus-sasl-ldap-auxprop for it (Bug #201478)
* Fri Aug 25 2006 rhafer@suse.de
- remove saslauthd man-page from cyrus-sasl package to solve
  confict with -saslauthd subpackage (Bug #200490)
* Fri Jun 02 2006 rhafer@suse.de
- updated to 2.1.22
  * new pluginviewer utility for reporting information about client
  and server side authentication plugins and auxprop plugins
  (e.g.  supported features, methods, etc.).
  * Added support for HTTP POST password validation in saslauthd
- rename SuSE.tar.gz to cyrus-sasl-rc.tar.gz to avoid name
  collision with other packages in src.rpm (Bug #98188)
- include "crypt.h" in auth_shadow.c to avoid possible crash in
  saslauthd (Bug #179621)
* Mon Apr 03 2006 rhafer@suse.de
- remove dlcompat-20010505 from tarball because of legal risk and
  documented this in README.Source (Bug: #161390)
- added check for dlcompat-20010505 to the spec file
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Nov 23 2005 choeger@suse.de
- Bugfix ID#134491, cyrus-sasl-sqlauxprop is not linked against any database
* Mon Sep 26 2005 ro@suse.de
- added LDAP_DEPRECATED to CFLAGS
* Wed Jul 13 2005 choeger@suse.de
- use /dev/urandom instead of /dev/random, see
  http://acs-wiki.andrew.cmu.edu/twiki/bin/view/Cyrus/POP3DevRandomIssue
  for an explanation
- removed the useless .la files from rpm
* Tue May 17 2005 choeger@suse.de
- update to version 2.1.21
* Mon Mar 14 2005 choeger@suse.de
- now also build the sql auxprop plugin; created new subpackage
  cyrus-sasl-sqlauxprop
* Fri Feb 25 2005 uli@suse.de
- better GCC4 fix
* Fri Feb 25 2005 uli@suse.de
- fixed to build with GCC4
* Tue Nov 02 2004 mmj@suse.de
- Get rid of .cvsignore files
- Don't remove buildroot before install
* Mon Oct 25 2004 choeger@suse.de
- update to version 2.1.20
* Wed Oct 06 2004 choeger@suse.de
- Bugfix ID#46847 - VUL-0: SASL environment variable local root
* Mon Sep 20 2004 choeger@suse.de
- package binaries of sample-client and -server instead of
  shell wrappers (which do not work)
* Fri Sep 17 2004 choeger@suse.de
- removed saslauthd from cyrus-sasl requires, as it is only
  needed on a "server" side and also not in every case (buildin
  mechanisms as CRAM- or DIGEST-MD5 do not need it)
- added split-provides for saslauthd
* Mon Sep 06 2004 choeger@suse.de
- added testsaslauthd to filelist
- removed saslauthd and insserv makros from cyrus-sasl.spec
* Fri Sep 03 2004 choeger@suse.de
- splitted up cyrus-sasl-saslauthd.spec, to resolve the cyclic
  dependency openldap2 <-> cyrus-sasl with saslauthd having
  LDAP support
* Tue Aug 31 2004 choeger@suse.de
- removed update messages and implemented "split-provides"
  instead
* Tue Aug 31 2004 choeger@suse.de
- added LDAP support for saslauthd, Bugzilla ID#44051
* Mon Aug 30 2004 choeger@suse.de
- Bugfix Bugzilla ID#44346 - still using /var/adm/notify
  now using new update messages mechanism
- added sample/client sample/server to file list
* Thu Jul 15 2004 choeger@suse.de
- update to version 2.1.19
* Tue Jun 15 2004 choeger@suse.de
- bugfix id#39245 - cyrus-sasl includes straycat man page
* Fri Mar 12 2004 choeger@suse.de
- update to version 2.1.18 (Bugfix Release)
* Tue Jan 27 2004 choeger@suse.de
- Bugfix ID#34159 - cyrus-sasl: world-writeable rpath
* Thu Jan 22 2004 choeger@suse.de
- Bugfix Bugzilla ID#34019, notice users about the fact, that
  cyrus-sasl has been splitted into subpackages
* Fri Jan 16 2004 kukuk@suse.de
- Add pam-devel to neededforbuild
* Tue Dec 02 2003 choeger@suse.de
- update to version 2.1.17
* Fri Oct 31 2003 choeger@suse.de
- Don't build as root
* Fri Oct 17 2003 kukuk@suse.de
- Remove unused des from neededforbuild
* Tue Sep 16 2003 kukuk@suse.de
- Add missing Provides [Bug #31005]
* Mon Sep 01 2003 choeger@suse.de
- removed "-u root" from startproc as it always failes
- removed link to doc/components.html from doc/index.html as
  components.html does not exist (Bugzilla ID#29253)
* Thu Aug 14 2003 choeger@suse.de
- Bugfix Bugzilla ID#28932:
  missing activation metadata in sysconfig template
* Wed Jul 30 2003 choeger@suse.de
- new macros for stop/restart of services on rpm update/removal
* Tue Jul 15 2003 choeger@suse.de
- update to version 2.1.15
* Mon Jun 30 2003 choeger@suse.de
- update to version 2.1.14
* Wed Jun 18 2003 ro@suse.de
- use kerberos-devel-packages in neededforbuild
* Fri Jun 13 2003 kukuk@suse.de
- Add missing directory to filelist
* Fri May 09 2003 choeger@suse.de
- use -ldb instead of -ldb-x.y to manually link the
  dbconverter
* Tue May 06 2003 choeger@suse.de
- update to version 2.1.13
* Tue Apr 15 2003 ro@suse.de
- added krb4-lib,krb4-devel to neededforbuild
* Mon Apr 07 2003 choeger@suse.de
- renamed to cyrus-sasl
- splitted libraries for the following auth methods into seperate
  packages:
   - crammd5
   - digestmd5
   - otp
   - plain
  this is to prevent from annoying warnings about missing proper
  setup of mechanisms we don't use
* Thu Mar 06 2003 choeger@suse.de
- ever used dbconverter-2? Well it is just a shell script
  which uses the damn compiled source tree... :-(
  manually building dbconverter to let users convert their
  /etc/sasldb from v1 to v2 using /usr/sbin/dbconverter
* Thu Mar 06 2003 choeger@suse.de
- as cyrus-sasl is dropped now:
  provide cyrus-sasl-*, obsolete cyrus-sasl-*
  (Bugzilla ID# 24762)
* Tue Feb 04 2003 choeger@suse.de
- update to cyrus-sasl-2.1.12, bug-fix release.
  This release addresses a few minor build and distribution
  related issues
* Mon Feb 03 2003 choeger@suse.de
- update to cyrus-sasl-2.1.11, bug-fix release.
  It addresses a number of issues in the build system, a
  memory leak in the doors IPC method for saslauthd, and fixes the NTLM
  server side support to only require one of the LM or NT methods.
* Thu Jan 23 2003 choeger@suse.de
- don't use new libtool macros as cyrus-sasl2 seems to not
  work when using them.
- added patch to compile shared libraries on ppc
* Wed Jan 15 2003 kukuk@suse.de
- Remove openldap2 from needed for build
* Tue Jan 14 2003 choeger@suse.de
- do not build the static library anymore
* Wed Dec 11 2002 choeger@suse.de
- added sysconfig metadata to sysconfig templates
* Tue Dec 10 2002 choeger@suse.de
- update to version 2.1.10
  This version corrects a number of DIGEST-MD5
  interoperability issues, as well as corrects some potential buffer
  overflows.
* Thu Oct 31 2002 ro@suse.de
- make it build again
* Tue Oct 29 2002 ro@suse.de
- remove own libtool macros
* Thu Oct 24 2002 choeger@suse.de
- update to latest version 2.1.9
* Thu Sep 12 2002 choeger@suse.de
- Bugfix Bugzilla ID#19383: cyrus-sasl-devel should conflict
  with cyrus-sasl2-devel, because they contain files with the
  same name
* Mon Aug 19 2002 rhafer@suse.de
- enabled building of the static libsasl.a. It is needed for
  cyrus-imap to be usable with nss_ldap (which is linked against
  cyrus-sasl1)
* Mon Aug 12 2002 choeger@suse.de
- update to version 2.1.7
* Thu Aug 08 2002 choeger@suse.de
- added .la files to the sasl2 plugin directory
  ([lt_]dlopen seems to need that)
* Mon Aug 05 2002 choeger@suse.de
- added Prereq
* Sat Jul 27 2002 adrian@suse.de
- add %%run_ldconfig
* Wed Jul 17 2002 choeger@suse.de
- update to version 2.1.6
* Wed Jun 19 2002 choeger@suse.de
- also install dbconverter-2 to be able to migrate from
  cyrus-sasl(1)
* Tue Jun 18 2002 choeger@suse.de
- /var/run/sasl2 must be 755 to let non root daemons
  connect to unix socket
* Tue Jun 18 2002 choeger@suse.de
- added initscript and sysconfig file for saslauthd
- added docs
* Tue Jun 18 2002 rhafer@suse.de
- added opie to needforbuild
- should build on ppc64 and s390x now
* Mon Jun 17 2002 rhafer@suse.de
- additional autoconf related patches, that were missing at first
  check in
* Mon Jun 17 2002 rhafer@suse.de
- Initial checkin of cyrus-sasl-2.1.5
openSUSE Build Service is sponsored by