作家
登录

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

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

  • Vendor:         Xiph.org Foundation team@icecast.org 
  • Source:         http://downloads.us.xiph.org/releases/icecast/%{name}-%{version}.tar.gz 
  • Prefix:         %{_prefix} 
  • Packager:   Karthik 
  • BuildRoot:      %{_tmppath}/%{name}-root 
  •  
  • %description 
  • Icecast is a streaming media server which currently supports Ogg Vorbisand MP3 audio streams. It can be used to create an Internet radio 
  • station or a privately running jukebox and many things in between
  • It is very versatile in that new formats can be added relatively 
  • easily and supports open standards for commuincation and interaction. 
  •  
  • %prep 
  • %setup -q -n %{name}-%{version} 
  •  
  • %build 
  • CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --mandir=%{_mandir} --sysconfdir=/etc 
  •  
  • make 
  •  
  • %install 
  • "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT 
  •  
  • make DESTDIR=$RPM_BUILD_ROOT install 
  • rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name
  •  
  • %clean 
  • "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT 
  •  
  • %files 
  • %defattr(-,root,root) 
  • %doc README AUTHORS COPYING NEWS TODO ChangeLog 
  • %doc doc/*.html 
  • %doc doc/*.jpg 
  • %doc doc/*.css 
  • %config(noWordStr) /etc/%{name}.xml 
  • %{_bindir}/icecast 
  • %{_prefix}/share/icecast/* 
  •  
  • %changelog 
  •  
  • In this file, under % prep section you may noticed the macro “%setup -q -n %{name}-%{version}”. This macro executes the following command in the background. 
  •  
  • cd /usr/src/redhat/BUILD 
  • rm -rf icecast 
  • gzip -dc /usr/src/redhat/SOURCES/icecast-2.3.3.tar.gz | tar -xvvf - 

      推荐阅读

      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)