| #!/usr/bin/make -f | |
| #export DH_VERBOSE=1 | |
| CFLAGS ?= $(shell dpkg-buildflags --get CFLAGS) | |
| LDFLAGS ?= $(shell dpkg-buildflags --get LDFLAGS) | |
| WITH_HTTP2 := $(shell printf "Source: nginx\nBuild-Depends: libssl-dev (>= 1.0.1)\n" | \ | |
| dpkg-checkbuilddeps - >/dev/null 2>&1 && \ | |
| echo "--with-http_v2_module") | |
| %: | |
| dh $@ | |
| override_dh_auto_configure: configure_debug | |
| override_dh_strip: | |
| dh_strip --dbg-package=nginx-dbg | |
| override_dh_auto_build: | |
| dh_auto_build | |
| mv objs/nginx objs/nginx-debug | |
| CFLAGS="" ./configure \ | |
| --prefix=/etc/nginx \ | |
| --sbin-path=/usr/sbin/nginx \ | |
| --conf-path=/etc/nginx/nginx.conf \ | |
| --error-log-path=/var/log/nginx/error.log \ | |
| --http-log-path=/var/log/nginx/access.log \ | |
| --pid-path=/var/run/nginx.pid \ | |
| --lock-path=/var/run/nginx.lock \ | |
| --http-client-body-temp-path=/var/cache/nginx/client_temp \ | |
| --http-proxy-temp-path=/var/cache/nginx/proxy_temp \ | |
| --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \ | |
| --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \ | |
| --http-scgi-temp-path=/var/cache/nginx/scgi_temp \ | |
| --user=nginx \ | |
| --group=nginx \ | |
| --with-http_ssl_module \ | |
| --with-http_realip_module \ | |
| --with-http_addition_module \ | |
| --with-http_sub_module \ | |
| --with-http_dav_module \ | |
| --with-http_flv_module \ | |
| --with-http_mp4_module \ | |
| --with-http_gunzip_module \ | |
| --with-http_gzip_static_module \ | |
| --with-http_random_index_module \ | |
| --with-http_secure_link_module \ | |
| --with-http_stub_status_module \ | |
| --with-http_auth_request_module \ | |
| --with-threads \ | |
| --with-stream \ | |
| --with-stream_ssl_module \ | |
| --with-http_slice_module \ | |
| --with-mail \ | |
| --with-mail_ssl_module \ | |
| --with-file-aio \ | |
| $(WITH_HTTP2) \ | |
| --with-cc-opt="$(CFLAGS)" \ | |
| --with-ld-opt="$(LDFLAGS)" \ | |
| --with-ipv6 | |
| dh_auto_build | |
| configure_debug: | |
| CFLAGS="" ./configure \ | |
| --prefix=/etc/nginx \ | |
| --sbin-path=/usr/sbin/nginx \ | |
| --conf-path=/etc/nginx/nginx.conf \ | |
| --error-log-path=/var/log/nginx/error.log \ | |
| --http-log-path=/var/log/nginx/access.log \ | |
| --pid-path=/var/run/nginx.pid \ | |
| --lock-path=/var/run/nginx.lock \ | |
| --http-client-body-temp-path=/var/cache/nginx/client_temp \ | |
| --http-proxy-temp-path=/var/cache/nginx/proxy_temp \ | |
| --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \ | |
| --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \ | |
| --http-scgi-temp-path=/var/cache/nginx/scgi_temp \ | |
| --user=nginx \ | |
| --group=nginx \ | |
| --with-http_ssl_module \ | |
| --with-http_realip_module \ | |
| --with-http_addition_module \ | |
| --with-http_sub_module \ | |
| --with-http_dav_module \ | |
| --with-http_flv_module \ | |
| --with-http_mp4_module \ | |
| --with-http_gunzip_module \ | |
| --with-http_gzip_static_module \ | |
| --with-http_random_index_module \ | |
| --with-http_secure_link_module \ | |
| --with-http_stub_status_module \ | |
| --with-http_auth_request_module \ | |
| --with-threads \ | |
| --with-stream \ | |
| --with-stream_ssl_module \ | |
| --with-http_slice_module \ | |
| --with-mail \ | |
| --with-mail_ssl_module \ | |
| --with-file-aio \ | |
| $(WITH_HTTP2) \ | |
| --with-cc-opt="$(CFLAGS)" \ | |
| --with-ld-opt="$(LDFLAGS)" \ | |
| --with-ipv6 \ | |
| --with-debug | |
| override_dh_auto_install: | |
| sed -e 's/%%PROVIDES%%/nginx/g' \ | |
| -e 's/%%DEFAULTSTART%%/2 3 4 5/g' \ | |
| -e 's/%%DEFAULTSTOP%%/0 1 6/g' \ | |
| < debian/init.d.in > debian/init.d | |
| dh_auto_install | |
| mkdir -p debian/nginx/etc/init.d debian/nginx/etc/default | |
| sed -e 's/%%PROVIDES%%/nginx-debug/g' \ | |
| -e 's/%%DEFAULTSTART%%//g' \ | |
| -e 's/%%DEFAULTSTOP%%/0 1 2 3 4 5 6/g' \ | |
| < debian/init.d.in > debian/debug.init.d | |
| /usr/bin/install -m 755 debian/debug.init.d debian/nginx/etc/init.d/nginx-debug | |
| /usr/bin/install -m 644 debian/nginx-debug.default debian/nginx/etc/default/nginx-debug | |
| /usr/bin/install -m 644 debian/nginx.conf debian/nginx/etc/nginx/ | |
| /usr/bin/install -m 644 conf/win-utf debian/nginx/etc/nginx/ | |
| /usr/bin/install -m 644 conf/koi-utf debian/nginx/etc/nginx/ | |
| /usr/bin/install -m 644 conf/koi-win debian/nginx/etc/nginx/ | |
| /usr/bin/install -m 644 conf/mime.types debian/nginx/etc/nginx/ | |
| /usr/bin/install -m 644 conf/scgi_params debian/nginx/etc/nginx/ | |
| /usr/bin/install -m 644 conf/fastcgi_params debian/nginx/etc/nginx/ | |
| /usr/bin/install -m 644 conf/uwsgi_params debian/nginx/etc/nginx/ | |
| /usr/bin/install -m 644 html/index.html debian/nginx/usr/share/nginx/html/ | |
| /usr/bin/install -m 644 html/50x.html debian/nginx/usr/share/nginx/html/ | |
| /usr/bin/install -m 644 debian/nginx.vh.default.conf debian/nginx/etc/nginx/conf.d/default.conf | |
| /usr/bin/install -m 755 objs/nginx debian/nginx/usr/sbin/ | |
| /usr/bin/install -m 755 objs/nginx-debug debian/nginx/usr/sbin/ | |
| override_dh_clean: | |
| dh_clean | |
| rm -f debian/*init.d |