]> git.pld-linux.org Git - packages/cyrus-sasl.git/blobdiff - cyrus-sasl.spec
- "MySQL" unification
[packages/cyrus-sasl.git] / cyrus-sasl.spec
index b3314739555f1a5f47160b2b60cf2c9849eed7c4..e301edb7d487cdadad3113fd07c4e86f68120ddf 100644 (file)
@@ -1,45 +1,47 @@
 #
 # TODO:
 # - add ldap plugin from openldap sources
+# - cleaner solution for mysql/pgsql support
 #
 # Conditional build:
-%bcond_with srp                # build srp pluggin
-%bcond_without mysql   # don't build mysql pluggin
-%bcond_without ldap    # disable LDAP support for sasluthd
-%bcond_with gssapi     # enable GSSAPI support for sasluthd
-%bcond_with pwcheck
-%bcond_with x509       
+%bcond_without ldap    # disable LDAP support for saslauthd
+%bcond_with    gssapi  # enable GSSAPI support for saslauthd and build gssapi plugin
+%bcond_without mysql   # don't build MySQL pluggin
+%bcond_with    pgsql   # build pgsql pluggin
+%bcond_with    srp     # build srp pluggin
+%bcond_with    pwcheck # build pwcheck helper (deprecated)
+%bcond_with    x509    # build x509 plugin (no sources in package???)
+#
 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.15
-Release:       0.2
+Version:       2.1.20
+Release:       1
 License:       distributable
 Group:         Libraries
 Source0:       ftp://ftp.andrew.cmu.edu/pub/cyrus/%{name}-%{version}.tar.gz
-# Source0-md5: 82c7f82a777b7bc10cc1ef68fb8e2a37
+# Source0-md5: 268ead27f4ac39bcfe17d9e38e0f2977
 Source1:       saslauthd.init
 Source2:       saslauthd.sysconfig
 Source3:       %{name}.pam
 Patch0:                %{name}-configdir.patch
 Patch1:                %{name}-nolibs.patch
-Patch2:                %{name}-lt14d.patch
-Patch3:                %{name}-do_dlopen.patch
-Patch4:                %{name}-ldb4.patch
+Patch2:                %{name}-lt.patch
 URL:           http://asg.web.cmu.edu/sasl/
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.54
 BuildRequires: automake
 BuildRequires: db-devel
 BuildRequires: ed
+%{?with_gssapi:BuildRequires:  heimdal-devel}
 BuildRequires: libtool >= 1.4
 %{?with_mysql:BuildRequires:   mysql-devel}
+%{?with_pgsql:BuildRequires:   postgresql-devel}
 %{?with_ldap:BuildRequires:    openldap-devel}
-BuildRequires: openssl-devel >= 0.9.7c
+BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: pam-devel
-Requires(post):        /sbin/ldconfig
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/sasl
@@ -50,6 +52,9 @@ authentication, authorization, and security to network protocols. The
 SASL protocol itself is documented in rfc2222; the API standard is a
 work in progress.
 
+Note: remember to install appropriate plugins, or you won't have any
+authentication mechanisms available.
+
 %description -l pl
 Pakiet cyrus-sasl zawiera implementacjê biblioteki API SASL dla
 systemu poczty elektronicznej Cyrusa. Biblioteka ta jest przydatna
@@ -57,6 +62,9 @@ tak
 bezpieczeñstwa protoko³ów sieciowych. Sam protokó³ SASL jest opisany w
 RFC 2222; standaryzacja API jest w toku.
 
+Uwaga: aby by³y dostêpne jakiekolwiek mechanizmy autoryzacji, nale¿y
+doinstalowaæ odpowiednie wtyczki.
+
 %description -l pt_BR
 Esta é uma implementação da API SASL, útil para acrescentar
 autenticação, autorização e seguança (criptografia) para protocolos de
@@ -80,7 +88,7 @@ Summary(pt_BR):       Exemplos e arquivos para desenvolvimento com SASL
 Summary(ru):   æÁÊÌÙ ÄÌÑ ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ Ó ÂÉÂÌÉÏÔÅËÏÊ Cyrus SASL
 Summary(ru):   æÁÊÌÉ ÄÌÑ ÐÒÏÇÒÁÍÕ×ÁÎÎѠڠ¦Â̦ÏÔÅËÏÀ Cyrus SASL
 Group:         Development/Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description devel
 This includes the header files and documentation needed to develop
@@ -107,7 +115,7 @@ Summary(pl):        Statyczne biblioteki cyrus-sasl
 Summary(ru):   óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ Cyrus SASL
 Summary(uk):   óÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ Cyrus SASL
 Group:         Development/Libraries
-Requires:      %{name}-devel = %{version}
+Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 Static cyrus-sasl libraries.
@@ -128,7 +136,7 @@ Summary:    Cram-MD5 Cyrus SASL plugin
 Summary(pl):   Wtyczka Cram-MD5 do Cyrus SASL
 Summary(pt_BR):        Mecanismo SASL CRAM-MD5
 Group:         Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description cram-md5
 This plugin implements the SASL CRAM-MD5 mechanism. CRAM-MD5 is the
@@ -153,7 +161,7 @@ Summary:    Digest-MD5 Cyrus SASL plugin
 Summary(pl):   Wtyczka Digest-MD5 do Cyrus SASL
 Summary(pt_BR):        Mecanismo SASL DIGEST-MD5
 Group:         Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description digest-md5
 This plugin implements the latest draft of the SASL DIGEST-MD5
@@ -180,7 +188,7 @@ Summary:    Plain Cyrus SASL plugin
 Summary(pl):   Wtyczka plain do Cyrus SASL
 Summary(pt_BR):        Mecanismo SASL PLAIN
 Group:         Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description plain
 This plugin implements the SASL PLAIN mechanism. Although insecure,
@@ -205,7 +213,7 @@ Summary:    Anonymous Cyrus SASL plugin
 Summary(pl):   Wtyczka anonymous do Cyrus SASL
 Summary(pt_BR):        Mecanismo SASL ANONYMOUS
 Group:         Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description anonymous
 This plugin implements the SASL ANONYMOUS mechanism, used for
@@ -224,7 +232,7 @@ Summary:    GSSAPI Cyrus SASL plugin
 Summary(pl):   Wtyczka GSSAPI do Cyrus SASL
 Summary(pt_BR):        Mecanismo SASL GSSAPI
 Group:         Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description gssapi
 This plugin implements the SASL GSSAPI mechanism, used for
@@ -242,7 +250,7 @@ autentica
 Summary:       Unsupported Login Cyrus SASL plugin
 Summary(pl):   Nie wspierana wtyczka Login do Cyrus SASL
 Group:         Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description login
 Unsupported LOGIN Cyrus SASL plugin.
@@ -256,7 +264,7 @@ Summary:    SRP Cyrus SASL plugin
 Summary(pl):   Wtyczka SRP do Cyrus SASL
 Summary(pt_BR):        Mecanismo SASL SRP
 Group:         Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description srp
 This plugin implements the SASL SRP mechanism, based on the Secure
@@ -282,7 +290,7 @@ Summary:    OTP Cyrus SASL plugin
 Summary(pl):   Wtyczka OTP do Cyrus SASL
 Summary(pt_BR):        Mecanismo SASL OTP
 Group:         Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description otp
 This plugin implements the SASL OTP (One Time Password) mechanism.
@@ -295,7 +303,7 @@ SASL.
 Summary:       x509 Cyrus SASL plugin
 Summary(pl):   Wtyczka x509 do Cyrus SASL
 Group:         Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description x509
 x509 Cyrus SASL plugin.
@@ -306,9 +314,9 @@ Wtyczka x509 do Cyrus SASL.
 %package saslauthd
 Summary:       Cyrus SASL authd
 Summary(pl):   Demon authd do Cyrus SASL
-Group:         Libraries
+Group:         Daemons
 Requires(post,postun): /sbin/chkconfig
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description saslauthd
 Cyrus SASL authd.
@@ -320,7 +328,7 @@ Demon authd do Cyrus SASL.
 Summary:       Cyrus SASL pwcheck helper
 Summary(pl):   Program pomocniczy pwcheck do Cyrus SASL
 Group:         Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description pwcheck
 Cyrus SASL pwcheck helper.
@@ -332,7 +340,7 @@ Program pomocniczy pwcheck do Cyrus SASL.
 Summary:       Cyrus SASL sasldb plugin
 Summary(pl):   Wtyczka sasldb do Cyrus SASL
 Group:         Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description sasldb
 Cyrus SASL sasldb plugin.
@@ -341,24 +349,34 @@ Cyrus SASL sasldb plugin.
 Wtyczka sasldb do Cyrus SASL.
 
 %package mysql
-Summary:       Cyrus SASL mysql plugin
-Summary(pl):   Wtyczka mysql do Cyrus SASL
+Summary:       Cyrus SASL MySQL plugin
+Summary(pl):   Wtyczka MySQL do Cyrus SASL
 Group:         Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description mysql
-Cyrus SASL mysql plugin.
+Cyrus SASL MySQL plugin.
 
 %description mysql -l pl
-Wtyczka mysql do Cyrus SASL.
+Wtyczka MySQL do Cyrus SASL.
+
+%package pgsql
+Summary:       Cyrus SASL PostgreSQL plugin
+Summary(pl):   Wtyczka PostgreSQL do Cyrus SASL
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description pgsql
+Cyrus SASL PostgreSQL plugin.
+
+%description pgsql -l pl
+Wtyczka PostgreSQL do Cyrus SASL.
 
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
-%patch4 -p1
 
 cd doc
 echo "cyrus-sasl complies with the following RFCs:" > rfc-compliance
@@ -366,9 +384,11 @@ ls rfc*.txt >> rfc-compliance
 rm -f rfc*.txt
 cd ..
 
-%build
+rm -rf autom4te.cache saslauthd/autom4te.cache
 # acinclude.m4 contains only old libtool.m4
-rm -f acinclude.m4 config/missing
+rm -f acinclude.m4 libtool config/libtool.m4 saslauthd/acinclude.m4
+
+%build
 %{__libtoolize}
 %{__aclocal} -I cmulocal -I config
 %{__autoheader}
@@ -376,36 +396,42 @@ rm -f acinclude.m4 config/missing
 %{__autoconf}
 
 cd saslauthd
-       %{__aclocal} -I ../cmulocal -I ../config -I config
-       %{__autoheader}
-       %{__automake}
-       %{__autoconf}
+%{__libtoolize}
+%{__aclocal} -I ../cmulocal -I ../config -I config
+%{__autoheader}
+%{__automake}
+%{__autoconf}
 cd ..
 
-LDFLAGS="%{rpmldflags} -ldl"; export LDFLAGS
 %configure \
-       --enable-static \
+       --disable-krb4 \
+       %{!?with_gssapi: --disable-gssapi} \
+       %{?with_gssapi: --enable-gssapi --with-gss_impl=heimdal} \
        --enable-login \
+       --enable-sql \
        %{?with_srp: --enable-srp} \
-       %{?with_mysql: --with-mysql=%{_prefix}} \
-       %{?with_ldap: --with-ldap=%{_prefix}} \
-       %{?with_pwcheck: --with-pwcheck=/var/lib/sasl2} \
-       --with-saslauthd=/var/lib/sasl2 \
-       --with-pam \
+       --enable-static \
+       --with-plugindir=%{_libdir}/sasl2 \
+       --with-configdir=%{_sysconfdir} \
        --with-dblib=berkeley \
        --with-dbpath=/var/lib/sasl2/sasl.db \
-       --with-configdir=%{_sysconfdir} \
-       --disable-krb4 \
-       %{?with_gssapi: --enable-gssapi}%{?!with_gssapi: --disable-gssapi}
+       %{?with_ldap: --with-ldap=%{_prefix}} \
+       %{?with_mysql: --with-mysql=%{_prefix}} \
+       %{?with_pgsql: --with-pgsql=%{_prefix}} \
+       --with-pam \
+       %{?with_pwcheck: --with-pwcheck=/var/lib/sasl2} \
+       --with-saslauthd=/var/lib/sasl2
 %{__make}
 
+%{__make} -C saslauthd testsaslauthd
+%{__make} -C saslauthd saslcache
+
 cd doc
 RFCLIST=`grep 'rfc.\+\.txt' rfc-compliance`
 for i in $RFCLIST; do
        RFCDIR=../RFC/text/`echo $i | sed -e 's:^rfc::' -e 's:..\.txt$::' `00
        echo -e ',s:'$i':'$RFCDIR/$i'\n,w\nq' | ed index.html
 done
-cd ..
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -413,12 +439,14 @@ install -d $RPM_BUILD_ROOT{/var/lib/sasl2,%{_sysconfdir},/etc/{rc.d/init.d,sysco
                $RPM_BUILD_ROOT%{_mandir}/man8
 
 %{__make} install \
+       sasldir=%{_libdir}/sasl2 \
        DESTDIR=$RPM_BUILD_ROOT
 
 rm -rf $RPM_BUILD_ROOT%{_mandir}/cat*
 rm -f $RPM_BUILD_ROOT%{_libdir}/sasl2/*.{la,a}
 
-install {utils,saslauthd}/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
+install utils/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
+install saslauthd/saslauthd.mdoc $RPM_BUILD_ROOT%{_mandir}/man8/saslauthd.8
 
 ln -sf libsasl2.so $RPM_BUILD_ROOT%{_libdir}/libsasl.so
 
@@ -428,13 +456,12 @@ 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}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-/sbin/ldconfig
-echo "Remember to install appropriate plugins, or you won't have any mechs available."
-
+%post  -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
 %post saslauthd
@@ -516,7 +543,13 @@ fi
 %if %{with mysql}
 %files mysql
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/sasl2/libmysql*.so*
+%attr(755,root,root) %{_libdir}/sasl2/libsql*.so*
+%endif
+
+%if %{with pgsql}
+%files pgsql
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/sasl2/libsql*.so*
 %endif
 
 %if %{with srp}
@@ -541,6 +574,8 @@ fi
 %defattr(644,root,root,755)
 %doc cyrus.pam
 %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.078635 seconds and 4 git commands to generate.