📄 openswan.spec
字号:
Summary: Openswan IPSEC implementationName: openswanVersion: 2.0x_cvs%define defkv %(rpm -q --qf='%{Version}-%{Release}\\n' kernel-source|tail -1)# The default kernel version to build for is the latest of# the installed kernel-source RPMs.# This can be overridden by "--define 'kversion x.x.x-y.y.y'"%{!?kversion: %{expand: %%define kversion %defkv}}%define krelver %(echo %{kversion} | tr -s '-' '_')# Openswan -pre/-rc nomenclature has to co-exist with hyphen paranoia%define srcpkgver %(echo %{version} | tr -s '_' '-')%define ourrelease 1fs%define debug_package %{nil}Release: %{ourrelease}License: GPLUrl: http://www.openswan.org/Source: openswanswan-%{srcpkgver}.tar.gzGroup: System Environment/DaemonsBuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root%define __spec_install_post /usr/lib/rpm/brp-compress || :BuildRequires: kernel-source = %{kversion}%package userlandSummary: Openswan IPSEC usermod toolsGroup: System Environment/DaemonsProvides: ipsec-userlandObsoletes: freeswan superfreeswan super-freeswanRequires: ipsec-kernelRelease: %{ourrelease}%package docSummary: Openswan IPSEC full documentationGroup: System Environment/DaemonsRelease: %{ourrelease}%package klipsSummary: Openswan kernel moduleGroup: System Environment/KernelRelease: %{krelver}-%{ourrelease}Provides: ipsec-kernelRequires: kernel = %{kversion}# do not make the dependancy circular for now.#Requires: ipsec-userland%description userlandOpenswan is a free implementation of IPSEC & IKE for Linux. IPSEC is the Internet Protocol Security and uses strong cryptography to provideboth authentication and encryption services. These services allow youto build secure tunnels through untrusted networks. Everything passingthrough the untrusted net is encrypted by the ipsec gateway machine and decrypted by the gateway at the other end of the tunnel. The resultingtunnel is a virtual private network or VPN.This package contains the daemons and userland tools for setting upOpenswan on a freeswan enabled kernel.%description klipsThis package contains only the ipsec module for the RedHat series of kernels.%description docThis package contains extensive documentation of the Openswan IPSECsystem.%descriptionA dummy package that installs userland and kernel pieces.%prep%setup -q -n openswan-%{srcpkgver}%build%{__make} \ USERCOMPILE="-g %{optflags}" \ INC_USRLOCAL=%{_prefix} \ MANTREE=%{_mandir} \ INC_RCDEFAULT=%{_initrddir} \ programsFS=$(pwd)mkdir -p BUILD.%{_target_cpu}mkdir -p BUILD.%{_target_cpu}-smpcd packaging/redhatfor smp in -smp ""do%{__make} -C $FS MODBUILDDIR=$FS/BUILD.%{_target_cpu}$smp \ OPENSWANSRCDIR=$FS \ KERNELSRC=/usr/src/linux-%{kversion} \ ARCH=%{_arch} \ SUBARCH=%{_arch} \ MODULE_DEF_INCLUDE=$FS/packaging/redhat/config-%{_target_cpu}$smp.h \ moduledone%install%{__make} \ DESTDIR=%{buildroot} \ INC_USRLOCAL=%{_prefix} \ MANTREE=%{buildroot}%{_mandir} \ INC_RCDEFAULT=%{_initrddir} \ installinstall -d -m700 %{buildroot}%{_localstatedir}/run/plutoinstall -d %{buildroot}%{_sbindir}mkdir -p %{buildroot}/lib/modules/%{kversion}/kernel/net/ipseccp BUILD.%{_target_cpu}/ipsec.o \ %{buildroot}/lib/modules/%{kversion}/kernel/net/ipsecmkdir -p %{buildroot}/lib/modules/%{kversion}smp/kernel/net/ipseccp BUILD.%{_target_cpu}-smp/ipsec.o \ %{buildroot}/lib/modules/%{kversion}smp/kernel/net/ipsec%cleanrm -rf ${RPM_BUILD_ROOT}%files doc%defattr(-,root,root)%doc doc%doc %{_defaultdocdir}/openswan/ipsec.conf-sample%files userland%defattr(-,root,root)%doc BUGS CHANGES COPYING%doc CREDITS INSTALL README%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*%config(noreplace) %{_initrddir}/ipsec%{_libdir}/ipsec%{_sbindir}/ipsec%{_libexecdir}/ipsec%doc %{_mandir}/*/*%{_localstatedir}/run/pluto%files module%defattr (-,root,root)/lib/modules/%{kversion}/kernel/net/ipsec/lib/modules/%{kversion}smp/kernel/net/ipsec%pre userland%preun userlandif [ $1 = 0 ]; then /sbin/service ipsec stop || : /sbin/chkconfig --del ipsecfi%postun userlandif [ $1 -ge 1 ] ; then /sbin/service ipsec stop 2>&1 > /dev/null && /sbin/service ipsec start 2>&1 > /dev/null || :fi%postun module%post module%post userlandchkconfig --add ipsec%changelog* Sun Sep 5 2004 Paul Wouters <paul@xelerance.com>- Updated for openswan* Fri Aug 22 2003 Sam Sgro <sam@freeswan.org>- Juggling release/source package names to allow for -pre/-rc releases to build.* Thu Aug 14 2003 Sam Sgro <sam@freeswan.org>- Reverting back to pre-x.509 version, cosmetic changes.* Tue May 20 2003 Charlie Brady <charlieb@e-smith.com> 2.0.0-x509_1.3.2_2es- Add "Obsoletes: freeswan" to userland RPM.* Fri May 16 2003 Charlie Brady <charlieb@e-smith.com> 2.0.0-x509_1.3.2_1es- Add version 1.3.2 of the x509 patch.- Add missing /usr/libexec/ipsec dir and files.- Minor tidy up of spec file.* Thu May 15 2003 Charlie Brady <charlieb@e-smith.com> 2.0.0-1es- Based on work by Paul Lahaie of Steamballoon, Michael Richardson of freeS/WAN team and Tuomo Soini <tis@foobar.fi>.- Build freeswan RPMs from a single source RPM, for RedHat, but should work on any RPM based system.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -