Procedure for creating an RPM package by yourself

Source: Internet
Author: User
The general process of creating an RPM package by yourself is 0. first install the rpm-build toolkit 1 and create the RPM Directory # mkdir ~ in your user directory ~ /Rpm ~ /Rpm/BUILD ~ /Rpm/RPMS ~ /Rpm/RPMS/i386 ~ /Rpm/RPMS/i686 ~ /Rpm/RPMS/noarch ~ /Rpm/SOURCESw...
The general process of creating an RPM package by yourself is 0. first install the rpm-build toolkit 1 and create the RPM Directory # mkdir ~ in your user directory ~ /Rpm ~ /Rpm/BUILD ~ /Rpm/RPMS ~ /Rpm/RPMS/i386 ~ /Rpm/RPMS/i686 ~ /Rpm/RPMS/noarch ~ /Rpm/SOURCES www.2cto.com 2, generate a macro file in the user directory # echo % _ topdir ~ /Rpm>. rpmmacros 3, write spec files (this seems to be automatically generated from other, such as the sample_1.0-src.rpm package) [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}-% {ver Sion).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, start compiling the SPEC file # rpmbuild-ba ~ /Rpm/SPECS/myspec. spec5. After OK, the rpm package to be compiled will be available in the directory of an rpm/RPMS architecture.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.