您的位置:首页 > 产品设计 > UI/UE

rpmbuild制作rpm包入门

2017-08-22 18:12 363 查看
一个简单的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
………………………………………………
切割线,暂时没时间解释。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux