A new user interface for you! Read more...

File pam_mysql.spec of Package pam_mysql

#
# spec file for package pam_mysql (0.7RC1)
#
# Copyright (c) 2008 Matthias Fehring
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

# norootforbuild

BuildRequires:      pam-devel gcc-c++
%if %suse_version > 1020
BuildRequires:      licenses libmysqlclient-devel libopenssl-devel
%else
BuildRequires:      mysql-devel openssl-devel
%endif

Name:               pam_mysql
Summary:            MySQL Backend for PAM
Version:            0.7RC1
Release:            1
License:            GPL
Group:              System/Libraries
Source0:            pam_mysql-%{version}.tar.gz
BuildRoot:          %{_tmppath}/%{name}-%{version}-build
AutoReqProv:        yes

Requires:           pam
%if %suse_version > 1020
Requires:           licenses libmysqlclient15 libopenssl0_9_8
%else
Requires:           mysql-client openssl
%endif

Url:                http://pam-mysql.sourceforge.net

%description
This is a module that allows PAM aware applications
to authenticate users through a MySQL database.

Authors:
-------
James O'Kane <jo2y@users.sourceforge.net>
Steve Brown <delancie@users.sourceforge.net>
Moriyoshi Koizumi
and others, see CREDITS file


%prep
%setup

%build
  export CFLAGS=$RPM_OPT_FLAGS
  export CXXFLAGS=$RPM_OPT_FLAGS
  ./configure --with-openssl --with-pam-mods-dir=/%_lib/security
  make

%install
  %makeinstall
  rm -f $RPM_BUILD_ROOT/%_lib/security/*.la
  mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
  cp -t $RPM_BUILD_ROOT%{_docdir}/%{name} ChangeLog CREDITS NEWS README
  %if %suse_version > 1020
  MD5SUM=$(md5sum COPYING | sed 's/ .*//')
  if test -f /usr/share/doc/licenses/md5/$MD5SUM ; then
      ln -sf /usr/share/doc/licenses/md5/$MD5SUM $RPM_BUILD_ROOT%{_docdir}/%{name}/COPYING; else
      cp COPYING $RPM_BUILD_ROOT%{_docdir}/%{name}
  fi
  %else
  cp COPYING $RPM_BUILD_ROOT%{_docdir}/%{name}
  %endif

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
  rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
/%_lib/security/pam_mysql.so
%{_docdir}/%{name}

%changelog
* Wed Nov 26 2008 Matthias Fehring <buschmann@opensuse.org>
- changing requirements for 10.3 and newer
* Fri Apr 04 2008 Matthias Fehring <buschmann@huessenbergnetz.de>
- initial spec file