作家
登录

如何在CentOS/RedHat下,实现根据源码包创建rpm包

作者: 来源: 2017-11-21 11:20:44 阅读 我要评论

  • %files –这个块包含了这个包的一系列文件。不在此块中的文件将弗采取。请求是完全的路径,并且在此块中你可以设置文件的属性和权限。
  • %clean – 这个块是为了清理那些不是应用正常创建区域的其他文件。举个例子来说:如不雅应用在创建过程中在/tmp目次下创建了一个临时目次构造,它将不会被移除;然则如不雅在该块中定义了,那么在精确安装后临时目次将被移除。
  • 下面是icecast.spec文件

    创建二进制包文件

    1. # cd /root/rpmbuild/SPECS# rpmbuild -ba icecast.specExecuting(%prep): /bin/sh -e /var/tmp/rpm-tmp.Kohe4t 
    2. + umask 022 
    3. + cd /root/rpmbuild/BUILD 
    4. + cd /root/rpmbuild/BUILD 
    5. + rm -rf icecast-2.3.3 
    6. + /usr/bin/gzip -dc /root/rpmbuild/SOURCES/icecast-2.3.3.tar.gz 
    7. + /bin/tar -xf - 
    8. + STATUS=0 
    9. '[' 0 -ne 0 ']'+ cd icecast-2.3.3 
    10. + /bin/chmod -Rf a+rX,u+w,g-w,o-w . 
    11. + exit 0 
    12. Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.ynm7H7 
    13. + umask 022 
    14. + cd /root/rpmbuild/BUILD 
    15. + cd icecast-2.3.3 
    16. + CFLAGS='-O2 -g'+ ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc 
    17. checking for a BSD-compatible install... /usr/bin/install -c 
    18. checking whether build environment is sane... yes 
    19. checking for a thread-safe mkdir -p... /bin/mkdir -p 
    20. checking for gawk... gawk 
    21. checking whether make sets $(MAKE)... yes 
    22. checking whether to enable maintainer-specific portions of Makefiles... no 
    23. checking for gcc... gcc 
    24. .. 
    25. .. 
    26. .. 
    27. Wrote: /root/rpmbuild/SRPMS/icecast-2.3.3-0.src.rpm 
    28. Wrote: /root/rpmbuild/RPMS/x86_64/icecast-2.3.3-0.x86_64.rpm 
    29. Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.dzahrv 
    30. + umask 022 
    31. + cd /root/rpmbuild/BUILD 
    32. + cd icecast-2.3.3 
    33. '[' /root/rpmbuild/BUILDROOT/icecast-2.3.3-0.x86_64 '!=' / ']'+ rm -rf /root/rpmbuild/BUILDROOT/icecast-2.3.3-0.x86_64 
    34. + exit 0 
    1. # cat /root/rpmbuild/SPECS/icecast.specName:           icecast 
    2. Version:        2.3.3Release:        0Summary:        Xiph Streaming media server that supports multiple formats. 
    3. Group:          Applications/Multimedia 
    4. License:        GPL 
    5. URL:            http://www.icecast.org/ 

        推荐阅读

        Python运维中20个常用的库和模块,总有一个用的到~

      Tech Neo技巧沙龙 | 11月25号,九州云/ZStack与您一路商量云时代收集界线治理实践20、func,为解决集群治理,监控问题需设计开辟的体系治理基本框架。 1、psutil是一个跨平台库(https://g>>>详细阅读


      本文标题:如何在CentOS/RedHat下,实现根据源码包创建rpm包

      地址:http://www.17bianji.com/lsqh/39073.html

    关键词: 探索发现

    乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

    网友点评
    自媒体专栏

    评论

    热度

    精彩导读
    栏目ID=71的表不存在(操作类型=0)