/[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 339210 - (hide annotations) (download)
Sat Jan 5 18:39:38 2013 UTC (6 years, 9 months ago) by cjw
Original Path: cauldron/ipsec-tools/current/SPECS/ipsec-tools.spec
File size: 5547 byte(s)
- patch4: fix build with automake 1.13

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 cjw 339210 Release: %mkrel 2
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 cjw 339210 Patch4: ipsec-tools-0.8.0-automake-1.13.patch
22 kharec 3447 # Fedora patches
23 tmb 220061 Patch103: ipsec-tools-0.8.0-acquires.patch
24     Patch104: ipsec-tools-0.8.0-loopback.patch
25 tmb 220066 Patch105: ipsec-tools-0.8.0-build.patch
26 kharec 3447 # the following patches were also submitted upstream:
27 tmb 220061 Patch111: ipsec-tools-0.8.0-pie.patch
28 kharec 3447 BuildRequires: openssl-devel krb5-devel flex bison
29     BuildRequires: libpam-devel
30     Requires: %{libname} = %{version}
31     Requires(pre): rpm-helper
32     Requires: rpm-helper
33     Provides: kvpnc-backend
34    
35     %description
36     This is the IPsec-Tools package. You need this package in order to
37     really use the IPsec functionality in the linux-2.6 and above kernels.
38     This package builds:
39    
40     - libipsec, a PFKeyV2 library
41     - setkey, a program to directly manipulate policies and SAs
42     - racoon, an IKEv1 keying daemon
43    
44     %define old_libname %mklibname ipsec-tools 0
45     %define old_libname_devel %mklibname -d ipsec 0
46    
47     %package -n %{libname}
48     Summary: The shared libraries used by ipsec-tools
49     Group: System/Libraries
50     Requires(post): grep, coreutils
51     Requires(preun): grep, coreutils
52     Requires: grep, coreutils
53     Provides: libipsec = %{version}-%{release}
54     Provides: libipsec-tools = %{version}-%{release}
55     Obsoletes: libipsec-tools
56     Provides: %old_libname = %{version}-%{release}
57     Obsoletes: %old_libname
58    
59     %description -n %{libname}
60     These are the shared libraries for the IPsec-Tools package.
61    
62     %package -n %{libnamedev}
63     Summary: Headers for programs for %libname
64     Group: Development/C
65     Requires: %{libname} = %{version}
66     Provides: libipsec-tools-devel = %{version}-%{release}
67     Provides: libipsec-devel = %{version}-%{release}
68     Obsoletes: libipsec-tools-devel
69     Provides: %{old_libname}-devel = %{version}-%{release}
70     Obsoletes: %{old_libname}-devel
71     Obsoletes: %{old_libname_devel} < 0.7
72    
73    
74     %description -n %{libnamedev}
75     These are development headers for libipsec
76    
77     %prep
78     %setup -q
79     %patch0 -p1 -b .manfix
80     %patch1 -p1 -b .includes
81 tmb 220063 %patch3 -p1 -b .link
82 cjw 339210 %patch4 -p1 -b .automake-1_13
83 kharec 3447 %patch103 -p1 -b .acquires
84     %patch104 -p1 -b .loopback
85 tmb 220066 %patch105 -p1 -b .build
86 kharec 3447 %patch111 -p1 -b .pie
87    
88     sed -i 's|-Werror||g' configure*
89    
90    
91     %build
92     ./bootstrap
93     %configure2_5x \
94     --prefix=%{_prefix} \
95     --mandir=%{_mandir} \
96     --libdir=/%{_lib} \
97     --sbindir=/sbin \
98     --localstatedir=%{_localstatedir}/lib \
99     --sysconfdir=%{_sysconfdir}/racoon \
100     --with-kernel-headers=%{_includedir} \
101     --enable-shared \
102     --disable-rpath \
103     --enable-hybrid \
104     --enable-frag \
105     --enable-dpd \
106     --enable-adminport \
107     --enable-gssapi \
108     --enable-natt \
109     --with-libpam \
110     --enable-security-context=no \
111     --disable-audit
112     make
113    
114     %install
115     rm -rf $RPM_BUILD_ROOT
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     %clean
172     rm -rf $RPM_BUILD_ROOT
173    
174     %post
175     %_post_service ipsec-setkey
176     %_post_service racoon
177    
178     %preun
179     %_preun_service ipsec-setkey
180     %_preun_service racoon
181    
182     %files
183     %doc ChangeLog NEWS README
184     %doc src/racoon/samples
185     %doc src/racoon/doc/*
186     /sbin/*
187     %{_mandir}/man*/*
188     %dir %{_sysconfdir}/racoon
189     %dir %{_sysconfdir}/racoon/certs
190     %config(noreplace) %{_sysconfdir}/sysconfig/racoon
191     %config(noreplace) %{_sysconfdir}/racoon/psk.txt
192     %config(noreplace) %{_sysconfdir}/racoon/racoon.conf
193     %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/ipsec.conf
194     %config(noreplace) %{_sysconfdir}/pam.d/racoon
195     %attr (0755,root,root) %{_initrddir}/ipsec-setkey
196     %attr (0755,root,root) %{_initrddir}/racoon
197     %dir /var/lib/racoon
198    
199     %files -n %{libname}
200     %doc ChangeLog NEWS README
201     /%{_lib}/*.so.*
202    
203     %files -n %{libnamedev}
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}/*

  ViewVC Help
Powered by ViewVC 1.1.26