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包见我的资源

相关推荐
xingzhemengyou13 分钟前
Linux who指令查询和显示当前登录系统的用户信息
linux·服务器·网络
殷忆枫4 分钟前
Ubuntu搭建mosquitto服务器(MQTT服务器)
运维·服务器
恒创科技HK5 分钟前
香港服务器为何需要IPMI?好用吗
运维·服务器·网络
wadesir6 分钟前
Linux MySQL Sysbench一键部署与压测实战教程
linux·mysql·adb
米高梅狮子8 分钟前
6. Linux 硬盘分区管理
linux·运维·服务器
食咗未16 分钟前
Linux lrzsz文件传输工具的使用
linux·测试工具
HalvmånEver18 分钟前
Linux:基于匿名管道创建出简易进程池(进程间通信五)
linux·运维·服务器·c++·进程池·管道pipe
工程师老罗19 分钟前
龙芯2k0300 U盘烧录Linux系统,从Ubuntu到PMON自动启动
linux·运维·ubuntu
DeepFlow 零侵扰全栈可观测25 分钟前
民生银行云原生业务的 eBPF 可观测性建设实践
运维·开发语言·分布式·云原生·金融·php
梦想的旅途230 分钟前
关于企业微信外部群主动调用的RPA技术实现
运维·自动化