diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-12-01 16:59:41 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-12-01 16:59:41 +0300 |
commit | cdf900cf2c98b4e3fad11e8b69cd2135f2c306c7 (patch) | |
tree | da2ed9180008803fcc0500c28191d8c2643df891 /pkg/deb/debian.module | |
parent | 40eb1f8b9b2a76d76ef6a4a094bf8192a44cbe41 (diff) | |
download | unit-cdf900cf2c98b4e3fad11e8b69cd2135f2c306c7.tar.gz unit-cdf900cf2c98b4e3fad11e8b69cd2135f2c306c7.tar.bz2 |
Packaging changes for updated Go package.
- package name changed to 'nginx/unit';
- source files installed in /usr/share/gocode;
- rpm and deb go packages made noarch.
Diffstat (limited to 'pkg/deb/debian.module')
-rw-r--r-- | pkg/deb/debian.module/control-noarch.in | 23 | ||||
-rwxr-xr-x | pkg/deb/debian.module/rules-noarch.in | 93 | ||||
-rw-r--r-- | pkg/deb/debian.module/unit.example-go-app | 2 |
3 files changed, 117 insertions, 1 deletions
diff --git a/pkg/deb/debian.module/control-noarch.in b/pkg/deb/debian.module/control-noarch.in new file mode 100644 index 00000000..e22bb49a --- /dev/null +++ b/pkg/deb/debian.module/control-noarch.in @@ -0,0 +1,23 @@ +Source: %%NAME%% +Section: admin +Priority: extra +Maintainer: Andrei Belov <defan@nginx.com> +Build-Depends: debhelper (>= 9), + linux-libc-dev%%MODULE_BUILD_DEPENDS%% +Standards-Version: 3.9.5 +Homepage: https://unit.nginx.org + +Package: %%NAME%% +Section: admin +Architecture: all +Depends: lsb-base, + ${misc:Depends}, + unit (= %%UNIT_VERSION%%-%%UNIT_RELEASE%%~%%CODENAME%%)%%MODULE_DEPENDS%% +Description: %%SUMMARY%% + NGINX Unit is a runtime and delivery environment for modern distributed + applications. It runs the application code in multiple languages + (PHP, Python, Go, etc.), and tightly couples it with traffic delivery + in and out of the application. Take this application server and proxy + directly in the cloud / container environments and fully control your app + dynamically via an API. + This package contains %%SUMMARY%%. diff --git a/pkg/deb/debian.module/rules-noarch.in b/pkg/deb/debian.module/rules-noarch.in new file mode 100755 index 00000000..d74420c1 --- /dev/null +++ b/pkg/deb/debian.module/rules-noarch.in @@ -0,0 +1,93 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +BUILDDIR_unit = $(CURDIR)/debian/build-unit +BUILDDIR_unit_debug = $(CURDIR)/debian/build-unit-debug +INSTALLDIR = $(CURDIR)/debian/%%NAME%% +BASEDIR = $(CURDIR) + +%%MODULE_DEFINITIONS%% + +config.env.%: + dh_testdir + mkdir -p $(BUILDDIR_$*) + cp -Pa $(CURDIR)/auto $(BUILDDIR_$*)/ + cp -Pa $(CURDIR)/configure $(BUILDDIR_$*)/ + cp -Pa $(CURDIR)/src $(BUILDDIR_$*)/ + cp -Pa $(CURDIR)/test $(BUILDDIR_$*)/ + touch $@ + +configure.unit: config.env.unit + cd $(BUILDDIR_unit) && \ + ./configure \ + %%CONFIGURE_ARGS%% \ + --modules=/usr/lib/unit/modules && \ + ./configure %%MODULE_CONFARGS%% + touch $@ + +configure.unit_debug: config.env.unit_debug + cd $(BUILDDIR_unit_debug) && \ + ./configure \ + %%CONFIGURE_ARGS%% \ + --modules=/usr/lib/unit/debug-modules \ + --debug && \ + ./configure %%MODULE_CONFARGS%% + touch $@ + +build-arch.%: configure.% + dh_testdir + $(MAKE) -C $(BUILDDIR_$*) %%MODULE_MAKEARGS%% + touch $@ + +build-indep: + dh_testdir + touch $@ + +build-arch: build-arch.unit build-arch.unit_debug + dh_testdir + touch $@ + +build: build-arch build-indep + dh_testdir + touch $@ + +clean: + dh_testdir + dh_testroot + dh_clean + find $(CURDIR) -maxdepth 1 -size 0 -delete + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + dh_installinit + dh_installlogrotate +%%MODULE_PREINSTALL%% + cd $(BUILDDIR_unit) && \ + DESTDIR=$(INSTALLDIR) make %%MODULE_INSTARGS%% + cd $(BUILDDIR_unit_debug) && \ + DESTDIR=$(INSTALLDIR) make %%MODULE_INSTARGS%% + +binary-indep: build install + dh_testdir + dh_testroot + dh_installdocs + dh_installchangelogs + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_perl + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch: install + +binary: binary-indep binary-arch + +.PHONY: clean binary-indep binary-arch binary install build diff --git a/pkg/deb/debian.module/unit.example-go-app b/pkg/deb/debian.module/unit.example-go-app index ef2568ec..7ca0c9fd 100644 --- a/pkg/deb/debian.module/unit.example-go-app +++ b/pkg/deb/debian.module/unit.example-go-app @@ -3,7 +3,7 @@ package main import ( "fmt" "net/http" - "unit" + "nginx/unit" ) func handler(w http.ResponseWriter, r *http.Request) { |