summaryrefslogtreecommitdiff
path: root/pam_tacplus.spec.in
blob: f89499285ecc4aaf164c7473461311a49f12c9a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#
# spec file for package 'name' (version 'v')
#
# The following software is released as specified below.
# This spec file is released to the public domain.
# (c) Lincom Software Team

# Basic Information
Name: pam_tacplus
Version: @VERSION@
Release: 1%{?dist}
Summary: PAM Tacacs+ module
Group: System
License: GPL
URL: http://tacplus.sourceforge.net/

# Packager Information
Packager: NRB

# Build Information
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

# Source Information
Source0: https://github.com/jeroennijhof/pam_tacplus/archive/@VERSION@.tar.gz

# Dependency Information
BuildRequires: gcc binutils pam-devel
Requires: pam

%description
PAM Tacacs+ module based on code produced by Pawel Krawczyk <pawel.krawczyk@hush.com> and Jeroen Nijhof <jeroen@jeroennijhof.nl>

%package devel
Group: Development/Libraries
Summary: Development files for pam_tacplus
Requires: pam_tacplus

%description devel
Development files for pam_tacplus.

%prep
%setup -q -a 0

%build
autoreconf -i
./configure
make

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/pam.d
mkdir -p $RPM_BUILD_ROOT/%{_lib}/security

install -m 755 .libs/pam_tacplus.so \
               $RPM_BUILD_ROOT/%{_lib}/security/
install -m 644 sample.pam $RPM_BUILD_ROOT/etc/pam.d/tacacs

chmod 755 $RPM_BUILD_ROOT/%{_lib}/security/*.so*

make install DESTDIR=$RPM_BUILD_ROOT
chmod 755 $RPM_BUILD_ROOT/usr/local/include/libtac

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%attr(0755,root,root) /%{_lib}/security/*.so
%attr(0755,root,root) /usr/local/lib/*.so.*
%attr(0644,root,root) %config(noreplace) /etc/pam.d/tacacs
%doc AUTHORS COPYING README.md ChangeLog

%files devel
%defattr(-,root,root,-)
%attr(755,root,root) /usr/local/bin/*
%attr(644,root,root) /usr/local/include/*
%attr(755,root,root) /usr/local/lib/*.so
%attr(755,root,root) /usr/local/lib/*.la
%attr(755,root,root) /usr/local/lib/security/*
%attr(644,root,root) /usr/local/lib/pkgconfig/*
%doc /usr/local/share/doc/*

%changelog
* Thu Feb  2 2012 - Jeroen <jeroen@jeroennijhof.nl>
- Path changed for pam_tacplus.so
- Not using static library path anymore

* Mon Mar 17 2010 - beNDon <benoit.donneaux@gmail.com>
- Autotools aware
- spec file added for RPM building