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

  ViewVC Help
Powered by ViewVC 1.1.26