From 7ce6f0597543baee4275e8d66567d08f2ddaf48b Mon Sep 17 00:00:00 2001 From: Andrei Belov Date: Thu, 28 Feb 2019 18:22:15 +0300 Subject: Packages: added unit-jsc (Java Servlet Container) family. --- pkg/rpm/Makefile | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) (limited to 'pkg/rpm/Makefile') diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile index 56cf31b5..d94890f2 100644 --- a/pkg/rpm/Makefile +++ b/pkg/rpm/Makefile @@ -7,9 +7,9 @@ DEFAULT_RELEASE := 1 VERSION ?= $(NXT_VERSION) RELEASE ?= $(DEFAULT_RELEASE) -ifeq ($(shell rpm --eval "%{?rhel}"), 6) +ifeq ($(shell test `rpm --eval '0%{?rhel} -eq 6 -a 0%{?amzn} -eq 0'`; echo $$?), 0) OSVER = centos6 -else ifeq ($(shell rpm --eval "%{?rhel}"), 7) +else ifeq ($(shell test `rpm --eval '0%{?rhel} -eq 7 -a 0%{?amzn} -eq 0'`; echo $$?), 0) OSVER = centos7 else ifeq ($(shell rpm --eval "%{?amzn}"), 1) OSVER = amazonlinux1 @@ -49,13 +49,18 @@ ifeq ($(OSVER), centos6) include Makefile.php include Makefile.python include Makefile.go +include Makefile.jsc-common +include Makefile.jsc8 endif -ifneq (,$(findstring $(OSVER),centos7 amazonlinux2)) +ifeq ($(OSVER), centos7) include Makefile.php include Makefile.python include Makefile.go include Makefile.perl +include Makefile.jsc-common +include Makefile.jsc8 +include Makefile.jsc11 endif ifeq ($(OSVER), amazonlinux1) @@ -66,6 +71,17 @@ include Makefile.python35 include Makefile.python36 include Makefile.go include Makefile.perl +include Makefile.jsc-common +include Makefile.jsc8 +endif + +ifeq ($(OSVER), amazonlinux2) +include Makefile.php +include Makefile.python +include Makefile.go +include Makefile.perl +include Makefile.jsc-common +include Makefile.jsc8 endif ifeq ($(OSVER), opensuse-leap) @@ -102,6 +118,9 @@ endif include Makefile.go include Makefile.perl include Makefile.ruby +include Makefile.jsc-common +include Makefile.jsc8 +include Makefile.jsc11 endif CONFIGURE_ARGS=\ @@ -191,9 +210,10 @@ rpmbuild/SPECS/unit-%.spec: unit.module.spec.in ../../docs/changes.xml | rpmbuil sources="$${sources}\n$${s}" ; \ i=$$(($${i}+1)) ; \ done ; \ - pkgname=$(shell echo $@ | cut -d '/' -f 3 | cut -d '.' -f 1) ; \ + pkgname=$(shell echo $@ | cut -d '/' -f 3 | tr '_' '-' | cut -d '.' -f 1) ; \ definitions=`echo "$$MODULE_DEFINITIONS_$*" | 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"` ; \ files=`echo "$$MODULE_FILES_$*" | 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 unit.module.spec.in | sed \ @@ -210,6 +230,7 @@ rpmbuild/SPECS/unit-%.spec: unit.module.spec.in ../../docs/changes.xml | rpmbuil -e "s#%%MODULE_INSTARGS%%#$(MODULE_INSTARGS_$*)#g" \ -e "s#%%MODULE_DEFINITIONS%%#$${definitions}#g" \ -e "s#%%MODULE_PREINSTALL%%#$${preinstall}#g" \ + -e "s#%%MODULE_POSTINSTALL%%#$${postinstall}#g" \ -e "s#%%MODULE_FILES%%#$${files}#g" \ -e "s#%%MODULE_POST%%#$${post}#g" \ > $@.tmp ; \ @@ -221,14 +242,15 @@ rpmbuild/SPECS/unit-%.spec: unit.module.spec.in ../../docs/changes.xml | rpmbuil mv $@.tmp $@ unit-%: check-build-depends-% rpmbuild/SPECS/unit-%.spec rpmbuild/SOURCES/unit-$(VERSION).tar.gz - @echo "===> Building $@ package" ; \ + @echo "===> Building $(subst _,-,$@) package" ; \ rpmbuild -D "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/$@.spec && \ - ln -s rpmbuild/BUILD/$@-$(VERSION)/build $@ + ln -s rpmbuild/BUILD/$(subst _,-,$@)-$(VERSION)/build $@ test: unit modules @{ \ - for so in `find rpmbuild/BUILD/*/build-nodebug/ -type f -name "*.so"`; do \ + for so in `find rpmbuild/BUILD/*/build-nodebug/ -type f \( -name "*.so" -o -name "*.jar" \)`; do \ soname=`basename $${so}` ; \ + test "$${soname}" = "java.unit.so" && continue ; \ test -h rpmbuild/BUILD/unit-$(VERSION)/build-nodebug/$${soname} || \ ln -fs `pwd`/$${so} rpmbuild/BUILD/unit-$(VERSION)/build-nodebug/$${soname} ; \ done ; \ @@ -237,8 +259,9 @@ test: unit modules test-debug: unit modules @{ \ - for so in `find rpmbuild/BUILD/*/build-debug/ -type f -name "*.so"`; do \ + for so in `find rpmbuild/BUILD/*/build-debug/ -type f \( -name "*.so" -o -name "*.jar" \)`; do \ soname=`basename $${so}` ; \ + test "$${soname}" = "java.unit.so" && continue ; \ test -h rpmbuild/BUILD/unit-$(VERSION)/build-debug/$${soname} || \ ln -fs `pwd`/$${so} rpmbuild/BUILD/unit-$(VERSION)/build-debug/$${soname} ; \ done ; \ -- cgit