summaryrefslogtreecommitdiffstats
path: root/eurephia.spec
blob: 03a76ea1191c730a0549674c2ea497b1681babcd (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
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
135
136
Name:           eurephia
Version:        1.0.0
Release:        1%{?betatag:.%{betatag}}%{?dist}
Summary:        An advanced and flexible OpenVPN user authentication plug-in

Group:          Applications/Internet
License:        GPLv2
URL:            http://www.eurephia.net/
Source0:        http://downloads.sourceforge.net/project/eurephia/eurephia/Beta%20releases/%{name}-%{version}%{?betatag:_%{betatag}}.tar.bz2
Source1:        http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn/openvpn-plugin.h
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}{?betatag:_%{betatag}}-root-%(%{__id_u} -n)

BuildRequires:  cmake libxml2-devel libxslt-devel
BuildRequires:  sqlite-devel >= 3.0.0
Requires:       openvpn eurephia-sqlite3

%description
This plug-in enhances OpenVPN by adding user name and password
authentication in addition. An eurephia user account is a combination of
minimum one OpenVPN SSL certificate and a user name with a password
assigned. It is also possible to setup several eurephia user names to use
a shared OpenVPN certificate.

In addition, eurephia will blacklist IP addresses, certificates and user names
on too many failed attempts and it supports dynamic update of iptables rules
which restricts network access per connection.

%package sqlite3
Summary: The eurephia SQLite3 database driver

%description sqlite3
This package contains the SQLite3 database driver for eurephia

%package iptables
Summary: The eurephia iptables interface module
Requires: eurephia

%description iptables
To enable the firewall integration in eurephia, this module must be
available for eurephia.  Use the eurephia-init package to setup
configuration.

%package admin
Summary: The eurephia command line administration utility
Requires: eurephia-sqlite3

%description admin
This package contains the command line utility to administer and configure
eurephia

%package init
Summary: Utility for initializing a new eurephia database
Requires: eurephia-sqlite3

%description init
This package provides a program which will initialize the eurephia
database for you.  It will guide you through several questions and
save the configuration in the database.  When you have configured
and initialized eurephia, this package should be removed from the
system.

%package utils
Summary: Misc. eurephia utilities

%description utils
This package contains useful utilities when debugging eurephia.
At the moment you will only find eurephia_saltdecode in this
package, which will provide some information about the password
hash salt.


%prep 
%setup -q -b0 -n %{name}-%{version}%{?betatag:_%{betatag}}
cp -v %{_sourcedir}/openvpn-plugin.h %{_builddir}/%{name}-%{version}%{?betatag:_%{betatag}}/

%build
CFLAGS="%{optflags}" ./configure --prefix %{_prefix} --bin-dir %{_bindir} --xslt-path %{_datadir}/eurephia/xslt --plug-in-dir %{_libdir}/eurephia --plug-in --openvpn-src . --fw-iptables --db-sqlite3 --sqlite3-path %{_localstatedir}/lib/eurephia --eurephiadm
make VERBOSE=1

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
install -m 755 utils/eurephia_init $RPM_BUILD_ROOT/%{_bindir}
install -m 755 utils/eurephia_saltdecode $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8
install -m 644 utils/eurephia_init.8 $RPM_BUILD_ROOT/%{_mandir}/man8/
install -m 644 utils/eurephia_saltdecode.8 $RPM_BUILD_ROOT/%{_mandir}/man8/

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc LICENSE.txt CREDITS.txt
%{_libdir}/eurephia/eurephia-auth.so

%files sqlite3
%defattr(-,root,root,-)
%doc LICENSE.txt CREDITS.txt
%{_libdir}/eurephia/edb-sqlite.so
%{_localstatedir}/lib/eurephia/

%files iptables
%defattr(-,root,root,-)
%doc LICENSE.txt CREDITS.txt
%{_libdir}/eurephia/efw-iptables.so

%files init
%defattr(-,root,root,-)
%doc LICENSE.txt CREDITS.txt
%{_bindir}/eurephia_init
%{_mandir}/man8/eurephia_init.8.gz

%files admin
%defattr(-,root,root,-)
%doc LICENSE.txt CREDITS.txt
%{_bindir}/eurephiadm
%{_datadir}/eurephia/xslt/eurephiadm

%files utils
%defattr(-,root,root,-)
%doc LICENSE.txt CREDITS.txt
%{_bindir}/eurephia_saltdecode
%{_mandir}/man8/eurephia_saltdecode.8.gz

%changelog
* Wed Jun 30 2010 David Sommerseth <dazo@users.sourceforge.net> - 1.0.0-1
- Updated and prepared for the eurephia-1.0.0 release

* Wed Nov 18 2009 David Sommerseth <dazo@users.sourceforge.net> - 0.9.6-1.beta
- Updated for eurephia-0.9.6_beta and using openvpn-2.1_rc21 source tree

* Tue Oct  6 2009 David Sommerseth <dazo@users.sourceforge.net> - 0.9.5-1.beta
- Initial eurephia spec file