/[packages]/updates/5/ipsec-tools/current/SPECS/ipsec-tools.spec
ViewVC logotype

Contents of /updates/5/ipsec-tools/current/SPECS/ipsec-tools.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 746428 - (show annotations) (download)
Wed Oct 15 01:51:31 2014 UTC (4 years, 9 months ago) by umeabot
Original Path: cauldron/ipsec-tools/current/SPECS/ipsec-tools.spec
File size: 5464 byte(s)
Second Mageia 5 Mass Rebuild
1 %define LIBMAJ 0
2 %define libname %mklibname ipsec %LIBMAJ
3 %define libnamedev %mklibname -d ipsec
4
5 Name: ipsec-tools
6 Version: 0.8.1
7 Release: %mkrel 4
8 Summary: Tools for configuring and using IPSEC
9 License: BSD
10 Group: Networking/Other
11 URL: http://ipsec-tools.sourceforge.net/
12 Source: http://prdownloads.sourceforge.net/ipsec-tools/ipsec-tools-%{version}.tar.bz2
13 Source3: racoon.conf
14 Source4: psk.txt
15 Source6: ipsec-setkey-initscript
16 Source7: racoon-initscript
17 Source8: racoon.sysconfig
18 Patch0: ipsec-tools-0.8.0-manfix.patch
19 Patch1: ipsec-tools-0.8.1-includes.patch
20 Patch3: ipsec-tools-0.8.0-link.patch
21 # Fedora patches
22 Patch103: ipsec-tools-0.8.0-acquires.patch
23 Patch104: ipsec-tools-0.8.0-loopback.patch
24 Patch105: ipsec-tools-0.8.0-build.patch
25 # the following patches were also submitted upstream:
26 Patch111: ipsec-tools-0.8.0-pie.patch
27 BuildRequires: openssl-devel
28 BuildRequires: krb5-devel
29 BuildRequires: flex
30 BuildRequires: bison
31 BuildRequires: libpam-devel
32 Requires: %{libname} = %{version}
33 Requires(pre): rpm-helper
34 Requires: rpm-helper
35 Provides: kvpnc-backend
36
37 %description
38 This is the IPsec-Tools package. You need this package in order to
39 really use the IPsec functionality in the linux-2.6 and above kernels.
40 This package builds:
41
42 - libipsec, a PFKeyV2 library
43 - setkey, a program to directly manipulate policies and SAs
44 - racoon, an IKEv1 keying daemon
45
46 %define old_libname %mklibname ipsec-tools 0
47 %define old_libname_devel %mklibname -d ipsec 0
48
49 %package -n %{libname}
50 Summary: The shared libraries used by ipsec-tools
51 Group: System/Libraries
52 Requires(post): grep, coreutils
53 Requires(preun): grep, coreutils
54 Requires: grep, coreutils
55 Provides: libipsec = %{version}-%{release}
56 Provides: libipsec-tools = %{version}-%{release}
57 Obsoletes: libipsec-tools
58 Provides: %old_libname = %{version}-%{release}
59 Obsoletes: %old_libname
60
61 %description -n %{libname}
62 These are the shared libraries for the IPsec-Tools package.
63
64 %package -n %{libnamedev}
65 Summary: Headers for programs for %libname
66 Group: Development/C
67 Requires: %{libname} = %{version}
68 Provides: libipsec-tools-devel = %{version}-%{release}
69 Provides: libipsec-devel = %{version}-%{release}
70 Obsoletes: libipsec-tools-devel
71 Provides: %{old_libname}-devel = %{version}-%{release}
72 Obsoletes: %{old_libname}-devel
73 Obsoletes: %{old_libname_devel} < 0.7
74
75
76 %description -n %{libnamedev}
77 These are development headers for libipsec
78
79 %prep
80 %setup -q
81 %patch0 -p1 -b .manfix
82 %patch1 -p1 -b .includes
83 %patch3 -p1 -b .link
84 %patch103 -p1 -b .acquires
85 %patch104 -p1 -b .loopback
86 %patch105 -p1 -b .build
87 %patch111 -p1 -b .pie
88
89 sed -i 's|-Werror||g' configure*
90
91
92 %build
93 ./bootstrap
94 %configure2_5x \
95 --prefix=%{_prefix} \
96 --mandir=%{_mandir} \
97 --libdir=/%{_lib} \
98 --sbindir=/sbin \
99 --localstatedir=%{_localstatedir}/lib \
100 --sysconfdir=%{_sysconfdir}/racoon \
101 --with-kernel-headers=%{_includedir} \
102 --enable-shared \
103 --disable-rpath \
104 --enable-hybrid \
105 --enable-frag \
106 --enable-dpd \
107 --enable-adminport \
108 --enable-gssapi \
109 --enable-natt \
110 --with-libpam \
111 --enable-security-context=no \
112 --disable-audit
113 make
114
115 %install
116 %makeinstall_std
117
118 mkdir -p $RPM_BUILD_ROOT/etc/racoon/
119
120 install -m 0600 %{SOURCE3} $RPM_BUILD_ROOT/etc/racoon/racoon.conf
121 install -m 0600 %{SOURCE4} $RPM_BUILD_ROOT/etc/racoon/psk.txt
122 mkdir -m 0700 -p $RPM_BUILD_ROOT/etc/racoon/certs
123
124 mkdir -p $RPM_BUILD_ROOT/%{_initrddir}
125 install -m 0755 %{SOURCE6} $RPM_BUILD_ROOT/%{_initrddir}/ipsec-setkey
126 install -m 0755 %{SOURCE7} $RPM_BUILD_ROOT/%{_initrddir}/racoon
127
128 mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
129 # racoon.sysconfig
130 install -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/racoon
131
132 # pam file
133 mkdir -p %{buildroot}%{_sysconfdir}/pam.d
134 cat > %{buildroot}%{_sysconfdir}/pam.d/racoon <<EOF
135 #%PAM-1.0
136 auth required pam_nologin.so
137 auth include system-auth
138 account include system-auth
139 EOF
140
141 # default ipsec.conf file
142 cat > %{buildroot}%{_sysconfdir}/ipsec.conf <<EOF
143 #!/usr/sbin/setkey -f
144 #
145 # File /etc/ipsec.conf
146
147 # delete the SAD and SPD
148 flush;
149 spdflush;
150
151 # Define here your security policies
152
153 # Example
154 # ipsec between two machines: 192.168.1.10 and 192.168.1.20
155 #
156 # spdadd 192.168.1.10 192.168.1.20 any -P in ipsec
157 # esp/transport//require
158 # ah/transport//require;
159 #
160 # spdadd 192.168.1.20 192.168.1.10 any -P out ipsec
161 # esp/transport//require
162 # ah/transport//require;
163
164 EOF
165
166 # remove some files from the sample dir so we can include it
167 # in %%doc. Also fix their permissions
168 rm -f src/racoon/samples/*.in
169 find src/racoon/samples -type f -exec chmod 0644 {} \;
170
171 %post
172 %_post_service ipsec-setkey
173 %_post_service racoon
174
175 %preun
176 %_preun_service ipsec-setkey
177 %_preun_service racoon
178
179 %files
180 %doc ChangeLog NEWS README
181 %doc src/racoon/samples
182 %doc src/racoon/doc/*
183 /sbin/*
184 %{_mandir}/man*/*
185 %dir %{_sysconfdir}/racoon
186 %dir %{_sysconfdir}/racoon/certs
187 %config(noreplace) %{_sysconfdir}/sysconfig/racoon
188 %config(noreplace) %{_sysconfdir}/racoon/psk.txt
189 %config(noreplace) %{_sysconfdir}/racoon/racoon.conf
190 %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/ipsec.conf
191 %config(noreplace) %{_sysconfdir}/pam.d/racoon
192 %attr (0755,root,root) %{_initrddir}/ipsec-setkey
193 %attr (0755,root,root) %{_initrddir}/racoon
194 %dir /var/lib/racoon
195
196 %files -n %{libname}
197 %doc ChangeLog NEWS README
198 /%{_lib}/*.so.*
199
200 %files -n %{libnamedev}
201 /%{_lib}/libipsec.la
202 /%{_lib}/libipsec.a
203 /%{_lib}/libipsec.so
204 /%{_lib}/libracoon.la
205 /%{_lib}/libracoon.a
206 /%{_lib}/libracoon.so
207 %{_includedir}/*

  ViewVC Help
Powered by ViewVC 1.1.26