File pam_mobile_otp.spec of Package pam_mobile_otp

# vim: set sw=4 ts=4 et nu:

# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

Name:               pam_mobile_otp
Version:            0.6.2
Release:            0
Summary:            Mobile OTP PAM Module
Source:             http://motp.sourceforge.net/pam_mobile_otp-%{version}.tgz
Patch1:             pam_mobile_otp-fix_makefile.patch
URL:                http://motp.sourceforge.net
Group:              Productivity/Security
License:            GPL-2.0+
BuildRoot:          %{_tmppath}/build-%{name}-%{version}
BuildRequires:      pam-devel
BuildRequires:      gcc make glibc-devel pkgconfig

%description
Mobile OTP is a solution for strong two factor authentication.
See http://motp.sourceforge.net/ for more details.

%prep
%setup -q -n "%{name}"
%patch1

%build
%__make %{?_smp_mflags} \
    CC="%__cc" \
    CFLAGS="%{optflags}"

%install
%makeinstall \
    LIB="%{_lib}" \
    CC="%__cc" \
    CFLAGS="%{optflags}"

%__install -D -m0755 motp-manager "%{buildroot}%{_sbindir}/motp-manager"
%__install -D -m0600 motp.conf "%{buildroot}/etc/security/motp.conf"
%__install -d -m0700 "%{buildroot}/var/cache/motp"

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%files
%defattr(-,root,root)
%doc CHANGELOG MOTP.html README
/%{_lib}/security/pam_mobile_otp.so
%{_sbindir}/motp-manager
%config(noreplace) /etc/security/motp.conf
%dir /var/cache/motp

%changelog
openSUSE Build Service is sponsored by