From 75f32099185255706a056584f6f80bb99dc80ba7 Mon Sep 17 00:00:00 2001 From: Zhang zhengguang Date: Tue, 8 Apr 2014 13:48:50 +0800 Subject: [PATCH] Add packaging files --- packaging/openvpn.manifest | 5 ++++ packaging/openvpn.spec | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 packaging/openvpn.manifest create mode 100644 packaging/openvpn.spec diff --git a/packaging/openvpn.manifest b/packaging/openvpn.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/openvpn.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/openvpn.spec b/packaging/openvpn.spec new file mode 100644 index 0000000..797b6e8 --- /dev/null +++ b/packaging/openvpn.spec @@ -0,0 +1,68 @@ +Name: openvpn +Summary: A full-featured SSL VPN solution +Version: 2.3.2 +Release: 0 +Group: Security/Network +License: GPL-2.0 +URL: http://openvpn.net/ +Source0: http://swupdate.openvpn.org/community/releases/%{name}-%{version}.tar.gz +Source1001: openvpn.manifest +BuildRequires: lzo-devel +BuildRequires: openssl-devel +BuildRequires: pam-devel +BuildRequires: iproute2 +Requires: iproute2 + +%description +OpenVPN is a robust and highly flexible tunneling application that uses all +of the encryption, authentication, and certification features of the +OpenSSL library to securely tunnel IP networks over a single UDP or TCP +port. It can use the Marcus Franz Xaver Johannes Oberhumer's LZO library +for compression. + +%prep +%setup -q +cp %{SOURCE1001} . + +%build +export CFLAGS +export LDFLAGS +%configure --disable-static \ + --enable-pthread \ + --enable-password-save \ + --enable-iproute2 \ + --with-ifconfig-path=/sbin/ifconfig \ + --with-iproute-path=/sbin/ip \ + --with-route-path=/sbin/route \ + CFLAGS="$CFLAGS -fPIE" \ + LDFLAGS="$LDFLAGS -pie" + +make %{?jobs:-j%jobs} + +%install +%make_install +install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} + +chmod -x sample/sample-scripts/* +chmod -x sample/sample-config-files/* +chmod -x contrib/openvpn-fwmarkroute-1.00/* + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%manifest %{name}.manifest +%defattr(-,root,root) +%license COPYING +%doc AUTHORS ChangeLog PORTS +%doc contrib sample/sample-keys sample/sample-scripts sample/sample-config-files +%{_mandir}/man8/%{name}.8* +%{_datadir}/doc/%{name}/ +%{_sbindir}/%{name} +%{_libdir}/%{name}/ +%config %dir %{_sysconfdir}/%{name}/ +%{_includedir}/%{name}-plugin.h +%exclude %{_datadir}/doc/%{name}/COPYING + +%changelog -- 2.7.4