Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37575308
en ru br
ALT Linux repositórios
S:2.1.27-alt2.2
5.0: 2.1.22-alt8.cvs.20081104.M50.1
4.1: 2.1.22-alt4.cvs.20081019.M41.2
4.0: 2.1.22-alt4.cvs.20081019.M40.2
3.0: 2.1.20-alt5

Outros repositórios
Upstream:2.1.22

Group :: Sistema/Bibliotecas
RPM: cyrus-sasl2

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

# Use "--disable sql" for build without PostgreSQL and MySQL support
%def_enable sql
# Use "--disable ldap" for build without LDAP support
%def_enable ldap

%set_autoconf_version 2.5
%set_automake_version 1.7
%set_libtool_version 1.4

Summary: SASL2 is the Simple Authentication and Security Layer
URL: http://asg.web.cmu.edu/sasl/sasl-library.html
Name: cyrus-sasl2
Version: 2.1.20
%define srcname cyrus-sasl
Release: alt5
Source0: %srcname-%version.tar.gz
Source1: sasldb2
Source2: saslpasswd.conf
Source3: saslauthd.conf
Source4: saslauthd.init
Source5: saslauthd.sysconfig

# It's a converted server-plugin-flow.fig to JPEG

Source7: %name-alt-server-plugin-flow.jpg

Source8: README.ALT

Patch0: %name-2.1.19-alt-ssl.patch
Patch1: %name-2.1.19-checkpw.c.patch
Patch2: %name-2.1.20-alt-db4.patch
Patch3: %name-2.1.18-rpath.patch

License: Freely Distributable
Group: System/Libraries

Prefix: %prefix
Requires: libsasl2 = %version-%release

%set_libtool_version 1.4
%set_automake_version 1.7

BuildPreReq: autoconf automake libtool
# Automatically added by buildreq on Wed Dec 03 2003
BuildRequires: glibc-devel-static libdb4-devel
BuildRequires: libkrb5-devel >= 1.3.1-alt3 libpam0-devel
BuildRequires: libssl-devel groff-base

%if_enabled sql
BuildRequires: libMySQL-devel postgresql-devel libpq-devel
%endif

%if_enabled ldap
BuildRequires: libldap-devel
%endif

%description
SASL is the Simple Authentication and Security Layer,
a method for adding authentication support to connection-based protocols.
To use SASL, a protocol includes a command for identifying and authenticating
a user to a server and for optionally negotiating protection of subsequent
protocol interactions. If its use is negotiated, a security layer is inserted
between the protocol and the connection.

%package -n libsasl2
Summary: Librairies for SASL a the Simple Authentication and Security Layer
Group: System/Libraries
#Requires: libpam libssl zlib shadow-utils
Requires: libpam zlib shadow-utils

%description -n libsasl2
SASL is the Simple Authentication and Security Layer,
a method for adding authentication support to connection-based protocols.
To use SASL, a protocol includes a command for identifying and authenticating
a user to a server and for optionally negotiating protection of subsequent
protocol interactions. If its use is negotiated, a security layer is inserted
between the protocol and the connection.

%package -n libsasl2-devel
Summary: Librairies for SASL a the Simple Authentication and Security Layer
Group: Development/C
Requires: libsasl2 = %version-%release
Conflicts: libsasl-devel

%description -n libsasl2-devel
SASL is the Simple Authentication and Security Layer,
a method for adding authentication support to connection-based protocols.
To use SASL, a protocol includes a command for identifying and authenticating
a user to a server and for optionally negotiating protection of subsequent
protocol interactions. If its use is negotiated, a security layer is inserted
between the protocol and the connection.

%package -n libsasl2-devel-static
Summary: Static librairies for SASL a the Simple Authentication and Security Layer
Group: Development/C
Requires: libsasl2-devel = %version-%release

%description -n libsasl2-devel-static
SASL is the Simple Authentication and Security Layer,
a method for adding authentication support to connection-based protocols.
To use SASL, a protocol includes a command for identifying and authenticating
a user to a server and for optionally negotiating protection of subsequent
protocol interactions. If its use is negotiated, a security layer is inserted
between the protocol and the connection.

%package -n libsasl2-plugin-gssapi
Summary: SASL2 KERBEROS_V5 mechanism plugin
Group: System/Libraries
Requires: libsasl2 = %version-%release
Requires: libkrb5 >= 1.3.1-alt3

%description -n libsasl2-plugin-gssapi
This plugin implements the SASL2 KERBEROS_V5 mechanism, allowing
authentication via kerberos version four.
This OPTIONS is EXPERIMENTAL!

%if_enabled sql
%package -n libsasl2-plugin-sql
Summary: SASL2 MySQL and PostgreSQL mechanism plugin
Group: System/Libraries
Requires: libsasl2 = %version-%release
Obsoletes: libsasl2-plugin-mysql
Obsoletes: libsasl2-plugin-pgsql


%description -n libsasl2-plugin-sql
This plugin implements the SASL2 MySQL and PgSQL AUXPROP mechanism.
%endif

%package docs
Summary: SASL2 docs
Group: System/Libraries
Requires: libsasl2 = %version-%release

%description docs
This package contains documentations for SASL2

%prep
%setup -q -n %srcname-%version
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p0

%build

%if_enabled sql
# CPPFLAGS Vs. CPPFLAG ???
export CPPFLAGS="`krb5-config --cflags` -I/usr/include/pgsql $CPPFLAG"
%else
export CPPFLAGS="`krb5-config --cflags` $CPPFLAG"
%endif

export LIBTOOL_VERSION="1.4"

aclocal -I cmulocal -I config
%__autoconf
pushd saslauthd
aclocal -I ../cmulocal -I config -I ../config
%__autoconf
popd

%configure --enable-static --enable-shared \
--sysconfdir=%_sysconfdir/sasl2 \
--libdir=/%_lib \
--with-plugindir=%_libdir/sasl2 \
--with-dbpath=%_sysconfdir/sasl2/sasldb2 \
--with-dblib=berkeley \
--with-openssl \
--with-des \
--with-pam \
--with-saslauthd=/var/run/saslauthd \
--with-rc4 \
%if_enabled ldap
--with-ldapauxprop=%_prefix \
--with-ldap=%_prefix \
%endif
%if_enabled sql
--with-mysql=%_prefix \
--with-pgsql=%_prefix \
--enable-sql \
%endif
--enable-anon \
--enable-cram \
--enable-plain \
--enable-login \
--enable-gssapi \
--enable-ntlm \
--enable-digest \
--enable-srp \
--enable-otp \
--disable-krb4

%__subst 's,/usr/local/lib,%_libdir,g' saslauthd/Makefile
%make_build

pushd saslauthd
make testsaslauthd
popd

%install
%__mkdir_p %buildroot{%_bindir,%_libdir}
%makeinstall sasldir=%buildroot%_libdir/sasl2 libdir=%buildroot/%_lib

%__install -m 755 saslauthd/testsaslauthd %buildroot%_bindir

pushd %buildroot/%_lib
   for n in `ls -1 *.a`
   do
mv $n %buildroot/%_libdir
   done
popd

pushd %buildroot/%_libdir
   %__ln_s -nf ../../%_lib/libsasl2.so.2 libsasl2.so
popd

%__mkdir_p %buildroot%_sysconfdir
%__mkdir_p %buildroot%_mandir/man8

# some files are currently not installed by the Makefile

cp utils/sasldblistusers2.8 %buildroot%_mandir/man8/
cp utils/saslpasswd2.8 %buildroot%_mandir/man8/
cp saslauthd/saslauthd.mdoc %buildroot%_mandir/man8/saslauthd.8
#mv %buildroot%_mandir/cat8/saslauthd.8 %buildroot%_mandir/man8
cp utils/.libs/dbconverter-2 %buildroot%_sbindir
rm -fr %buildroot%_mandir/cat8

%__mkdir_p %buildroot%_docdir/%name-%version
%__mkdir_p %buildroot%_docdir/%name-%version/HTML
%__mkdir_p %buildroot%_docdir/%name-%version/RFC
%__install -p -m 0644 doc/*.html* %buildroot%_docdir/%name-%version/HTML
%__install -p -m 0644 doc/rfc*.txt %buildroot%_docdir/%name-%version/RFC
%__install -p -m 0644 doc/draft*.txt %buildroot%_docdir/%name-%version/RFC
%__install -p -m 0644 %SOURCE7 %buildroot%_docdir/%name-%version/HTML/server-plugin-flow.jpg
%__mkdir_p %buildroot%_docdir/%name-%version/saslauthd
%__install -p -m 0644 saslauthd/{README,INSTALL,LDAP_SASLAUTHD,NEWS,COPYING,ChangeLog,AUTHORS} %buildroot%_docdir/%name-%version/saslauthd

%__install -p -m 0644 {%SOURCE8,COPYING,AUTHORS,INSTALL,NEWS,README,ChangeLog,doc/TODO} %buildroot%_docdir/%name-%version

%__mkdir_p %buildroot%_initdir
%__mkdir_p %buildroot%_sysconfdir/sysconfig
%__mkdir_p %buildroot/var/run/saslauthd
%__mkdir_p %buildroot%_sysconfdir/sasl2

%__install -m0600 %SOURCE1 %buildroot%_sysconfdir/sasl2
%__install -m0600 %SOURCE2 %buildroot%_sysconfdir/sasl2
%__install -m0600 %SOURCE3 %buildroot%_sysconfdir/sasl2

%__install -m0755 %SOURCE4 %buildroot%_initdir/saslauthd
%__install -m0600 %SOURCE5 %buildroot%_sysconfdir/sysconfig/saslauthd

%post
%post_service saslauthd
%preun
%preun_service saslauthd

%pre -n libsasl2
%_sbindir/groupadd -rf sasl
%post -n libsasl2 -p /sbin/post_ldconfig
%postun -n libsasl2 -p /sbin/postun_ldconfig

%post -n libsasl2-devel-static -p /sbin/post_ldconfig
%postun -n libsasl2-devel-static -p /sbin/postun_ldconfig

%files
%config(noreplace) %attr(0640,root,root) %_sysconfdir/sasl2/saslpasswd.conf
%config(noreplace) %attr(0640,root,root) %_sysconfdir/sasl2/saslauthd.conf
%config(noreplace) %attr(0600,root,root) %_sysconfdir/sysconfig/saslauthd
%attr(0755,root,root) %_initdir/saslauthd
%_bindir/*
%_sbindir/*
%_mandir/man8/*
#%_libdir/sasl2/*.conf
%attr(0711,root,root) %dir /var/run/saslauthd

%files -n libsasl2
%config(noreplace) %attr(0640,root,sasl) %_sysconfdir/sasl2/sasldb2
%dir %_sysconfdir/sasl2
%dir %_libdir/sasl2
/%_lib/*.so.*
%_libdir/sasl2/libanonymous.so*
%_libdir/sasl2/libcrammd5.so*
%_libdir/sasl2/libdigestmd5.so*
%_libdir/sasl2/liblogin.so*
%_libdir/sasl2/libntlm.so*
%_libdir/sasl2/libotp.so*
%_libdir/sasl2/libplain.so*
%_libdir/sasl2/libsasldb.so*
%_libdir/sasl2/libsrp.so*

%doc COPYING AUTHORS INSTALL NEWS README ChangeLog doc/TODO

%files -n libsasl2-devel
%dir %_includedir/sasl
%dir %_libdir/sasl2
%_includedir/sasl/*
#%_libdir/*.la
#%_libdir/*/*.la
%_mandir/man3/*
%_libdir/*.so

%files -n libsasl2-devel-static
%dir %_libdir/sasl2
%_libdir/*.a
%_libdir/*/*.a

%files docs
%doc %_docdir/%name-%version/*

%files -n libsasl2-plugin-gssapi
%_libdir/sasl2/libgssapiv2.so*

%if_enabled sql
%files -n libsasl2-plugin-sql
%_libdir/sasl2/libsql.so*
%endif

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009