[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