1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
| cd ~/rpmbuild/SPECS vim nginx.spec Name: tengine Version: x.x.x Release: 1%{?dist} Summary: tengine-x.x.x.tar.gz Group: Applications/Archiving License: GPL URL: http://tengine.taobao.org/ Source0: tengine-x.x.x.tar.gz Source1: init.nginx Source2: nginx.conf Source3: fastcgi_params Source4: www.conf BuildRequires: gcc Requires: openssl,openssl-devel,pcre-devel,pcre BuildRoot: %_topdir/BUILDROOT %description Custom a rpm by yourself!Build tengine-2.1.2.tar.gz to tengine-2.1.2-1.el6.x86_64.rpm %prep %setup -q %build ./configure --prefix=/usr/local/nginx \ --conf-path=/etc/nginx/nginx.conf \ --sbin-path=/usr/sbin/nginx \ --with-http\_ssl\_module \ --with-http\_realip\_module \ --with-http\_addition\_module \ --with-http\_image\_filter_module \ --with-http\_sub\_module \ --with-http\_dav\_module \ --with-http\_flv\_module \ --with-http\_mp4\_module \ --with-http\_gzip\_static_module \ --with-http\_concat\_module \ --with-http\_random\_index_module \ --with-http\_secure\_link_module \ --with-http\_degradation\_module \ --with-http\_sysguard\_module \ --with-backtrace_module \ --with-http\_stub\_status_module \ --with-http\_upstream\_check_module \ --with-debug --with-http\_realip\_module make %{?\_smp\_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} %{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}/etc/rc.d/init.d/nginx %{__install} -p -D %{SOURCE2} %{buildroot}/etc/nginx/nginx.conf %{\_\_install} -p -D %{SOURCE3} %{buildroot}/etc/nginx/fastcgi\_params %{__install} -p -D %{SOURCE4} %{buildroot}/etc/nginx/vhosts/www.conf %clean rm -rf %{buildroot} %pre %post %preun %postun rm -rf /usr/local/nginx %files %defattr(-,root,root) /etc/nginx/ /usr/local/nginx /usr/sbin/nginx /etc/rc.d/init.d/nginx %changelog * Tue date - x.x.x-x - Initial version
|