记录日常工作关于系统运维,虚拟化云计算,数据库,网络安全等各方面问题。
 
0

打包libhtp文件为rpm

发表者:admin分类:应用服务2022-03-12 19:42:15 阅读[557]

打包libhtp文件为rpm

1. 压缩源代码

tar zcvf libhtp-0.5.33.tgz ./libhtp/

2. 准备配置文件

 cat SPECS/libhtp.spec 
Name:           libhtp
Version:        0.5.33
Release:        1%{?dist}
Summary:        libhtp
License:        GPL
Source0:        %{name}-%{version}.tgz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
#BuildArch: noarch

Requires:       glibc

%description
The netmap driver with adapted network interface drivers e1000e, i40e, igb,
ixgbe, ixgbevf for CentOS/EL/SL 7 prepared for Cherenkov Telescope Array
by Julien Houles and Dirk Hoffmann -CPPM-.


%prep
%setup -q
#rm -rf %{name}


%build
pwd
#cd %{buildroot}
%configure
make %{?_smp_mflags}


%install
make install DESTDIR=%{buildroot}

%files
%defattr(-,root,root,-)
%doc
%{_includedir}/*
%{_libdir}/*
%define __debug_install_post   \
   %{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\
%{nil}
%changelog

三 目录信息

 ll rpmbuild/
total 0
drwxr-xr-x 4 root root 41 Nov  4 16:33 BUILD
drwxr-xr-x 2 root root  6 Nov  4 16:34 BUILDROOT
drwxr-xr-x 3 root root 20 Nov  4 16:34 RPMS
drwxr-xr-x 2 root root 61 Nov  4 16:23 SOURCES
drwxr-xr-x 2 root root 45 Nov  4 16:33 SPECS
drwxr-xr-x 2 root root 48 Nov  4 16:34 SRPMS
[root@localhost ~]# 

也可以用下面打包命令自动生成

四打包工具安装

yum -y install rpm-build

五打包

rpmbuild -ba ./SPECS/libhtp.spec

六 参考

https://www.cnblogs.com/dyh004/p/10370709.html



转载请标明出处【打包libhtp文件为rpm】。

《www.micoder.cc》 虚拟化云计算,系统运维,安全技术服务.

网站已经关闭评论