summaryrefslogtreecommitdiffhomepage
path: root/pkg/rpm/Makefile
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2018-03-01 23:03:03 +0300
committerAndrei Belov <defan@nginx.com>2018-03-01 23:03:03 +0300
commit2d2b5048bc2150ed9abe7f0f24372442e277b738 (patch)
tree25e6c9361709b590b3276174d2218e14dec5a5f5 /pkg/rpm/Makefile
parent1f06ccb6d898b6dbb2506e4a893691a67da80130 (diff)
downloadunit-2d2b5048bc2150ed9abe7f0f24372442e277b738.tar.gz
unit-2d2b5048bc2150ed9abe7f0f24372442e277b738.tar.bz2
Packages: added openSUSE Leap, openSUSE Tumbleweed, SLES support.
Diffstat (limited to 'pkg/rpm/Makefile')
-rw-r--r--pkg/rpm/Makefile50
1 files changed, 45 insertions, 5 deletions
diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile
index 37132fa8..0373a52d 100644
--- a/pkg/rpm/Makefile
+++ b/pkg/rpm/Makefile
@@ -8,21 +8,40 @@ DEFAULT_RELEASE := 1
VERSION ?= $(DEFAULT_VERSION)
RELEASE ?= $(DEFAULT_RELEASE)
-BUILD_DEPENDS_unit = gcc libxml2 libxslt rpm-build rpmlint
-BUILD_DEPENDS = $(BUILD_DEPENDS_unit)
-
ifeq ($(shell rpm --eval "%{?rhel}"), 6)
OSVER = centos6
else ifeq ($(shell rpm --eval "%{?rhel}"), 7)
OSVER = centos7
-BUILD_DEPENDS += which
else ifeq ($(shell rpm --eval "%{?amzn}"), 1)
OSVER = amazonlinux1
-BUILD_DEPENDS += system-rpm-config
else ifeq ($(shell rpm --eval "%{?amzn}"), 2)
OSVER = amazonlinux2
+else ifeq ($(shell test `rpm --eval '0%{?suse_version} -ge 1315 -a 0%{?suse_version} -lt 1330 -a 0%{?is_opensuse} -eq 1'`; echo $$?), 0)
+OSVER = opensuse-leap
+else ifeq ($(shell test `rpm --eval '0%{?suse_version} -ge 1330 -a 0%{?is_opensuse} -eq 1'`; echo $$?), 0)
+OSVER = opensuse-tumbleweed
+else ifeq ($(shell test `rpm --eval '0%{?suse_version} -ge 1315 -a 0%{?is_opensuse} -eq 0'`; echo $$?), 0)
+OSVER = sles
+endif
+
+BUILD_DEPENDS_unit = gcc rpm-build rpmlint
+
+ifeq ($(OSVER), centos7)
+BUILD_DEPENDS_unit += which
+endif
+
+ifeq ($(OSVER), amazonlinux1)
+BUILD_DEPENDS_unit += system-rpm-config
endif
+ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed sles))
+BUILD_DEPENDS_unit += libxml2-tools libxslt1
+else
+BUILD_DEPENDS_unit += libxml2 libxslt
+endif
+
+BUILD_DEPENDS = $(BUILD_DEPENDS_unit)
+
MODULES=
ifneq (,$(findstring $(OSVER),centos6 centos7 amazonlinux2))
@@ -42,6 +61,27 @@ include Makefile.go
include Makefile.perl
endif
+ifeq ($(OSVER), opensuse-leap)
+include Makefile.python27
+include Makefile.python34
+include Makefile.go
+include Makefile.perl
+endif
+
+ifeq ($(OSVER), opensuse-tumbleweed)
+include Makefile.php
+include Makefile.python27
+include Makefile.python36
+include Makefile.go
+include Makefile.perl
+endif
+
+ifeq ($(OSVER), sles)
+include Makefile.python27
+include Makefile.python34
+include Makefile.perl
+endif
+
CONFIGURE_ARGS=\
--prefix=/usr \
--state=%{_sharedstatedir}/unit \