Spec's simplest demo

Source: Internet
Author: User


[Email protected] specs]# pwd

/usr/src/redhat/specs

[[email protected] specs]# ls

Demo.spec Sadmin.spec

[Email protected] specs]# more Demo.spec

Summary:test Package for Linuxfly Webblog

Name:suite

version:1.0.0

Release:1

License:gpl

Group:system

Source:demo.tar.gz

BuildRoot:%{_tmppath}/%{name}-%{version}-%{release}-root

url:http://www.linuxfly.org

Packager:linuxing

Prefix:%{_prefix}

Prefix:%{_sysconfdir}

%define Userpath/var/www/html/demo

%description

Just a test rpm suite.

%prep

%setup-c

%install

install-d $RPM _build_root%{userpath}

Note: This is equivalent to mkdir

CP-A * $RPM _build_root%{userpath}

Note: From the back, you can see that this is the directory after installation

%clean

%files

%defattr (-,root,root)

%{userpath}


[Email protected] specs]# pwd

/usr/src/redhat/specs

[Email protected] specs]# RPMBUILD-BB Demo.spec


[Email protected] x86_64]# RPM-IVH suite-1.0.0-1.x86_64.rpm

Preparing ... ################################# [100%]

Updating/installing ...

1:suite-1.0.0-1 ################################# [100%]

Spec's simplest demo

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.