自己動手製作RPM包的大體流程

來源:互聯網
上載者:User


自己動手製作RPM包的大體流程 0,先安裝rpm-build工具包1,在自己的使用者目錄建立RPM目錄      # mkdir ~/rpm ~/rpm/BUILD ~/rpm/RPMS ~/rpm/RPMS/i386 ~/rpm/RPMS/i686 ~/rpm/RPMS/noarch ~/rpm/SOURCES  www.2cto.com  2,在使用者目錄產生一個宏檔案    #  echo %_topdir               ~/rpm > .rpmmacros 3,編寫spec檔案(這個好像都是從其他例如sample_1.0-src.rpm包中自動產生的)[plain] # This is a sample spec file for wget    %define _topdir     /home/strike/mywget  %define name            wget   %define release     1  %define version     1.12  %define buildroot %{_topdir}/%{name}-%{version}-root      www.2cto.com  BuildRoot:  %{buildroot}  Summary:        GNU wget  License:        GPL  Name:           %{name}  Version:        %{version}  Release:        %{release}  Source:         %{name}-%{version}.tar.gz  Prefix:         /usr  Group:          Development/Tools    %description  The GNU wget program downloads files from the Internet using the command-line.    %prep  %setup -q    %build  ./configure  make    %install  make install prefix=$RPM_BUILD_ROOT/usr    %files    www.2cto.com  %defattr(-,root,root)  /usr/local/bin/wget    %doc %attr(0444,root,root) /usr/local/share/man/man1/wget.1  4,開始編譯SPEC檔案    # rpmbuild -ba ~/rpm/SPECS/myspec.spec5,OK後,會在rpm/RPMS 某個架構的目錄下有你要編譯的rpm包。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.