-
Notifications
You must be signed in to change notification settings - Fork 0
/
openiked.spec
119 lines (99 loc) · 3.66 KB
/
openiked.spec
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
#
# spec file for package openiked
#
# Copyright (c) 2022-2024 Alexander Naumov <[email protected]>
#
# 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 https://bugs.opensuse.org/
#
Name: openiked
Version: 7.3
Release: 0
Summary: Internet Key Exchange version 2 (IKEv2) daemon
Group: Productivity/Networking/Security
License: ISC
URL: https://github.com/openiked/openiked-portable
Source: %{name}-portable-%{version}.tar.xz
Source1: openiked.service
Source2: openiked-keygen.service
Source3: openiked-keygen.target
Source4: openiked-keygen
BuildRequires: make
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libopenssl-devel
BuildRequires: bison
BuildRequires: libevent-devel
BuildRequires: systemd-devel
%description
OpenIKED is a FREE implementation of the Internet Key Exchange (IKEv2)
protocol which performs mutual authentication and which establishes and
maintains IPsec VPN security policies and associations (SAs) between peers.
%prep
%setup -n %{name}-portable-%{version}
%build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
%install
cd build
make install DESTDIR=%buildroot
mkdir -p %{buildroot}/etc
mkdir -p %{buildroot}/etc/ssl/
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}/var/empty
mkdir -p %{buildroot}%{_sysconfdir}/iked/private/
mkdir -p %{buildroot}/usr/libexec/openiked
mv %{buildroot}/usr/local/sbin/iked %{buildroot}%{_sbindir}/iked
mv %{buildroot}/usr/local/sbin/ikectl %{buildroot}%{_sbindir}/ikectl
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/openiked.service
install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/openiked-keygen.service
install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/openiked-keygen.target
install -D -m 0644 %{SOURCE4} %{buildroot}/usr/libexec/openiked/openiked-keygen
#groupadd _iked
#useradd -M -d /var/empty -s $(which nologin) -c "IKEv2 Daemon" -g _iked _iked
%pre
%service_add_pre openiked.service
%service_add_pre openiked-keygen.service
%service_add_pre openiked-keygen.target
%preun
%service_del_preun openiked.service
%service_del_preun openiked-keygen.service
%service_del_preun openiked-keygen.target
%postun
%service_del_postun openiked.service
%service_del_postun openiked-keygen.service
%service_del_postun openiked-keygen.target
%post
%service_add_post openiked.service
%service_add_post openiked-keygen.service
%service_add_post openiked-keygen.target
%files
%defattr(-,root,root)
%config /etc/iked.conf
%config /etc/ssl/ikeca.cnf
%config /etc/ssl/ikex509v3.cnf
%attr(555,root,root) %{_sbindir}/ikectl
%attr(555,root,root) %{_sbindir}/iked
%attr(0755,root,root) %{_sysconfdir}/iked/
%attr(0644,root,root) %{_unitdir}/openiked.service
%attr(0644,root,root) %{_unitdir}/openiked-keygen.service
%attr(0644,root,root) %{_unitdir}/openiked-keygen.target
%attr(0700,root,root) /var/empty
%attr(0700,root,root) /usr/libexec/
%attr(0700,root,root) /usr/libexec/openiked/
%attr(0744,root,root) /usr/libexec/openiked/openiked-keygen
%{_mandir}/man5/iked.conf.5.gz
%{_mandir}/man8/ikectl.8.gz
%{_mandir}/man8/iked.8.gz
%license LICENSE
%changelog