%define samba_version 3.0.27 %define samba_short 3.0.23 #%(echo %{samba_version} | sed 's/[a-z]*$//g') Name: samba-pdb-sql Version: 0.2 Release: 2.%{samba_version}%{?dist} Summary: Samba support for MySQL and PostGreSQL passdb backends Group: Applications/System License: GPL URL: http://pdbsql.sourceforge.net/ Source0: http://prdownloads.sourceforge.net/pdbsql/pdbsql-%{version}-samba-%{samba_short}.tar.bz2 Source1: ftp://us4.samba.org/pub/samba/samba-%{samba_version}.tar.gz Patch1: pdbsql-samba-3.0.25.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: xmlto, autoconf >= 2.53 Requires: samba = %{samba_version} Requires: samba-pdb-sql-mysql, samba-pdb-sql-pgsql %description As of release 3.0.23, support for MySQL and PostGreSQL passdb backends has been removed from the Samba tree, due to the lack of active maintainer. We now provide this here as an external module for samba. Pdbsql provides three samba passdb backend modules: * pdb_mysql: A mysql passdb backend * pdb_pgsql: A postgresql passdb backend * pdb_multi: A backend which loads multiple passdb backends %package mysql Summary: Samba support for MySQL passdb backends Group: Applications/System Provides: samba-pdb-mysql BuildRequires: mysql-devel %description mysql As of release 3.0.23, support for MySQL and PostGreSQL passdb backends has been removed from the Samba tree, due to the lack of active maintainer. We now provide this here as an external module for samba. %package pgsql Summary: Samba support for PostGreSQL passdb backends Group: Applications/System Provides: samba-pdb-pgsql BuildRequires: postgresql-devel %description pgsql As of release 3.0.23, support for MySQL and PostGreSQL passdb backends has been removed from the Samba tree, due to the lack of active maintainer. We now provide this here as an external module for samba. %prep %setup -q -n pdbsql-%{version}-samba-%{samba_short} -a1 %patch1 -p1 %build cd samba-%{samba_version}/source/ ./autogen.sh ./configure make include/proto.h cd ../.. ./autogen.sh %configure --with-samba-dir=./samba-%{samba_version} make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT #make install DESTDIR=$RPM_BUILD_ROOT /usr/bin/install -c -d $RPM_BUILD_ROOT/usr/lib/samba/pdb /usr/bin/install -c -m 0755 multi.so mysql.so pgsql.so \ $RPM_BUILD_ROOT/usr/lib/samba/pdb %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc docs AUTHORS COPYING /usr/lib/samba/pdb/multi.so %files mysql %defattr(-,root,root,-) /usr/lib/samba/pdb/mysql.so %files pgsql %defattr(-,root,root,-) /usr/lib/samba/pdb/pgsql.so %changelog