美文网首页
打包libhtp文件为rpm

打包libhtp文件为rpm

作者: 明翼 | 来源:发表于2020-11-04 16:43 被阅读0次

    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

          本文链接:https://www.haomeiwen.com/subject/febgvktx.html