blob: 55b171a99e5c73add1cc272749c5ca07b2423e44 [file] [log] [blame]
%define libname libduo
%define develname duo_unix-devel
Name: duo_unix
Version: @VERSION@
Release: 0%{?dist}
Epoch: 0
Summary: Duo two-factor authentication for Unix systems
Packager: S. Zachariah Sprackett <zac@sprackett.com>
Group: System Environment/Base
License: GPLV2
URL: http://www.duosecurity.com/
Source0: https://dl.duosecurity.com/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: pam openssl %{libname} = %{version}
BuildRequires: pam-devel openssl-devel pkgconfig openssh-server
%description
Duo provides simple two-factor authentication as a service via:
1. Phone callback
2. SMS-delivered one-time passcodes
3. Duo mobile app to generate one-time passcodes
4. Duo mobile app for smartphone push authentication
5. Duo hardware token to generate one-time passcodes
This package allows an admin (or ordinary user) to quickly add Duo
authentication to any Unix login without setting up secondary user
accounts, directory synchronization, servers, or hardware.
%package -n %{libname}
Summary: Shared libraries for duo authentication
Group: System/Libraries
%description -n %{libname}
Shared libraries for duo_unix
%package -n pam_duo
Summary: A PAM module for duo authentication
Group: System/Libraries
Requires: %{libname} = %{version}
%description -n pam_duo
A PAM module for duo authentication
%package -n %{develname}
Summary: Development files and documentation for duo_unix
Group: System/Libraries
Requires: %{libname} = %{version}
%description -n %{develname}
Development files and documentation for duo_unix
%prep
%setup -q -n %{name}-%{version}
%build
%configure --with-pam=/%{_lib}/security --sysconfdir=%{_sysconfdir}/duo --with-privsep-user=sshd --includedir=/%{_includedir}/duo
make %{?_smp_mflags}
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT/%{_lib}/security/pam_duo.*a
%post -n libduo -p /sbin/ldconfig
%postun -n libduo -p /sbin/ldconfig
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/duo
%attr(0600, sshd, root) %config(noreplace) %{_sysconfdir}/duo/login_duo.conf
%attr(4755, root, root) %{_sbindir}/login_duo
%{_mandir}/man8/login_duo.8.gz
%{_defaultdocdir}/%{name}/AUTHORS
%{_defaultdocdir}/%{name}/CHANGES
%{_defaultdocdir}/%{name}/LICENSE
%{_defaultdocdir}/%{name}/README
%files -n pam_duo
%dir %{_sysconfdir}/duo
/%{_lib}/security/pam_duo.so
%config(noreplace) %attr(640, root, root) %{_sysconfdir}/duo/pam_duo.conf
%{_mandir}/man8/pam_duo.8.gz
%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/libduo.so*
%files -n %{develname}
%defattr(-,root,root)
%{_libdir}/libduo.a
%{_libdir}/libduo.la
%{_includedir}/duo/duo.h
%{_includedir}/duo/util.h
%{_libdir}/pkgconfig/libduo.pc
%{_mandir}/man3/duo.3.gz
%changelog
* Sun Jul 12 2014 S. Zachariah Sprackett <zac@sprackett.com> 0:1.9.11-0
- Make things work with modern duo
* Thu Aug 22 2013 Mark Stanislav <mark.stanislav@gmail.com> 0:1.9.3-0
- Fixed documentation path for files breaking RPM build
* Mon Feb 11 2013 S. Zachariah Sprackett <zac@sprackett.com> 0:1.9-0
- Add OpenSSH server buildreq for people building in chroots with Mock
- Fixups to handle documentation being installed by Makefile
* Fri Sep 1 2011 R.I.Pienaar <rip@devco.net> 0:1.8-0
- Fix the ownership of /etc/duo/login_duo.conf so that login as normal users work
* Tue Aug 23 2011 Mark Stanislav <mark.stanislav@gmail.com> 0:1.7-0
- Removed README.{pam,ssh} from build related to commit 0d65488ae3cae2e97484
* Thu May 12 2011 S. Zachariah Sprackett <zac@sprackett.com> 0:1.6-0
- Rolled initial RPM