Packages: added unit-jsc (Java Servlet Container) family.

This commit is contained in:
Andrei Belov
2019-02-28 18:22:15 +03:00
parent 834e8ca576
commit 7ce6f05975
24 changed files with 2408 additions and 14 deletions

View File

@@ -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 ; \