rackmaze / nginx-lua-centos7

RPM SPEC file to build Nginx with embedded Lua interpreter
The Unlicense
5 stars 11 forks source link

parameterize versions #1

Closed dholth closed 8 years ago

dholth commented 9 years ago

--- nginx-lua.spec.orig 2015-05-28 13:38:20.641688194 +0000
+++ nginx-lua.spec      2015-05-28 13:23:05.077324171 +0000
@@ -3,6 +3,9 @@
 %define nginx_user nginx
 %define nginx_group nginx

+%define lua_nginx_version 0.9.15
+%define ngx_devel_kit_version 0.2.19
+
 # distribution specific definitions
 %define use_systemd (0%{?fedora} && 0%{?fedora} >= 18) || (0%{?rhel} && 0%{?rhel} >= 7)

@@ -46,8 +49,8 @@

 Summary: High performance web server
 Name: nginx
-Version: 1.6.2
-Release: 1%{?dist}.ngx
+Version: 1.6.3
+Release: 2%{?dist}.ngx
 Vendor: nginx inc.
 URL: http://nginx.org/

@@ -61,8 +64,8 @@
 Source7: nginx.suse.init
 Source8: nginx.service
 Source9: nginx.upgrade.sh
-Source10: https://github.com/simpl/ngx_devel_kit/archive/v0.2.19.tar.gz
-Source11: https://github.com/openresty/lua-nginx-module/archive/v0.9.13rc1.tar.gz
+Source10: https://github.com/simpl/ngx_devel_kit/archive/v%{ngx_devel_kit_version}.tar.gz
+Source11: https://github.com/openresty/lua-nginx-module/archive/v%{lua_nginx_version}.tar.gz

 License: 2-clause BSD-like license

@@ -93,8 +96,8 @@
 %setup -T -D -a 10
 %{__tar} xzvf %{SOURCE11}
 %setup -T -D -a 11
-#%setup -c -a 2 -D -n nginx-%{version}/ngx_devel_kit-0.2.19
-#%setup -c -a 3 -D -n nginx-%{version}/lua-nginx-module-0.9.13rc1
+#%setup -c -a 2 -D -n nginx-%{version}/ngx_devel_kit-%{ngx_devel_kit_version}
+#%setup -c -a 3 -D -n nginx-%{version}/lua-nginx-module-%{lua_nginx_version}

 %build
 export LUA_LIB=/usr/lib64
@@ -133,8 +136,8 @@
         --with-file-aio \
         --with-ipv6 \
         --with-debug \
-        --add-module=%{_builddir}/%{name}-%{version}/ngx_devel_kit-0.2.19 \
-        --add-module=%{_builddir}/%{name}-%{version}/lua-nginx-module-0.9.13rc1 \
+        --add-module=%{_builddir}/%{name}-%{version}/ngx_devel_kit-%{ngx_devel_kit_version} \
+        --add-module=%{_builddir}/%{name}-%{version}/lua-nginx-module-%{lua_nginx_version} \
         %{?with_spdy:--with-http_spdy_module} \
         --with-cc-opt="%{optflags} $(pcre-config --cflags)" \
         $*
@@ -176,8 +179,8 @@
         --with-mail_ssl_module \
         --with-file-aio \
         --with-ipv6 \
-        --add-module=%{_builddir}/%{name}-%{version}/ngx_devel_kit-0.2.19 \
-        --add-module=%{_builddir}/%{name}-%{version}/lua-nginx-module-0.9.13rc1 \
+        --add-module=%{_builddir}/%{name}-%{version}/ngx_devel_kit-%{ngx_devel_kit_version} \
+        --add-module=%{_builddir}/%{name}-%{version}/lua-nginx-module-%{lua_nginx_version} \
         %{?with_spdy:--with-http_spdy_module} \
         --with-cc-opt="%{optflags} $(pcre-config --cflags)" \
         $*
@@ -349,6 +352,9 @@
 fi

 %changelog
+* Thu May 28 2015
+- 1.6.3
+
 * Tue Sep 16 2014 Sergey Budnevitch <sb@nginx.com>
 - epoch added to the EPEL7/CentOS7 spec to override EPEL one
 - 1.6.2
kika commented 9 years ago

This makes sense. Send the PR please.

kika commented 8 years ago

Fixed by #2