diff options
Diffstat (limited to '')
-rw-r--r-- | pkg/deb/Makefile | 198 | ||||
-rw-r--r-- | pkg/deb/Makefile.go | 51 | ||||
-rw-r--r-- | pkg/deb/Makefile.go17 | 51 | ||||
-rw-r--r-- | pkg/deb/Makefile.go18 | 51 | ||||
-rw-r--r-- | pkg/deb/Makefile.php | 50 | ||||
-rw-r--r-- | pkg/deb/Makefile.python | 44 | ||||
-rw-r--r-- | pkg/deb/Makefile.python27 | 44 | ||||
-rw-r--r-- | pkg/deb/Makefile.python34 | 44 | ||||
-rw-r--r-- | pkg/deb/Makefile.python35 | 44 |
9 files changed, 577 insertions, 0 deletions
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile new file mode 100644 index 00000000..fb31ad2b --- /dev/null +++ b/pkg/deb/Makefile @@ -0,0 +1,198 @@ +#!/usr/bin/make + +DEFAULT_VERSION := $(shell grep 'define NXT_VERSION' ../../src/nxt_main.h \ + | sed -e 's/^.*"\(.*\)".*/\1/') + +DEFAULT_RELEASE := 1 + +VERSION ?= $(DEFAULT_VERSION) +RELEASE ?= $(DEFAULT_RELEASE) + +SRCDIR= unit-$(VERSION) + +CODENAME = $(shell lsb_release -cs) + +BUILD_DEPENDS = debhelper devscripts libxml2-utils lintian lsb-release xsltproc + +MODULES= + +# Ubuntu 17.04 +ifeq ($(CODENAME),zesty) +include Makefile.php +include Makefile.python27 +include Makefile.python35 +include Makefile.go17 +include Makefile.go18 +endif + +# Ubuntu 16.04 +ifeq ($(CODENAME),xenial) +include Makefile.php +include Makefile.python27 +include Makefile.python35 +include Makefile.go +endif + +# Ubuntu 14.04 +ifeq ($(CODENAME),trusty) +include Makefile.php +include Makefile.python +endif + +# Debian 9 +ifeq ($(CODENAME),stretch) +include Makefile.php +include Makefile.python27 +include Makefile.python35 +include Makefile.go17 +include Makefile.go18 +endif + +# Debian 8 +ifeq ($(CODENAME),jessie) +include Makefile.php +include Makefile.python27 +endif + +CONFIGURE_ARGS=\ + --prefix=/usr \ + --state=/var/lib/unit \ + --control="unix:/var/run/control.unit.sock" \ + --pid=/var/run/unit.pid \ + --log=/var/log/unit.log \ + --tests + +export CR=\\n + +default: + @echo "valid targets: all modules unit $(addprefix unit-, $(MODULES)) clean" + +all: check-build-depends unit modules + +modules: $(addprefix unit-, $(MODULES)) + +check-build-depends: + @{ \ + not_installed= ; \ + for pkg in $(BUILD_DEPENDS); do \ + dpkg -s $${pkg} >/dev/null 2>&1 ; \ + if [ $$? -ne 0 ]; then \ + not_installed="$${not_installed} $${pkg}" ; \ + fi ; \ + done ; \ + if test -n "$${not_installed}" ; then \ + echo "" >&2 ; \ + echo "The following packages are required in order to proceed:" >&2 ; \ + echo "" >&2 ; \ + echo $${not_installed} >&2 ; \ + echo "" >&2 ; \ + exit 1 ; \ + fi \ + } + +debuild/$(SRCDIR)/debian: + @{ \ + set -e ; \ + mkdir -p debuild/$(SRCDIR) ; \ + cp -pr debian debuild/$(SRCDIR) ; \ + echo '9' > debuild/$(SRCDIR)/debian/compat ; \ + mkdir -p debuild/$(SRCDIR)/debian/source ; \ + echo '3.0 (quilt)' > debuild/$(SRCDIR)/debian/source/format ; \ + cat debian/rules.in | sed \ + -e "s#%%CONFIGURE_ARGS%%#$(CONFIGURE_ARGS)#g" \ + > debuild/$(SRCDIR)/debian/rules ; \ + } + +debuild/$(SRCDIR)/debian/changelog: ../../docs/changes.xml | debuild/$(SRCDIR)/debian + cd ../../docs && make ../build/unit.deb-changelog +ifneq ($(DEFAULT_VERSION)$(DEFAULT_RELEASE), $(VERSION)$(RELEASE)) + cat ../../build/unit.deb-changelog | sed \ + -e "s/unit ($(DEFAULT_VERSION)-$(DEFAULT_RELEASE)~/unit ($(VERSION)-$(RELEASE)~/" \ + -e "s#%%CODENAME%%#$(CODENAME)#g" \ + > debuild/$(SRCDIR)/debian/changelog +else + cat ../../build/unit.deb-changelog | sed \ + -e "s#%%CODENAME%%#$(CODENAME)#g" \ + > debuild/$(SRCDIR)/debian/changelog +endif + +debuild/unit_$(VERSION).orig.tar.gz: | debuild/$(SRCDIR)/debian + cd ../.. && tar -czf pkg/deb/debuild/$(SRCDIR).tar.gz \ + --transform "s#^#$(SRCDIR)/#" \ + LICENSE NOTICE CHANGES README configure auto src test + mv debuild/$(SRCDIR).tar.gz debuild/unit_$(VERSION).orig.tar.gz + cd debuild && tar zxf unit_$(VERSION).orig.tar.gz + +unit: debuild/unit_$(VERSION).orig.tar.gz debuild/$(SRCDIR)/debian/changelog + @echo "===> Building $@ package" + cd debuild/$(SRCDIR) && debuild -us -uc + mkdir -p debs + find debuild/ -maxdepth 1 -type f -exec cp {} debs/ \; + ln -s debuild/$(SRCDIR)/build $@ + +debuild-%: debuild/unit_$(VERSION).orig.tar.gz ../../docs/changes.xml + mkdir $@ + cp debuild/unit_$(VERSION).orig.tar.gz debuild-$*/unit-$(MODULE_SUFFIX_$*)_$(VERSION).orig.tar.gz + cd $@ && tar zxf unit-$(MODULE_SUFFIX_$*)_$(VERSION).orig.tar.gz + mkdir $@/$(SRCDIR)/debian + echo '9' > $@/$(SRCDIR)/debian/compat + mkdir $@/$(SRCDIR)/debian/source + echo '3.0 (quilt)' > $@/$(SRCDIR)/debian/source/format + cd ../../docs && make ../build/unit-$(MODULE_SUFFIX_$*).deb-changelog + cat ../../build/unit-$(MODULE_SUFFIX_$*).deb-changelog | sed \ + -e "s#%%CODENAME%%#$(CODENAME)#g" \ + > $@/$(SRCDIR)/debian/changelog + cp debian/copyright debuild-$*/$(SRCDIR)/debian/ + @{ \ + set -e ; \ + for src in $(MODULE_SOURCES_$*); do \ + cp debian.module/$${src} $@/$(SRCDIR)/debian/ ; \ + done ; \ + definitions=`echo "$$MODULE_DEFINITIONS_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ + prebuild=`echo "$$MODULE_PREBUILD_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ + preinstall=`echo "$$MODULE_PREINSTALL_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ + post=`echo "$$MODULE_POST_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ + cat debian.module/control.in | sed \ + -e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \ + -e "s#%%SUMMARY%%#$(MODULE_SUMMARY_$*)#g" \ + -e "s#%%CODENAME%%#$(CODENAME)#g" \ + -e "s#%%UNIT_VERSION%%#$(VERSION)#g" \ + -e "s#%%UNIT_RELEASE%%#$(RELEASE)#g" \ + -e "s#%%VERSION%%#$(MODULE_VERSION_$*)#g" \ + -e "s#%%RELEASE%%#$(MODULE_RELEASE_$*)#g" \ + -e "s#%%MODULE_BUILD_DEPENDS%%#$(MODULE_BUILD_DEPENDS_$*)#g" \ + -e "s#%%MODULE_DEPENDS%%#$(MODULE_DEPENDS_$*)#g" \ + > $@/$(SRCDIR)/debian/control ; \ + cat debian.module/rules.in | sed \ + -e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \ + -e "s#%%CODENAME%%#$(CODENAME)#g" \ + -e "s#%%UNIT_VERSION%%#$(VERSION)#g" \ + -e "s#%%UNIT_RELEASE%%#$(RELEASE)#g" \ + -e "s#%%CONFIGURE_ARGS%%#$(CONFIGURE_ARGS)#g" \ + -e "s#%%MODULE_CONFARGS%%#$(MODULE_CONFARGS_$*)#g" \ + -e "s#%%MODULE_MAKEARGS%%#$(MODULE_MAKEARGS_$*)#g" \ + -e "s#%%MODULE_INSTARGS%%#$(MODULE_INSTARGS_$*)#g" \ + -e "s#%%MODULE_DEFINITIONS%%#$${definitions}#g" \ + -e "s#%%MODULE_PREBUILD%%#$${prebuild}#g" \ + -e "s#%%MODULE_PREINSTALL%%#$${preinstall}#g" \ + > $@/$(SRCDIR)/debian/rules ; \ + cat debian.module/preinst.in | sed \ + -e "s#%%MODULE_POST%%#$$post#g" \ + > $@/$(SRCDIR)/debian/preinst ; \ + chmod +x $@/$(SRCDIR)/debian/rules ; \ + } + +unit-%: | debuild-% + @echo "===> Building $@ package" + cd debuild-$*/$(SRCDIR) && debuild -us -uc + mkdir -p debs + find debuild-$*/ -maxdepth 1 -type f -exec cp {} debs/ \; + ln -s debuild-$*/$(SRCDIR)/build $@ + +clean: + rm -rf debuild debuild-* debs ../../build + find . -maxdepth 1 -type l -delete + +.PHONY: default all modules check-build-depends clean + +.SECONDARY: diff --git a/pkg/deb/Makefile.go b/pkg/deb/Makefile.go new file mode 100644 index 00000000..d960a68d --- /dev/null +++ b/pkg/deb/Makefile.go @@ -0,0 +1,51 @@ +MODULES+= go +MODULE_SUFFIX_go= go + +MODULE_SUMMARY_go= Go module for NGINX Unit + +MODULE_VERSION_go= $(VERSION) +MODULE_RELEASE_go= 1 + +MODULE_CONFARGS_go= go --go-path=\$$(GOROOT) +MODULE_MAKEARGS_go= go +MODULE_INSTARGS_go= go-install + +MODULE_SOURCES_go= unit.example-go-app \ + unit.example-go-config + +BUILD_DEPENDS+= golang + +MODULE_BUILD_DEPENDS_go=,golang +MODULE_DEPENDS_go=,golang + +define MODULE_DEFINITIONS_go +GOROOT = $(shell go env GOROOT) +endef +export MODULE_DEFINITIONS_go + +define MODULE_PREINSTALL_go + mkdir -p debian/unit-go/usr/share/doc/unit-go/examples/go-app + install -m 644 -p debian/unit.example-go-app debian/unit-go/usr/share/doc/unit-go/examples/go-app/let-my-people.go + install -m 644 -p debian/unit.example-go-config debian/unit-go/usr/share/doc/unit-go/examples/unit.config +endef +export MODULE_PREINSTALL_go + +define MODULE_POST_go +cat <<BANNER +---------------------------------------------------------------------- + +The $(MODULE_SUMMARY_go) has been installed. + +To check out the sample app, run these commands: + + go build -o /tmp/go-app /usr/share/doc/unit-go/examples/go-app/let-my-people.go + sudo service unit restart + sudo service unit loadconfig /usr/share/doc/unit-go/examples/unit.config + curl http://localhost:8500/ + +Online documentation is available at https://unit.nginx.org + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_go diff --git a/pkg/deb/Makefile.go17 b/pkg/deb/Makefile.go17 new file mode 100644 index 00000000..7fbfd360 --- /dev/null +++ b/pkg/deb/Makefile.go17 @@ -0,0 +1,51 @@ +MODULES+= go17 +MODULE_SUFFIX_go17= go1.7 + +MODULE_SUMMARY_go17= Go 1.7 module for NGINX Unit + +MODULE_VERSION_go17= $(VERSION) +MODULE_RELEASE_go17= 1 + +MODULE_CONFARGS_go17= go --go=/usr/lib/go-1.7/bin/go --go-path=\$$(GOROOT) +MODULE_MAKEARGS_go17= /usr/lib/go-1.7/bin/go +MODULE_INSTARGS_go17= /usr/lib/go-1.7/bin/go-install + +MODULE_SOURCES_go17= unit.example-go-app \ + unit.example-go1.7-config + +BUILD_DEPENDS+= golang-1.7 + +MODULE_BUILD_DEPENDS_go=,golang-1.7 +MODULE_DEPENDS_go=,golang-1.7 + +define MODULE_DEFINITIONS_go17 +GOROOT = \$$(shell /usr/lib/go-1.7/bin/go env GOROOT) +endef +export MODULE_DEFINITIONS_go17 + +define MODULE_PREINSTALL_go17 + mkdir -p debian/unit-go1.7/usr/share/doc/unit-go1.7/examples/go-app + install -m 644 -p debian/unit.example-go-app debian/unit-go1.7/usr/share/doc/unit-go1.7/examples/go-app/let-my-people.go + install -m 644 -p debian/unit.example-go1.7-config debian/unit-go1.7/usr/share/doc/unit-go1.7/examples/unit.config +endef +export MODULE_PREINSTALL_go17 + +define MODULE_POST_go17 +cat <<BANNER +---------------------------------------------------------------------- + +The $(MODULE_SUMMARY_go17) has been installed. + +To check out the sample app, run these commands: + + /usr/lib/go-1.7/bin/go build -o /tmp/go1.7-app /usr/share/doc/unit-go1.7/examples/go-app/let-my-people.go + sudo service unit restart + sudo service unit loadconfig /usr/share/doc/unit-go1.7/examples/unit.config + curl http://localhost:8500/ + +Online documentation is available at https://unit.nginx.org + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_go17 diff --git a/pkg/deb/Makefile.go18 b/pkg/deb/Makefile.go18 new file mode 100644 index 00000000..4f15bbc9 --- /dev/null +++ b/pkg/deb/Makefile.go18 @@ -0,0 +1,51 @@ +MODULES+= go18 +MODULE_SUFFIX_go18= go1.8 + +MODULE_SUMMARY_go18= Go 1.8 module for NGINX Unit + +MODULE_VERSION_go18= $(VERSION) +MODULE_RELEASE_go18= 1 + +MODULE_CONFARGS_go18= go --go=/usr/lib/go-1.8/bin/go --go-path=\$$(GOROOT) +MODULE_MAKEARGS_go18= /usr/lib/go-1.8/bin/go +MODULE_INSTARGS_go18= /usr/lib/go-1.8/bin/go-install + +MODULE_SOURCES_go18= unit.example-go-app \ + unit.example-go1.8-config + +BUILD_DEPENDS+= golang-1.8 + +MODULE_BUILD_DEPENDS_go=,golang-1.8 +MODULE_DEPENDS_go=,golang-1.8 + +define MODULE_DEFINITIONS_go18 +GOROOT = \$$(shell /usr/lib/go-1.8/bin/go env GOROOT) +endef +export MODULE_DEFINITIONS_go18 + +define MODULE_PREINSTALL_go18 + mkdir -p debian/unit-go1.8/usr/share/doc/unit-go1.8/examples/go-app + install -m 644 -p debian/unit.example-go-app debian/unit-go1.8/usr/share/doc/unit-go1.8/examples/go-app/let-my-people.go + install -m 644 -p debian/unit.example-go1.8-config debian/unit-go1.8/usr/share/doc/unit-go1.8/examples/unit.config +endef +export MODULE_PREINSTALL_go18 + +define MODULE_POST_go18 +cat <<BANNER +---------------------------------------------------------------------- + +The $(MODULE_SUMMARY_go18) has been installed. + +To check out the sample app, run these commands: + + /usr/lib/go-1.8/bin/go build -o /tmp/go1.8-app /usr/share/doc/unit-go1.8/examples/go-app/let-my-people.go + sudo service unit restart + sudo service unit loadconfig /usr/share/doc/unit-go1.8/examples/unit.config + curl http://localhost:8500/ + +Online documentation is available at https://unit.nginx.org + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_go18 diff --git a/pkg/deb/Makefile.php b/pkg/deb/Makefile.php new file mode 100644 index 00000000..305bd970 --- /dev/null +++ b/pkg/deb/Makefile.php @@ -0,0 +1,50 @@ +MODULES+= php +MODULE_SUFFIX_php= php + +MODULE_SUMMARY_php= PHP module for NGINX Unit + +MODULE_VERSION_php= $(VERSION) +MODULE_RELEASE_php= 1 + +MODULE_CONFARGS_php= php +MODULE_MAKEARGS_php= php +MODULE_INSTARGS_php= php-install + +MODULE_SOURCES_php= unit.example-php-app \ + unit.example-php-config + +ifneq (,$(findstring $(CODENAME),trusty jessie)) +BUILD_DEPENDS+= php5-dev libphp5-embed +MODULE_BUILD_DEPENDS_php=,php5-dev,libphp5-embed +MODULE_DEPENDS_php=,libphp5-embed +else +BUILD_DEPENDS+= php-dev libphp-embed +MODULE_BUILD_DEPENDS_php=,php-dev,libphp-embed +MODULE_DEPENDS_php=,libphp-embed +endif + +define MODULE_PREINSTALL_php + mkdir -p debian/unit-php/usr/share/doc/unit-php/examples/phpinfo-app + install -m 644 -p debian/unit.example-php-app debian/unit-php/usr/share/doc/unit-php/examples/phpinfo-app/index.php + install -m 644 -p debian/unit.example-php-config debian/unit-php/usr/share/doc/unit-php/examples/unit.config +endef +export MODULE_PREINSTALL_php + +define MODULE_POST_php +cat <<BANNER +---------------------------------------------------------------------- + +The $(MODULE_SUMMARY_php) has been installed. + +To check out the sample app, run these commands: + + sudo service unit restart + sudo service unit loadconfig /usr/share/doc/unit-php/examples/unit.config + curl http://localhost:8300/ + +Online documentation is available at https://unit.nginx.org + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_php diff --git a/pkg/deb/Makefile.python b/pkg/deb/Makefile.python new file mode 100644 index 00000000..d9274ad6 --- /dev/null +++ b/pkg/deb/Makefile.python @@ -0,0 +1,44 @@ +MODULES+= python +MODULE_SUFFIX_python= python + +MODULE_SUMMARY_python= Python module for NGINX Unit + +MODULE_VERSION_python= $(VERSION) +MODULE_RELEASE_python= 1 + +MODULE_CONFARGS_python= python +MODULE_MAKEARGS_python= python +MODULE_INSTARGS_python= python-install + +MODULE_SOURCES_python= unit.example-python-app \ + unit.example-python-config + +BUILD_DEPENDS+= python-dev + +MODULE_BUILD_DEPENDS_python=,python-dev + +define MODULE_PREINSTALL_python + mkdir -p debian/unit-python/usr/share/doc/unit-python/examples/python-app + install -m 644 -p debian/unit.example-python-app debian/unit-python/usr/share/doc/unit-python/examples/python-app/wsgi.py + install -m 644 -p debian/unit.example-python-config debian/unit-python/usr/share/doc/unit-python/examples/unit.config +endef +export MODULE_PREINSTALL_python + +define MODULE_POST_python +cat <<BANNER +---------------------------------------------------------------------- + +The $(MODULE_SUMMARY_python) has been installed. + +To check out the sample app, run these commands: + + sudo service unit restart + sudo service unit loadconfig /usr/share/doc/unit-python/examples/unit.config + curl http://localhost:8400/ + +Online documentation is available at https://unit.nginx.org + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_python diff --git a/pkg/deb/Makefile.python27 b/pkg/deb/Makefile.python27 new file mode 100644 index 00000000..397678ca --- /dev/null +++ b/pkg/deb/Makefile.python27 @@ -0,0 +1,44 @@ +MODULES+= python27 +MODULE_SUFFIX_python27= python2.7 + +MODULE_SUMMARY_python27= Python 2.7 module for NGINX Unit + +MODULE_VERSION_python27= $(VERSION) +MODULE_RELEASE_python27= 1 + +MODULE_CONFARGS_python27= python --config=python2.7-config +MODULE_MAKEARGS_python27= python2.7 +MODULE_INSTARGS_python27= python2.7-install + +MODULE_SOURCES_python27= unit.example-python-app \ + unit.example-python2.7-config + +BUILD_DEPENDS+= python2.7-dev + +MODULE_BUILD_DEPENDS_python27=,python2.7-dev + +define MODULE_PREINSTALL_python27 + mkdir -p debian/unit-python2.7/usr/share/doc/unit-python2.7/examples/python-app + install -m 644 -p debian/unit.example-python-app debian/unit-python2.7/usr/share/doc/unit-python2.7/examples/python-app/wsgi.py + install -m 644 -p debian/unit.example-python2.7-config debian/unit-python2.7/usr/share/doc/unit-python2.7/examples/unit.config +endef +export MODULE_PREINSTALL_python27 + +define MODULE_POST_python27 +cat <<BANNER +---------------------------------------------------------------------- + +The $(MODULE_SUMMARY_python27) has been installed. + +To check out the sample app, run these commands: + + sudo service unit restart + sudo service unit loadconfig /usr/share/doc/unit-python2.7/examples/unit.config + curl http://localhost:8400/ + +Online documentation is available at https://unit.nginx.org + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_python27 diff --git a/pkg/deb/Makefile.python34 b/pkg/deb/Makefile.python34 new file mode 100644 index 00000000..fc501a7c --- /dev/null +++ b/pkg/deb/Makefile.python34 @@ -0,0 +1,44 @@ +MODULES+= python34 +MODULE_SUFFIX_python34= python3.4 + +MODULE_SUMMARY_python34= Python 3.4 module for NGINX Unit + +MODULE_VERSION_python34= $(VERSION) +MODULE_RELEASE_python34= 1 + +MODULE_CONFARGS_python34= python --config=python3.4-config +MODULE_MAKEARGS_python34= python3.4 +MODULE_INSTARGS_python34= python3.4-install + +MODULE_SOURCES_python34= unit.example-python-app \ + unit.example-python3.4-config + +BUILD_DEPENDS+= python3.4-dev + +MODULE_BUILD_DEPENDS_python34=,python3.4-dev + +define MODULE_PREINSTALL_python34 + mkdir -p debian/unit-python3.4/usr/share/doc/unit-python3.4/examples/python-app + install -m 644 -p debian/unit.example-python-app debian/unit-python3.4/usr/share/doc/unit-python3.4/examples/python-app/wsgi.py + install -m 644 -p debian/unit.example-python3.4-config debian/unit-python3.4/usr/share/doc/unit-python3.4/examples/unit.config +endef +export MODULE_PREINSTALL_python34 + +define MODULE_POST_python34 +cat <<BANNER +---------------------------------------------------------------------- + +The $(MODULE_SUMMARY_python34) has been installed. + +To check out the sample app, run these commands: + + sudo service unit restart + sudo service unit loadconfig /usr/share/doc/unit-python3.4/examples/unit.config + curl http://localhost:8400/ + +Online documentation is available at https://unit.nginx.org + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_python34 diff --git a/pkg/deb/Makefile.python35 b/pkg/deb/Makefile.python35 new file mode 100644 index 00000000..a23c99c8 --- /dev/null +++ b/pkg/deb/Makefile.python35 @@ -0,0 +1,44 @@ +MODULES+= python35 +MODULE_SUFFIX_python35= python3.5 + +MODULE_SUMMARY_python35= Python 3.5 module for NGINX Unit + +MODULE_VERSION_python35= $(VERSION) +MODULE_RELEASE_python35= 1 + +MODULE_CONFARGS_python35= python --config=python3.5-config +MODULE_MAKEARGS_python35= python3.5 +MODULE_INSTARGS_python35= python3.5-install + +MODULE_SOURCES_python35= unit.example-python-app \ + unit.example-python3.5-config + +BUILD_DEPENDS+= python3.5-dev + +MODULE_BUILD_DEPENDS_python35=,python3.5-dev + +define MODULE_PREINSTALL_python35 + mkdir -p debian/unit-python3.5/usr/share/doc/unit-python3.5/examples/python-app + install -m 644 -p debian/unit.example-python-app debian/unit-python3.5/usr/share/doc/unit-python3.5/examples/python-app/wsgi.py + install -m 644 -p debian/unit.example-python3.5-config debian/unit-python3.5/usr/share/doc/unit-python3.5/examples/unit.config +endef +export MODULE_PREINSTALL_python35 + +define MODULE_POST_python35 +cat <<BANNER +---------------------------------------------------------------------- + +The $(MODULE_SUMMARY_python35) has been installed. + +To check out the sample app, run these commands: + + sudo service unit restart + sudo service unit loadconfig /usr/share/doc/unit-python3.5/examples/unit.config + curl http://localhost:8400/ + +Online documentation is available at https://unit.nginx.org + +---------------------------------------------------------------------- +BANNER +endef +export MODULE_POST_python35 |