OpenVPN - 从源码构建openvpn的rpm包步骤(未完待续)
2024-01-08 04:44:43
centos安装rpm-build
yum install -y rpm-build
从openvpn官网下载源码:我以下载openvpn-2.5.8.tar.gz为例
参考网址:https://openvpn.net/community-resources/installing-openvpn/
openvpn-2.5.8.tar.gz放置在rpmbuild/SOURCES路径下
目录如下:
[root@localhost ~]# tree -L 2 rpmbuild/
rpmbuild/
├── BUILD
│???└── openvpn-2.5.8
├── BUILDROOT
│???└── openvpn-2.5.8-1.x86_64
├── RPMS
├── SOURCES
│???└── openvpn-2.5.8.tar.gz
├── SPECS
└── SRPMS编写spec文件
[root@localhost ~]# cat openvpn.spec?
Name: ? ? ? ? ? openvpn
Version: ? ? ? ?2.5.8
Release: ? ? ? ?1
Summary: ? ? ? ?An easy-to-use, robust, and highly configurable VPN
License: ? ? ? ?GPL
URL: ? ? ? ? ? ?https://openvpn.net/
Source0: ? ? ? ?%{name}-%{version}.tar.gz
BuildRequires: ?openssl-devel
BuildRequires: ?lzo-devel
BuildRequires: ?pam-devel
%description
OpenVPN is an open source software application that implements virtual private network (VPN) techniques for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities.
%prep
%setup -q
%build
./configure
make
%install
make install DESTDIR=%{buildroot}
%files
%defattr(-,root,root,-)
%doc
%changelog
* Mon May 31 2021 John Doe <john.doe@example.com> 2.5.8-1
- Initial build
安装依赖:
yum install -y openssl-devel lzo-devel pam-devel
yum install gcc
开始构建rpm:
rpmbuild -bb openvpn.spec?
文章来源:https://blog.csdn.net/xuezhangjun0121/article/details/135393874
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!