/
pam_smtpauth.spec.in
134 lines (108 loc) · 3.42 KB
/
pam_smtpauth.spec.in
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
%define __check_files %{nil}
%define _with_smtps 1
%define with_smtps %{?_with_smtps:1}%{!?_with_smtps:0}
%define vendor_openssl %([ "%{?_vendor_openssl}" = "" ] && echo || echo %{_vendor_openssl})
%define vendor_libdir %([ "%{?_vendor_libdir}" = "" ] && echo || echo %{_vendor_libdir})
%define vendor_includedir %([ "%{?_vendor_includedir}" = "" ] && echo || echo %{_vendor_includedir})
%define version @VERSION@
%define release 2
%define _libdir /lib
Summary: A Pluggable Authentication Module for SMTP Authentication.
Name: @PACKAGE@
Version: %{version}
Release: %{release}%{?dist}
Source0: %{name}-%{version}.tar.gz
License: GPL
Vendor: HDE, Inc.
Packager: Taizo ITO <taizo.ito@hde.co.jp>
URL: http://sourceforge.jp/projects/pam-smtpauth/
Group: System Environment/Base
BuildRoot: %{_tmppath}/%{name}-root
Requires: pam > 0.70
BuildRequires: pam-devel
%if %{with_smtps}
%if "%{vendor_openssl}" != ""
Requires: %{vendor_openssl}
BuildRequires: %{vendor_openssl}-devel
%else
Requires: openssl
BuildRequires: openssl-devel
%endif
BuildRequires: krb5-devel
%endif
### include local configuration
%{?include_specopt}
%description
This is pam_smtpauth, a pluggable authentication module that can be used with
Linux-PAM and SMTP Authentication.
%prep
%setup -q
%build
%if "%{vendor_libdir}" != ""
LIBS="-I%{vendor_includedir} -L%{vendor_libdir}"
export LIBS
LDFLAGS="${LDFLAGS} -Wl,-rpath,%{vendor_libdir} -L%{vendor_libdir}"
export LDFLAGS
%endif
%configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--enable-debug=yes \
--includedir=%{vendor_includedir} \
%if %{with_smtps}
--enable-ssl=yes \
--with-krb5-dir=%{_prefix}/kerberos \
%endif
%if "%{vendor_libdir}" != ""
CFLAGS="-fPIC -I%{vendor_includedir} -Wl,-rpath,%{vendor_libdir} -L%{vendor_libdir}"
%else
CFLAGS="-fPIC"
%endif
export CFLAGS
make %{?_smp_mflags} CFLAGS="${CFLAGS}" || make CFLAGS="${CFLAGS}"
## make check
%install
%makeinstall
%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/%{name}
%{__install} -m0644 sample/pam.smtp %{buildroot}%{_sysconfdir}/%{name}/pam.smtp
%clean
rm -rf $RPM_BUILD_ROOT
%post
## the first installation
#if [ $1 = 1 ]; then
# /usr/sbin/alternatives --install /etc/pam.d/smtp mta-pam %{_sysconfdir}/%{name}/pam.smtp 90
#fi
true
%preun
## the last uninstallation
#if [ $1 = 0 ]; then
# /usr/sbin/alternatives --remove mta-pam %{_sysconfdir}/%{name}/pam.smtp
# echo "" | /usr/sbin/alternatives --config mta
#fi
true
%files
%defattr(-,root,root)
%doc NEWS INSTALL README ChangeLog AUTHORS CONFIGURATION.eucjp sample
%{_libdir}/security/*
%config(noreplace) %{_sysconfdir}/pam_smtpauth.conf
%config %{_sysconfdir}/%{name}/pam.smtp
%{_mandir}/man5/pam_smtpauth.5.gz
%changelog
* Mon Oct 3 2011 Taizo ITO <taizo.ito@hde.co.jp> 1.0.0-1
- Added new configuration parameter - TryMechs.
* Tue Apr 21 2010 Taizo ITO <taizo.ito@hde.co.jp> 0.9.9-1
- Within NAT environment, a smtp greeting message cannot be received correctly.
* Tue Apr 21 2010 Taizo ITO <taizo.ito@hde.co.jp> 0.9.8-2
- Fixed libssl link option bug.
* Tue Jan 19 2010 Taizo ITO <taizo.ito@hde.co.jp>
- Added 'TryMethod' parameter in configuration file.
* Fri Aug 7 2009 Taizo ITO <taizo.ito@hde.co.jp>
- New upstream release.
* Tue Jun 22 2009 Taizo ITO <taizo.ito@hde.co.jp>
- version 0.9.3 build.
- support digest-md5 mechanism.
* Tue Jun 16 2009 Taizo ITO <taizo.ito@hde.co.jp>
- version 0.9.2 build.
- support smtps connection.
* Thu Jun 11 2009 Taizo ITO <taizo.ito@hde.co.jp>
- Initial 0.9.1 build.