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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 220061 - (hide annotations) (download)
Tue Mar 6 10:05:03 2012 UTC (7 years, 6 months ago) by tmb
Original Path: cauldron/ipsec-tools/current/SPECS/ipsec-tools.spec
File size: 5535 byte(s)
- rediff patches: P0, P1, P3, P103, P104, P111
- drop merged patches: P2, P105, P106, P109, P110, P113


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

  ViewVC Help
Powered by ViewVC 1.1.26