CentOS rpm的spec简单模板

Name:           myapp
Version:        0.1.0
Release:        1%{?dist}
Summary:        my first rpm


Group:          Applications/Databases
License:        GPL
URL:            http://blog.csdn.net/joyjj0218
Source0:        %{name}-%{version}.tar.gz
BuildRoot:      %{_topdir}/BUILDROOT 

%description

%prep
%setup -q

%build
make all

%install
rm -rf $RPM_BUILD_ROOT/*
#make install DESTDIR=$RPM_BUILD_ROOT
cp -a MyApp $RPM_BUILD_ROOT

%clean
#rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc
/MyApp

%changelog
* Wed Dec 30 2015 xiao2 0.1.0
- Building first rpm from rpmbuild

你可能感兴趣的:(linux)