]> git.pld-linux.org Git - packages/cyrus-sasl.git/blobdiff - cyrus-sasl.spec
- orphaned, outdated
[packages/cyrus-sasl.git] / cyrus-sasl.spec
index eb3d0a4444f0b8e7959096683a7129e5e6ee3102..6ac6b7ddb7354321d1a8946beb7e3c3648b0eb43 100644 (file)
@@ -8,51 +8,64 @@
 %bcond_without mysql   # don't build MySQL pluggin
 %bcond_without pgsql   # do not build PostgreSQL pluggin
 %bcond_without sqlite  # do not enable sqlite plugin
+%bcond_with    authlib # enable courier-authlib (i wasn't able to test it)
+%bcond_with    cryptedpw # if you keep crypted passwords in your *sql
 %bcond_with    opie    # enable opie plugin
 %bcond_with    srp     # build srp pluggin
 %bcond_with    pwcheck # build pwcheck helper (deprecated)
 %bcond_with    x509    # build x509 plugin (no sources in package???)
 #
+%if %{without mysql} && %{without pgsql}
+%undefine with_cryptedpw
+%endif
+
 Summary:       The SASL library API for the Cyrus mail system
 Summary(pl):   Biblioteka Cyrus SASL
 Summary(pt_BR):        Implementação da API SASL
 Summary(ru):   âÉÂÌÉÏÔÅËÁ Cyrus SASL
 Summary(uk):   â¦Â̦ÏÔÅËÁ Cyrus SASL
 Name:          cyrus-sasl
-Version:       2.1.20
-Release:       2.1
+Version:       2.1.21
+Release:       8
 License:       distributable
 Group:         Libraries
 Source0:       ftp://ftp.andrew.cmu.edu/pub/cyrus/%{name}-%{version}.tar.gz
-# Source0-md5: 268ead27f4ac39bcfe17d9e38e0f2977
+# Source0-md5: dde02db234dea892bee298390890502e
 Source1:       saslauthd.init
 Source2:       saslauthd.sysconfig
 Source3:       %{name}.pam
 Patch0:                %{name}-configdir.patch
 Patch1:                %{name}-nolibs.patch
 Patch2:                %{name}-lt.patch
-Patch3:                %{name}-db.patch
-Patch4:                %{name}-split-sql.patch
-Patch5:                %{name}-opie.patch
+Patch3:                %{name}-split-sql.patch
+Patch4:                %{name}-opie.patch
+Patch5:                %{name}-gcc4.patch
+# Adapted from http://frost.ath.cx/software/cyrus-sasl-patches/dist/2.1.19/cyrus-sasl-2.1.19-checkpw.c+sql.c.patch
+Patch6:                %{name}-cryptedpw.patch
+Patch7:                %{name}-md5sum-passwords.patch
 URL:           http://asg.web.cmu.edu/sasl/
 BuildRequires: autoconf >= 2.54
 BuildRequires: automake
+%{?with_authlib:BuildRequires: courier-authlib-devel}
 BuildRequires: db-devel
 BuildRequires: ed
 BuildRequires: groff
-%{?with_gssapi:BuildRequires:  heimdal-devel}
-BuildRequires: libtool >= 1.4
+%{?with_gssapi:BuildRequires:  heimdal-devel >= 0.7}
+BuildRequires: libtool >= 1.4
 %{?with_mysql:BuildRequires:   mysql-devel}
-%{?with_pgsql:BuildRequires:   postgresql-devel}
-%{?with_ldap:BuildRequires:    openldap-devel}
-%{?with_sqlite:BuildRequires:  sqlite-devel}
-%{?with_opie:BuildRequires:    opie-devel}
+%{?with_ldap:BuildRequires:    openldap-devel >= 2.3.0}
 BuildRequires: openssl-devel >= 0.9.7d
+%{?with_opie:BuildRequires:    opie-devel}
 BuildRequires: pam-devel
+%{?with_pgsql:BuildRequires:   postgresql-devel}
+%{?with_sqlite:BuildRequires:  sqlite-devel}
+Requires:      pam >= 0.79.0
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/sasl
 
+%define                specflags       -fno-strict-aliasing
+
 %description
 This is an implementation of the SASL API, useful for adding
 authentication, authorization, and security to network protocols. The
@@ -92,8 +105,8 @@ Authentication and Security Layer, 
 Summary:       Header files and documentation for cyrus-sasl
 Summary(pl):   Pliki nag³ówkowe i dokumentacja dla cyrus-sasl
 Summary(pt_BR):        Exemplos e arquivos para desenvolvimento com SASL
-Summary(ru):   æÁÊÌÙ ÄÌÑ ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ Ó ÂÉÂÌÉÏÔÅËÏÊ Cyrus SASL
 Summary(ru):   æÁÊÌÉ ÄÌÑ ÐÒÏÇÒÁÍÕ×ÁÎÎѠڠ¦Â̦ÏÔÅËÏÀ Cyrus SASL
+Summary(ru):   æÁÊÌÙ ÄÌÑ ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ Ó ÂÉÂÌÉÏÔÅËÏÊ Cyrus SASL
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
@@ -307,11 +320,11 @@ Wtyczka dodaj
 SASL.
 
 %package opie
-Summary:        OPIE Cyrus SASL plugin
-Summary(pl):    Wtyczka OPIE do Cyrus SASL
-Summary(pt_BR): Mecanismo SASL OPIE
-Group:          Libraries
-Requires:       %{name} = %{version}-%{release}
+Summary:       OPIE Cyrus SASL plugin
+Summary(pl):   Wtyczka OPIE do Cyrus SASL
+Summary(pt_BR):        Mecanismo SASL OPIE
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
 
 %description opie
 This plugin implements the SASL OPIE (One Time Password) mechanism.
@@ -336,8 +349,9 @@ Wtyczka x509 do Cyrus SASL.
 Summary:       Cyrus SASL authd
 Summary(pl):   Demon authd do Cyrus SASL
 Group:         Daemons
-Requires(post,postun): /sbin/chkconfig
+Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name} = %{version}-%{release}
+Requires:      rc-scripts
 
 %description saslauthd
 Cyrus SASL authd.
@@ -394,10 +408,10 @@ Cyrus SASL PostgreSQL plugin.
 Wtyczka PostgreSQL do Cyrus SASL.
 
 %package sqlite
-Summary:        Cyrus SQLite PostgreSQL plugin
-Summary(pl):    Wtyczka SQLite do Cyrus SASL
-Group:          Libraries
-Requires:       %{name} = %{version}-%{release}
+Summary:       Cyrus SQLite PostgreSQL plugin
+Summary(pl):   Wtyczka SQLite do Cyrus SASL
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
 
 %description sqlite
 Cyrus SASL SQLite plugin.
@@ -413,6 +427,10 @@ Wtyczka SQLite do Cyrus SASL.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%if %{with cryptedpw}
+%patch6 -p1
+%patch7 -p1
+%endif
 
 cd doc
 echo "cyrus-sasl complies with the following RFCs:" > rfc-compliance
@@ -440,6 +458,7 @@ cd saslauthd
 cd ..
 
 %configure \
+       %{?with_cryptedpw: LDFLAGS=-lcrypt} \
        --disable-krb4 \
        %{!?with_gssapi: --disable-gssapi} \
        %{?with_gssapi: --enable-gssapi --with-gss_impl=heimdal} \
@@ -451,6 +470,7 @@ cd ..
        --with-configdir=%{_sysconfdir} \
        --with-dblib=berkeley \
        --with-dbpath=/var/lib/sasl2/sasl.db \
+       %{?with_authlib:--with-authdaemond=/var/spool/authdaemon/socket} \
        %{?with_ldap: --with-ldap=%{_prefix}} \
        %{?with_mysql: --with-mysql=%{_prefix}} \
        %{?with_pgsql: --with-pgsql=%{_prefix}} \
@@ -473,7 +493,7 @@ done
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/var/lib/sasl2,%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
+install -d $RPM_BUILD_ROOT{%{_bindir},/var/lib/sasl2,%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
                $RPM_BUILD_ROOT%{_mandir}/man8
 
 %{__make} install \
@@ -490,12 +510,18 @@ ln -sf libsasl2.so $RPM_BUILD_ROOT%{_libdir}/libsasl.so
 
 touch $RPM_BUILD_ROOT/var/lib/sasl2/sasl.db
 
+# create empty config
+touch $RPM_BUILD_ROOT%{_sysconfdir}/saslauthd.conf
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/saslauthd
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/saslauthd
 install %{SOURCE3} ./cyrus.pam
 
 install saslauthd/{testsaslauthd,saslcache} $RPM_BUILD_ROOT%{_sbindir}
 
+# sample programs for testing sasl
+libtool --mode=install cp sample/client $RPM_BUILD_ROOT%{_bindir}/sasl-sample-client
+libtool --mode=install cp sample/server $RPM_BUILD_ROOT%{_bindir}/sasl-sample-server
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -526,10 +552,13 @@ fi
 %dir %{_libdir}/sasl2
 %dir /var/lib/sasl2
 %attr(755,root,root) %{_libdir}/lib*.so.*.*
+# sample programs to subpackage instead?
+%attr(755,root,root) %{_bindir}/sasl-sample-client
+%attr(755,root,root) %{_bindir}/sasl-sample-server
 %attr(755,root,root) %{_sbindir}/sasldblistusers2
 %attr(755,root,root) %{_sbindir}/saslpasswd2
 
-%attr(640,root,mail) %ghost %config(noreplace) %verify(not mtime md5 size) /var/lib/sasl2/sasl.db
+%attr(640,root,mail) %ghost %config(noreplace) %verify(not md5 mtime size) /var/lib/sasl2/sasl.db
 %{_mandir}/man8/sasldblistusers2.*
 %{_mandir}/man8/saslpasswd2.*
 
@@ -623,9 +652,11 @@ fi
 %files saslauthd
 %defattr(644,root,root,755)
 %doc cyrus.pam
+%doc saslauthd/{AUTHORS,LDAP_SASLAUTHD}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/saslauthd.conf
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/saslauthd
 %attr(755,root,root) %{_sbindir}/saslauthd
 %attr(755,root,root) %{_sbindir}/testsaslauthd
 %attr(755,root,root) %{_sbindir}/saslcache
 %attr(754,root,root) /etc/rc.d/init.d/saslauthd
-%config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/saslauthd
 %{_mandir}/man8/saslauthd.*
This page took 0.047437 seconds and 4 git commands to generate.