Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37584087
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

%define srcname cyrus-sasl
%define cvsdate 20081019

Name: cyrus-sasl2
Version: 2.1.22
Release: alt4.cvs.%cvsdate.M41.2

Summary: SASL2 is the Simple Authentication and Security Layer
License: Freely Distributable
Group: System/Libraries

# git-cvsimport -v -r git-cvs -i -k -d :pserver:anoncvs at cvs.andrew.cmu.edu:/cvs sasl

URL: http://asg.web.cmu.edu/sasl/index.html
Packager: Vladimir V Kamarzin <vvk at altlinux.ru>

Source0: %name-%version.tar
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

Requires: libsasl2 = %version-%release

BuildRequires: autoconf automake
BuildRequires: libcom_err-devel libdb4-devel libkrb5-devel libpam-devel groff-base

%if_enabled sql
BuildRequires: libMySQL-devel postgresql-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: 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-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

%build

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

libtoolize -f -c
aclocal -I cmulocal -I config
autoheader
autoconf
automake -a -c -f

pushd saslauthd
libtoolize -f -c
aclocal -I ../cmulocal -I config -I ../config
autoheader
autoconf
automake -a -c -f
popd

%add_optflags %optflags_shared

%configure --enable-shared \
--sysconfdir=%_sysconfdir/sasl2 \
--libdir=/%_lib \
--with-plugindir=%_libdir/sasl2 \
--with-dbpath=%_sysconfdir/sasl2/sasldb2 \
--with-dblib=berkeley \
--with-devrandom=/dev/urandom \
--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

sed -i 's,/usr/local/lib,%_libdir,g' saslauthd/Makefile
%make_build

pushd saslauthd
make testsaslauthd
popd

%install

%set_verify_elf_method unresolved=relaxed

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
%post_ldconfig

%postun -n libsasl2
%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/*
%_man8dir/*
#%%_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/*
%_mandir/man3/*
%_libdir/*.so

%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