rpmbuild製作rpm包入門

一個簡單的nginx.spec文件。(純粹的理解spec文件的意思,製作出來的rpm包不能正常使用)

[root@www nginx]# cat nginx.spec 
Name:           nginx
Version:        1.2.9 
Release:        1%{?dist}
Summary:        nginx-server web

Group:          Applications/Archiving
License:        GPL
URL:            https://www.nginx.org
Source0:        http://nginx.org/download/%{name}-%{version}.tar.gz
#BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires:  gcc
Requires:       pcre,pcre-devel,openssl,openssl-devel

%description
This is a web server soft.


%prep
%setup -q -n %{name}-%{version}

%build
./configure

make


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
/usr/local/nginx/
#%attr(0755,root,root) /etc/rc.d/init.d/nginx
%config(noreplace) /usr/local/nginx/conf/nginx.conf
%config(noreplace) /usr/local/nginx/conf/fastcgi_params
%doc



%changelog

………………………………………………

切割線,暫時沒時間解釋。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章