]> git.pld-linux.org Git - packages/courier-authlib.git/blobdiff - courier-authlib.spec
- df friendly sourceforge url
[packages/courier-authlib.git] / courier-authlib.spec
index 95329dfdadbe473fd07d1b0d0481f4aa5b4d547d..9f133bac0b0ebc0bf6bd8aa1c0164c64b79adfc2 100644 (file)
@@ -1,18 +1,21 @@
+#
+# Conditional build:
+%bcond_without ldap            # do not include LDAP support
+
 Summary:       Courier authentication library
 Summary(pl.UTF-8):     Biblioteka uwierzytelniania Couriera
 Name:          courier-authlib
-Version:       0.59
-Release:       0.1
+Version:       0.65.0
+Release:       1
 License:       GPL
 Group:         Networking/Daemons
-Source0:       http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
-# Source0-md5: dbfc58a17149fd0f8c0983662ecc8ba8
+Source0:       http://downloads.sourceforge.net/courier/%{name}-%{version}.tar.bz2
+# Source0-md5: e9287e33b0e70ea3745517b4d719948d
 Source1:       %{name}.init
-Patch0:                %{name}-build.patch
-Patch1:                %{name}-md5sum-passwords.patch
-Patch2:                %{name}-authdaemonrc.patch
-Patch3:                %{name}-nostatic.patch
-Patch4:                %{name}-ltdl.patch
+Patch0:                %{name}-md5sum-passwords.patch
+Patch1:                %{name}-authdaemonrc.patch
+Patch2:                %{name}-nostatic.patch
+Patch3:                %{name}-ltdl.patch
 URL:           http://www.courier-mta.org/authlib/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -21,10 +24,11 @@ BuildRequires:      expect
 BuildRequires: libltdl-devel
 BuildRequires: libtool
 BuildRequires: mysql-devel
-BuildRequires: openldap-devel >= 2.3.0
+%{?with_ldap:BuildRequires:    openldap-devel >= 2.3.0}
 BuildRequires: pam-devel
 BuildRequires: postgresql-devel
 BuildRequires: rpmbuild(macros) >= 1.304
+BuildRequires: sqlite3-devel
 BuildRequires: sysconftool
 BuildRequires: zlib-devel
 Requires(post,postun): /sbin/ldconfig
@@ -70,10 +74,11 @@ Summary:    Development files for the Courier authentication library
 Summary(pl.UTF-8):     Pliki programistyczne dla biblioteki uwierzytelniania Couriera
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      %{name}-authldap = %{version}-%{release}
+%{?with_ldap:Requires: %{name}-authldap = %{version}-%{release}}
 Requires:      %{name}-authmysql = %{version}-%{release}
 Requires:      %{name}-authpgsql = %{version}-%{release}
-Requires:      %{name}-userdb = %{version}-%{release}
+Requires:      %{name}-authuserdb = %{version}-%{release}
+Requires:      %{name}-authpipe = %{version}-%{release}
 
 %description devel
 This package contains the development files needed to compile Courier
@@ -149,46 +154,65 @@ Ten pakiet dodaje obsługę PostgreSQL do biblioteki uwierzytelniania
 Couriera. Należy go zainstalować aby móc uwierzytelniać się z użyciem
 PostgreSQL.
 
-%package userdb
+%package authpipe
+Summary:       External authentication module that communicates via pipes
+Summary(pl.UTF-8):     Zewnętrzny moduł uwierzytelniający komunikujący się przez potoki
+Group:         Networking/Daemons
+Requires(pre,postun):  sed >= 4.0
+Requires:      %{name} = %{version}-%{release}
+Obsoletes:     courier-authlib-authpipe
+
+%description authpipe
+This package installs the authpipe module, which is a generic plugin
+that enables authentication requests to be serviced by an external
+program, then communicates through messages on stdin and stdout.
+
+%description authpipe -l pl.UTF-8
+Pakiet ten instaluje moduł authpipe, który jest ogólną wtyczką
+umożliwiającą obsługę żądań uwierzytelnienia przez zewnętrzny program
+komunikujący się poprzez wiadomości wysyłane na stdin i stdout.
+
+%package authsqlite
+Summary:       SQLite support for the Courier authentication library
+Summary(pl.UTF-8):     Obsługa SQLite dla biblioteki uwierzytelniania Couriera
+Group:         Networking/Daemons
+Requires(pre,postun):  sed >= 4.0
+Requires:      %{name} = %{version}-%{release}
+
+%description authsqlite
+This package installs SQLite support for the Courier authentication
+library. Install this package in order to be able to authenticate
+using SQLite.
+
+%description authsqlite -l pl.UTF-8
+Ten pakiet dodaje obsługę SQLite do biblioteki uwierzytelniania
+Couriera. Należy go zainstalować aby móc uwierzytelniać się z użyciem
+SQLite.
+
+%package authuserdb
 Summary:       Userdb support for the Courier authentication library
 Summary(pl.UTF-8):     Obsługa userdb dla biblioteki uwierzytelniania Couriera
 Group:         Networking/Daemons
 Requires(pre,postun):  sed >= 4.0
 Requires:      %{name} = %{version}-%{release}
+Obsoletes:     courier-authlib-userdb
 Obsoletes:     courier-imap-userdb
 Obsoletes:     sqwebmail-auth-userdb
 
-%description userdb
+%description authuserdb
 This package installs the userdb support for the Courier
 authentication library. Userdb is a simple way to manage virtual mail
 accounts using a GDBM-based database file.
 
 Install this package in order to be able to authenticate with userdb.
 
-%description userdb -l pl.UTF-8
+%description authuserdb -l pl.UTF-8
 Ten pakiet dodaje obsługę userdb do biblioteki uwierzytelniania
 Couriera. Userdb to prosty sposób zarządzania wirtualnymi kontami
 pocztowymi przy użyciu pliku bazy danych opartej na GDBM.
 
 Należy go zainstalować aby móc uwierzytelniać się z użyciem userdb.
 
-%package pipe
-Summary:       External authentication module that communicates via pipes
-Summary(pl.UTF-8):     Zewnętrzny moduł uwierzytelniający komunikujący się przez potoki
-Group:         Networking/Daemons
-Requires(pre,postun):  sed >= 4.0
-Requires:      %{name} = %{version}-%{release}
-
-%description pipe
-This package installs the authpipe module, which is a generic plugin
-that enables authentication requests to be serviced by an external
-program, then communicates through messages on stdin and stdout.
-
-%description pipe -l pl.UTF-8
-Pakiet ten instaluje moduł authpipe, który jest ogólną wtyczką
-umożliwiającą obsługę żądań uwierzytelnienia przez zewnętrzny program
-komunikujący się poprzez wiadomości wysyłane na stdin i stdout.
-
 %package -n openldap-schema-courier
 Summary:       Courier LDAP schema
 Summary(pl.UTF-8):     Schemat LDAP Couriera
@@ -209,33 +233,44 @@ Ten pakiet zawiera schemat Couriera authldap.schema dla openldapa.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-%patch4 -p1
 
 rm -rf libltdl
 
 %build
-for d in .  gdbmobj bdbobj md5 sha1 libhmac makedat userdb; do
-cd $d
+# Change Makefile.am files and force recreate Makefile.in's.
+OLDDIR=`pwd`
+find -type f -a \( -name configure.in -o -name configure.ac \) | while read FILE; do
+       cd "`dirname "$FILE"`"
+
+       if [ -f Makefile.am ]; then
+               sed -i -e '/_[L]DFLAGS=-static/d' Makefile.am
+       fi
+
        %{__libtoolize}
        %{__aclocal}
        %{__autoconf}
-       %{__autoheader}
+       if grep -q AC_CONFIG_HEADER configure.in; then
+               %{__autoheader}
+       fi
        %{__automake}
-cd -
+
+       cd "$OLDDIR"
 done
 
 %configure \
+       --enable-ltdl-install=no \
+       %{!?with_ldap:--without-authldap} \
        --with-db=db \
        --with-mailuser=daemon \
        --with-mailgroup=daemon
 
-%{__make} \
+%{__make} -j1 \
        LDFLAGS="%{rpmldflags} -lcrypt"
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%{__make} -j1 install \
        DESTDIR=$RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/authlib/userdb,%{schemadir},%{_bindir}}
@@ -325,34 +360,50 @@ fi
 /sbin/ldconfig %{_libexecdir}/courier-authlib
 %service -q courier-authlib restart
 
-%post userdb
+%post authpipe
 if [ "$1" = 1 ]; then
        # add to authmodulelist list if package is first installed
-       %{__sed} -i -e '/^authmodulelist=/{/\buserdb\b/!s/"$/ userdb"/}' /etc/authlib/authdaemonrc
+       %{__sed} -i -e '/^authmodulelist=/{/\bpipe\b/!s/"$/ pipe"/}' /etc/authlib/authdaemonrc
 fi
 /sbin/ldconfig %{_libexecdir}/courier-authlib
 %service -q courier-authlib restart
 
-%postun userdb
+%postun authpipe
 if [ "$1" = 0 ]; then
        # remove from authmodulelist if package is removed
-       %{__sed} -i -e '/^authmodulelist=/{s/ \?\buserdb\b \?//}' /etc/authlib/authdaemonrc
+       %{__sed} -i -e '/^authmodulelist=/{s/ \?\bpipe\b \?//}' /etc/authlib/authdaemonrc
 fi
 /sbin/ldconfig %{_libexecdir}/courier-authlib
 %service -q courier-authlib restart
 
-%post pipe
+%post authsqlite
 if [ "$1" = 1 ]; then
        # add to authmodulelist list if package is first installed
-       %{__sed} -i -e '/^authmodulelist=/{/\bpipe\b/!s/"$/ pipe"/}' /etc/authlib/authdaemonrc
+       %{__sed} -i -e '/^authmodulelist=/{/\bauthsqlite\b/!s/"$/ authsqlite"/}' /etc/authlib/authdaemonrc
 fi
 /sbin/ldconfig %{_libexecdir}/courier-authlib
 %service -q courier-authlib restart
 
-%postun pipe
+%postun authsqlite
 if [ "$1" = 0 ]; then
        # remove from authmodulelist if package is removed
-       %{__sed} -i -e '/^authmodulelist=/{s/ \?\bpipe\b \?//}' /etc/authlib/authdaemonrc
+       %{__sed} -i -e '/^authmodulelist=/{s/ \?\bauthsqlite\b \?//}' /etc/authlib/authdaemonrc
+fi
+/sbin/ldconfig %{_libexecdir}/courier-authlib
+%service -q courier-authlib restart
+
+%post authuserdb
+if [ "$1" = 1 ]; then
+       # add to authmodulelist list if package is first installed
+       %{__sed} -i -e '/^authmodulelist=/{/\buserdb\b/!s/"$/ userdb"/}' /etc/authlib/authdaemonrc
+fi
+/sbin/ldconfig %{_libexecdir}/courier-authlib
+%service -q courier-authlib restart
+
+%postun authuserdb
+if [ "$1" = 0 ]; then
+       # remove from authmodulelist if package is removed
+       %{__sed} -i -e '/^authmodulelist=/{s/ \?\buserdb\b \?//}' /etc/authlib/authdaemonrc
 fi
 /sbin/ldconfig %{_libexecdir}/courier-authlib
 %service -q courier-authlib restart
@@ -484,7 +535,7 @@ if [ -f /etc/sqwebmail/authpgsqlrc ]; then
        %service -q courier-authlib restart
 fi
 
-%triggerin -n %{name}-userdb -- courier < 0.48
+%triggerin -n %{name}-authuserdb -- courier < 0.48
 if [ -d /etc/courier/userdb ]; then
        mv -f /etc/courier/userdb/* /etc/authlib/userdb
        makeuserdb
@@ -494,7 +545,7 @@ if [ -f /etc/courier/userdb ]; then
        makeuserdb
 fi
 
-%triggerin -n %{name}-userdb -- courier-imap-userdb < 4.0.0
+%triggerin -n %{name}-authuserdb -- courier-imap-userdb < 4.0.0
 if [ -d /etc/courier-imap/userdb ]; then
        mv -f /etc/courier-imap/userdb/* /etc/authlib/userdb
        makeuserdb
@@ -504,7 +555,7 @@ if [ -f /etc/courier-imap/userdb ]; then
        makeuserdb
 fi
 
-%triggerin -n %{name}-userdb -- sqwebmail-auth-userdb < 5.0.0
+%triggerin -n %{name}-authuserdb -- sqwebmail-auth-userdb < 5.0.0
 if [ -d /etc/sqwebmail/userdb ]; then
        mv -f /etc/sqwebmail/userdb/* /etc/authlib/userdb
        makeuserdb
@@ -525,11 +576,16 @@ fi
 %attr(755,root,root) %{_libexecdir}/courier-authlib/authdaemond
 %attr(755,root,root) %{_libexecdir}/courier-authlib/authsystem.passwd
 %attr(755,root,root) %{_libexecdir}/courier-authlib/makedatprog
-%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthcustom.so.*.*.*
-%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpam.so.*.*.*
-%attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthcommon.so.*.*.*
-%attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthsasl.so.*.*.*
-%attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthsaslclient.so.*.*.*
+%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthcustom.so
+%attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthcustom.so.0
+%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpam.so
+%attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthpam.so.0
+%attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthcommon.so
+%attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauthcommon.so.0
+%attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthsasl.so
+%attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauthsasl.so.0
+%attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthsaslclient.so
+%attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauthsaslclient.so.0
 %{_libexecdir}/courier-authlib/libauthcustom.la
 %{_libexecdir}/courier-authlib/libauthpam.la
 %{_libexecdir}/courier-authlib/libcourierauth.la
@@ -548,7 +604,8 @@ fi
 %files libs
 %defattr(644,root,root,755)
 %dir %{_libexecdir}/courier-authlib
-%attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauth.so.*.*.*
+%attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauth.so
+%attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauth.so.0
 
 %files devel
 %defattr(644,root,root,755)
@@ -558,26 +615,44 @@ fi
 %{_mandir}/man3/*
 %attr(755,root,root) %{_libexecdir}/courier-authlib/*.so
 
+%if %{with ldap}
 %files authldap
 %defattr(644,root,root,755)
 %doc authldap.schema README.ldap
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authldaprc
-%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthldap.so.*.*.*
+%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthldap.so
+%attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthldap.so.0
 %{_libexecdir}/courier-authlib/libauthldap.la
+%endif
 
 %files authmysql
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authmysqlrc
-%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthmysql.so.*.*.*
+%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthmysql.so
+%attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthmysql.so.0
 %{_libexecdir}/courier-authlib/libauthmysql.la
 
 %files authpgsql
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authpgsqlrc
-%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpgsql.so.*.*.*
+%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpgsql.so
+%attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthpgsql.so.0
 %{_libexecdir}/courier-authlib/libauthpgsql.la
 
-%files userdb
+%files authpipe
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpipe.so
+%attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthpipe.so.0
+%{_libexecdir}/courier-authlib/libauthpipe.la
+
+%files authsqlite
+%defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authsqliterc
+%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthsqlite.so
+%attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthsqlite.so.0
+%{_libexecdir}/courier-authlib/libauthsqlite.la
+
+%files authuserdb
 %defattr(644,root,root,755)
 %attr(700,root,root) %dir %{_sysconfdir}/authlib/userdb
 %attr(755,root,root) %{_sbindir}/makeuserdb
@@ -585,16 +660,13 @@ fi
 %attr(755,root,root) %{_sbindir}/userdb
 %attr(755,root,root) %{_sbindir}/userdb-test-cram-md5
 %attr(755,root,root) %{_sbindir}/userdbpw
-%attr(755,root,root) %{_sbindir}/vchkpw2userdb
-%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthuserdb.so.*.*.*
+%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthuserdb.so
+%attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthuserdb.so.0
 %{_libexecdir}/courier-authlib/libauthuserdb.la
 %{_mandir}/man8/*userdb*
 
-%files pipe
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpipe.so.*.*.*
-%{_libexecdir}/courier-authlib/libauthpipe.la
-
+%if %{with ldap}
 %files -n openldap-schema-courier
 %defattr(644,root,root,755)
 %{schemadir}/*.schema
+%endif
This page took 0.069867 seconds and 4 git commands to generate.