CentOS 6 制作openssl 1.1.1w rpm包 —— 筑梦之路

参考资料:

CentOS 7 制作openssl 1.1.1w 版本rpm包 ------ 筑梦之路_centos7 openssl 1.1.1 rpm包-CSDN博客

直接上spec文件如下:

bash 复制代码
Name: openssl		
Version: 1.1.1w	
Release: 1%{?dist}
Summary: Utilities from the general purpose cryptography library with TLS implementation	
 
Group: System Environment/Libraries
License: OpenSSL
URL: http://www.openssl.org/
Source0: openssl-%{version}.tar.gz
 
BuildRequires: make, gcc, coreutils, krb5-devel, perl, sed, zlib-devel, perl-WWW-Curl
Requires: coreutils, make
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%global openssldir /usr/local/openssl
 
%description
The OpenSSL toolkit provides support for secure communications between
machines. OpenSSL includes a certificate management tool and shared
libraries which provide various cryptographic algorithms and
protocols.
 
%package devel
Summary: Development files for programs which will use the openssl library
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
 
%description devel
OpenSSL RPM for version 1.1.1w on Centos (development package)
 
 
%prep
%setup -q
 
 
%build
./config --prefix=%{openssldir} --openssldir=%{openssldir} shared -fPIC
make
 
 
%install
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%make_install
 
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_libdir}
ln -sf %{openssldir}/lib/libssl.so.1.1 %{buildroot}%{_libdir}
ln -sf %{openssldir}/lib/libcrypto.so.1.1 %{buildroot}%{_libdir}
ln -sf %{openssldir}/bin/openssl %{buildroot}%{_bindir}
 
 
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
 
%files
%{openssldir}
%defattr(-,root,root)
/usr/bin/openssl
/usr/lib64/libcrypto.so.1.1
/usr/lib64/libssl.so.1.1
 
%files devel
%{openssldir}/include/*
%defattr(-,root,root)
 
%post -p /sbin/ldconfig
 
%postun -p /sbin/ldconfig

说明:rpm包安装后的路径为/usr/loca/openssl

安装过程参考:openssl 1.1.1L /1.1.1o/1.1.1t rpm包制作------筑梦之路_构建openssl1.1.1t rpm包-CSDN博客

安装效果如下:

src包和二进制rpm包见我的资源

相关推荐
七歌杜金房6 小时前
我终于又有了自己的 Linux 电脑
linux·debian·mac
SkyWalking中文站13 小时前
认识 Horizon UI · 5/17:3D 基础设施地图
运维·监控·自动化运维
tntxia1 天前
linux curl命令详解_curl详解
linux
扛枪的书生1 天前
Linux 网络管理器用法速查
linux
SkyWalking中文站1 天前
认识 Horizon UI · 1/17:SkyWalking 新一代可观测性控制台
运维·前端·监控
顺风尿一寸1 天前
Java Socket 内核之旅:从 SocketChannel.read() 到 tcp_recvmsg 与 epoll 的完整调用链路
linux
雪梨酱QAQ2 天前
Kubeneters HA Cluster部署
运维
江华森2 天前
Spring Cloud 微服务全栈实战:从 Eureka 到 Docker Compose 一文贯通
运维
江华森2 天前
Matplotlib 数据绘图基础入门
运维
XIAOHEZIcode2 天前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行