Chinaunix首页 | 论坛 | 博客
  • 博客访问: 232702
  • 博文数量: 59
  • 博客积分: 2661
  • 博客等级: 少校
  • 技术积分: 732
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-24 11:54
文章分类

全部博文(59)

文章存档

2013年(1)

2012年(8)

2011年(17)

2010年(33)

我的朋友

分类: LINUX

2010-08-14 16:15:16

一直想动手做rpm包,今天有时间就玩了玩。中间有点曲折,不过后来都出来了。我做的是nginx的rpm,带上upstream_hash。
 
以下是spec文件:
Summary: The fastest used web server on the Internet.
Name: nginx
Version: 0.7.63
Release:upstream_hash
Group: System Environment/Daemons
Source: nginx-0.7.63.tar.gz
#Source1: nginx.conf-dist
Source1: Nginx_upstream_hash-0.3.tar.gz
License: Nginx Group License
Provides: webserver
Packager: chuzhuo
Conflicts: nginx
BuildRoot: /tmp/nginx
%description
The fastest used web server on the Internet.
%prep
%setup -q -T -D -b 1 -n nginx_upstream_hash-0.3
%setup -q -n %{name}-%{version}
cp -r  /usr/src/redhat/BUILD/nginx_upstream_hash-0.3/ /usr/src/redhat/BUILD/nginx-0.7.63
%build
# Build for Source: nginx-0.7.67
#cd nginx-0.7.67
#cd %{name}-%{version}
./configure --prefix=/opt/nginx \
--with-http_ssl_module \
--add-module=nginx_upstream_hash-0.3/
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
# Install for nginx.conf
#install -m 600 $RPM_SOURCE_DIR/nginx.conf-dist $RPM_BUILD_ROOT/opt/nginx/conf/nginx.conf
%files
%defattr (-,root,root)
/opt/nginx
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%changelog
* Fri Oct 14 2010 chuzhuo <>
-test for nginx-0.7.63
 
备注:
1.绿色部分不知道怎么写更好,就这样凑合了。
2.红色部分注意,被参考1误导耽误了不少时间。他写成这样:make install root=$RPM_BUILD_ROOT
 
参考:
1.http://wuxumjy.blog.sohu.com/73961467.html
2.
阅读(769) | 评论(0) | 转发(0) |
0

上一篇:ldapsearch 参数表

下一篇:cacti插件安装

给主人留下些什么吧!~~