summaryrefslogtreecommitdiffhomepage
path: root/pkg/deb/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/deb/Makefile')
-rw-r--r--pkg/deb/Makefile57
1 files changed, 26 insertions, 31 deletions
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile
index 1a16b6ee..f481ff02 100644
--- a/pkg/deb/Makefile
+++ b/pkg/deb/Makefile
@@ -1,11 +1,10 @@
#!/usr/bin/make
-DEFAULT_VERSION := $(shell grep 'define NXT_VERSION' ../../src/nxt_main.h \
- | sed -e 's/^.*"\(.*\)".*/\1/')
+include ../../version
DEFAULT_RELEASE := 1
-VERSION ?= $(DEFAULT_VERSION)
+VERSION ?= $(NXT_VERSION)
RELEASE ?= $(DEFAULT_RELEASE)
SRCDIR= unit-$(VERSION)
@@ -27,6 +26,9 @@ include Makefile.go19
include Makefile.go110
include Makefile.perl
include Makefile.ruby
+include Makefile.jsc-common
+include Makefile.jsc8
+include Makefile.jsc11
endif
# Ubuntu 18.04
@@ -38,28 +40,9 @@ include Makefile.go19
include Makefile.go110
include Makefile.perl
include Makefile.ruby
-endif
-
-# Ubuntu 17.10
-ifeq ($(CODENAME),artful)
-include Makefile.php
-include Makefile.python27
-include Makefile.python36
-include Makefile.go18
-include Makefile.go19
-include Makefile.perl
-include Makefile.ruby
-endif
-
-# Ubuntu 17.04
-ifeq ($(CODENAME),zesty)
-include Makefile.php
-include Makefile.python27
-include Makefile.python35
-include Makefile.go17
-include Makefile.go18
-include Makefile.perl
-include Makefile.ruby
+include Makefile.jsc-common
+include Makefile.jsc8
+include Makefile.jsc10
endif
# Ubuntu 16.04
@@ -70,6 +53,8 @@ include Makefile.python35
include Makefile.go
include Makefile.perl
include Makefile.ruby
+include Makefile.jsc-common
+include Makefile.jsc8
endif
# Ubuntu 14.04
@@ -88,6 +73,8 @@ include Makefile.go17
include Makefile.go18
include Makefile.perl
include Makefile.ruby
+include Makefile.jsc-common
+include Makefile.jsc8
endif
# Debian 8
@@ -171,7 +158,7 @@ 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
+ LICENSE NOTICE CHANGES README configure auto src test version
mv debuild/$(SRCDIR).tar.gz debuild/unit_$(VERSION).orig.tar.gz
cd debuild && tar zxf unit_$(VERSION).orig.tar.gz
@@ -201,7 +188,11 @@ else
-e "s#%%CODENAME%%#$(CODENAME)#g" \
> $@/$(SRCDIR)/debian/changelog
endif
- cp debian/copyright debuild-$*/$(SRCDIR)/debian/
+ if [ -f debian.module/copyright.unit-$(MODULE_SUFFIX_$*) ]; then \
+ cp debian.module/copyright.unit-$(MODULE_SUFFIX_$*) debuild-$*/$(SRCDIR)/debian/copyright ; \
+ else \
+ cp debian/copyright debuild-$*/$(SRCDIR)/debian/ ; \
+ fi
@{ \
set -e ; \
for src in $(MODULE_SOURCES_$*); do \
@@ -210,8 +201,9 @@ endif
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"` ; \
+ postinstall=`echo "$$MODULE_POSTINSTALL_$*" | 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 \
+ cat debian.module/$(if $(MODULE_NOARCH_$*),control-noarch.in,control.in) | sed \
-e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \
-e "s#%%SUMMARY%%#$(MODULE_SUMMARY_$*)#g" \
-e "s#%%CODENAME%%#$(CODENAME)#g" \
@@ -222,7 +214,7 @@ endif
-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 \
+ cat debian.module/$(if $(MODULE_NOARCH_$*),rules-noarch.in,rules.in) | sed \
-e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \
-e "s#%%CODENAME%%#$(CODENAME)#g" \
-e "s#%%UNIT_VERSION%%#$(VERSION)#g" \
@@ -234,6 +226,7 @@ endif
-e "s#%%MODULE_DEFINITIONS%%#$${definitions}#g" \
-e "s#%%MODULE_PREBUILD%%#$${prebuild}#g" \
-e "s#%%MODULE_PREINSTALL%%#$${preinstall}#g" \
+ -e "s#%%MODULE_POSTINSTALL%%#$${postinstall}#g" \
> $@/$(SRCDIR)/debian/rules ; \
cat debian.module/preinst.in | sed \
-e "s#%%MODULE_POST%%#$$post#g" \
@@ -250,8 +243,9 @@ unit-%: check-build-depends-% | debuild-%
test: unit modules
@{ \
- for so in `find debuild-*/unit-$(VERSION)/debian/build-unit/ -type f -name "*.so"` ; do \
+ for so in `find debuild-*/unit-$(VERSION)/debian/build-unit/ -type f \( -name "*.so" -o -name "*.jar" \)`; do \
soname=`basename $${so}` ; \
+ test "$${soname}" = "java.unit.so" && continue ; \
test -h debuild/unit-$(VERSION)/debian/build-unit/build/$${soname} || \
ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit/build/$${soname} ; \
done ; \
@@ -260,8 +254,9 @@ test: unit modules
test-debug: unit modules
@{ \
- for so in `find debuild-*/unit-$(VERSION)/debian/build-unit-debug/ -type f -name "*.so"` ; do \
+ for so in `find debuild-*/unit-$(VERSION)/debian/build-unit-debug/ -type f \( -name "*.so" -o -name "*.jar" \)`; do \
soname=`basename $${so}` ; \
+ test "$${soname}" = "java.unit.so" && continue ; \
test -h debuild/unit-$(VERSION)/debian/build-unit-debug/build/$${soname} || \
ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit-debug/build/$${soname} ; \
done ; \