CentOS5.5にnginxをインストールする(1.1.0)

$ echo "%_topdir $HOME/rpm" > ~/.rpmmacros
$ mkdir -p $HOME/rpm/{RPMS,SRPMS,BUILD,SPECS,SOURCES}

$ wget http://download.fedora.redhat.com/pub/epel/5/SRPMS/nginx-0.8.54-1.el5.src.rpm
$ wget http://www.nginx.org/download/nginx-1.1.0.tar.gz
$ mkdir tmp
$ cd !$
$ rpm2cpio ../nginx-0.8.54-1.el5.src.rpm | cpio -id
$ cp -a ../nginx-1.1.0.tar.gz .

$ diff -Naur nginx.spec{.o,}
--- nginx.spec.o	2011-08-12 14:36:26.000000000 +0900
+++ nginx.spec	2011-08-12 14:52:18.000000000 +0900
@@ -8,7 +8,7 @@
 %define nginx_webroot   %{nginx_datadir}/html
 
 Name:           nginx
-Version:        0.8.54
+Version:        1.1.0
 Release:        1%{?dist}
 Summary:        Robust, small and high performance HTTP and reverse proxy server
 Group:          System Environment/Daemons   
@@ -47,7 +47,7 @@
 
 # removes -Werror in upstream build scripts.  -Werror conflicts with
 # -D_FORTIFY_SOURCE=2 causing warnings to turn into errors.
-Patch0:     nginx-auto-cc-gcc.patch
+#Patch0:     nginx-auto-cc-gcc.patch
 
 %description
 Nginx [engine x] is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3
@@ -56,7 +56,7 @@
 %prep
 %setup -q
 
-%patch0 -p0
+#%patch0 -p0
 
 %build
 # nginx does not utilize a standard configure script.  It has its own
@@ -64,6 +64,7 @@
 # to error out.  This is is also the reason for the DESTDIR environment
 # variable.  The configure script(s) have been patched (Patch1 and
 # Patch2) in order to support installing into a build environment.
+export LANG='ja_JP.UTF-8'
 export DESTDIR=%{buildroot}
 ./configure \
     --user=%{nginx_user} \

// いろいろファイルが必要(素直にSRPMインストールするべきかな)
//$ cp -a nginx-1.1.0.tar.gz ~/rpm/SOURCES/
$ cp -a * ~/rpm/SOURCES/

$ rpmbuild -ba nginx.spec
エラー: ビルド依存性の失敗:
        pcre-devel は nginx-1.1.0-1.x86_64 に必要とされています
        zlib-devel は nginx-1.1.0-1.x86_64 に必要とされています
        openssl-devel は nginx-1.1.0-1.x86_64 に必要とされています
        libxslt-devel は nginx-1.1.0-1.x86_64 に必要とされています
        GeoIP-devel は nginx-1.1.0-1.x86_64 に必要とされています
        gd-devel は nginx-1.1.0-1.x86_64 に必要とされています

$ sudo yum install pcre-devel.x86_64 openssl-devel.x86_64 \
     libxslt-devel.x86_64 GeoIP-devel.x86_64 gd-devel.x86_64


$ rpmbuild -ba nginx.spec
$ sudo rpm -ivh  ~/rpm/RPMS/x86_64/nginx-1.1.0-1.x86_64.rpm