CentOS 7 制作openssl 1.1.1w 版本rpm包 —— 筑梦之路

源码下载地址:

https://www.openssl.org/source/openssl-1.1.1w.tar.gz

参考之前的文章:

openssl 1.1.1L /1.1.1o/1.1.1t rpm包制作------筑梦之路_openssl的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/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

安装完成的效果:

相关推荐
wuicer2 小时前
ubuntu 20.04 安装anaconda以及安装spyder
linux·运维·ubuntu
cui__OaO3 小时前
Linux软件编程--线程
linux·开发语言·线程·互斥锁·死锁·信号量·嵌入式学习
小狗爱吃黄桃罐头3 小时前
正点原子【第四期】Linux之驱动开发篇学习笔记-1.1 Linux驱动开发与裸机开发的区别
linux·驱动开发·学习
小晶晶京京4 小时前
day34-LNMP详解
linux·运维·服务器
画个太阳作晴天4 小时前
A12预装app
linux·服务器·前端
fengyehongWorld4 小时前
Linux crontab定时任务
linux·运维
shuangrenlong5 小时前
ubuntu更新chrome版本
linux·chrome·ubuntu
碎像5 小时前
Linux上配置环境变量
linux·运维·服务器
敲上瘾6 小时前
Linux系统cgroups资源精细化控制基础
linux·测试工具·docker·压力测试·cgroups
起个昵称吧6 小时前
线程相关编程、线程间通信、互斥锁
linux·算法