Packages: made unit-go architecture-dependent.
This closes #172 issue on GitHub.
This commit is contained in:
@@ -199,7 +199,7 @@ endif
|
|||||||
prebuild=`echo "$$MODULE_PREBUILD_$*" | 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"` ; \
|
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"` ; \
|
post=`echo "$$MODULE_POST_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \
|
||||||
cat debian.module/$(if $(MODULE_NOARCH_$*),control-noarch.in,control.in) | sed \
|
cat debian.module/control.in | sed \
|
||||||
-e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \
|
-e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \
|
||||||
-e "s#%%SUMMARY%%#$(MODULE_SUMMARY_$*)#g" \
|
-e "s#%%SUMMARY%%#$(MODULE_SUMMARY_$*)#g" \
|
||||||
-e "s#%%CODENAME%%#$(CODENAME)#g" \
|
-e "s#%%CODENAME%%#$(CODENAME)#g" \
|
||||||
@@ -210,7 +210,7 @@ endif
|
|||||||
-e "s#%%MODULE_BUILD_DEPENDS%%#$(MODULE_BUILD_DEPENDS_$*)#g" \
|
-e "s#%%MODULE_BUILD_DEPENDS%%#$(MODULE_BUILD_DEPENDS_$*)#g" \
|
||||||
-e "s#%%MODULE_DEPENDS%%#$(MODULE_DEPENDS_$*)#g" \
|
-e "s#%%MODULE_DEPENDS%%#$(MODULE_DEPENDS_$*)#g" \
|
||||||
> $@/$(SRCDIR)/debian/control ; \
|
> $@/$(SRCDIR)/debian/control ; \
|
||||||
cat debian.module/$(if $(MODULE_NOARCH_$*),rules-noarch.in,rules.in) | sed \
|
cat debian.module/rules.in | sed \
|
||||||
-e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \
|
-e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \
|
||||||
-e "s#%%CODENAME%%#$(CODENAME)#g" \
|
-e "s#%%CODENAME%%#$(CODENAME)#g" \
|
||||||
-e "s#%%UNIT_VERSION%%#$(VERSION)#g" \
|
-e "s#%%UNIT_VERSION%%#$(VERSION)#g" \
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_go)
|
|||||||
MODULE_BUILD_DEPENDS_go=,golang
|
MODULE_BUILD_DEPENDS_go=,golang
|
||||||
MODULE_DEPENDS_go=,golang
|
MODULE_DEPENDS_go=,golang
|
||||||
|
|
||||||
MODULE_NOARCH_go= true
|
|
||||||
|
|
||||||
define MODULE_PREINSTALL_go
|
define MODULE_PREINSTALL_go
|
||||||
mkdir -p debian/unit-go/usr/share/doc/unit-go/examples/go-app
|
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-app debian/unit-go/usr/share/doc/unit-go/examples/go-app/let-my-people.go
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_go110)
|
|||||||
MODULE_BUILD_DEPENDS_go110=,golang-1.10
|
MODULE_BUILD_DEPENDS_go110=,golang-1.10
|
||||||
MODULE_DEPENDS_go110=,golang-1.10
|
MODULE_DEPENDS_go110=,golang-1.10
|
||||||
|
|
||||||
MODULE_NOARCH_go110= true
|
|
||||||
|
|
||||||
define MODULE_PREINSTALL_go110
|
define MODULE_PREINSTALL_go110
|
||||||
mkdir -p debian/unit-go1.10/usr/share/doc/unit-go1.10/examples/go-app
|
mkdir -p debian/unit-go1.10/usr/share/doc/unit-go1.10/examples/go-app
|
||||||
install -m 644 -p debian/unit.example-go-app debian/unit-go1.10/usr/share/doc/unit-go1.10/examples/go-app/let-my-people.go
|
install -m 644 -p debian/unit.example-go-app debian/unit-go1.10/usr/share/doc/unit-go1.10/examples/go-app/let-my-people.go
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_go17)
|
|||||||
MODULE_BUILD_DEPENDS_go17=,golang-1.7
|
MODULE_BUILD_DEPENDS_go17=,golang-1.7
|
||||||
MODULE_DEPENDS_go17=,golang-1.7
|
MODULE_DEPENDS_go17=,golang-1.7
|
||||||
|
|
||||||
MODULE_NOARCH_go17= true
|
|
||||||
|
|
||||||
define MODULE_PREINSTALL_go17
|
define MODULE_PREINSTALL_go17
|
||||||
mkdir -p debian/unit-go1.7/usr/share/doc/unit-go1.7/examples/go-app
|
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-go-app debian/unit-go1.7/usr/share/doc/unit-go1.7/examples/go-app/let-my-people.go
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_go18)
|
|||||||
MODULE_BUILD_DEPENDS_go18=,golang-1.8
|
MODULE_BUILD_DEPENDS_go18=,golang-1.8
|
||||||
MODULE_DEPENDS_go18=,golang-1.8
|
MODULE_DEPENDS_go18=,golang-1.8
|
||||||
|
|
||||||
MODULE_NOARCH_go18= true
|
|
||||||
|
|
||||||
define MODULE_PREINSTALL_go18
|
define MODULE_PREINSTALL_go18
|
||||||
mkdir -p debian/unit-go1.8/usr/share/doc/unit-go1.8/examples/go-app
|
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-go-app debian/unit-go1.8/usr/share/doc/unit-go1.8/examples/go-app/let-my-people.go
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_go19)
|
|||||||
MODULE_BUILD_DEPENDS_go19=,golang-1.9
|
MODULE_BUILD_DEPENDS_go19=,golang-1.9
|
||||||
MODULE_DEPENDS_go19=,golang-1.9
|
MODULE_DEPENDS_go19=,golang-1.9
|
||||||
|
|
||||||
MODULE_NOARCH_go19= true
|
|
||||||
|
|
||||||
define MODULE_PREINSTALL_go19
|
define MODULE_PREINSTALL_go19
|
||||||
mkdir -p debian/unit-go1.9/usr/share/doc/unit-go1.9/examples/go-app
|
mkdir -p debian/unit-go1.9/usr/share/doc/unit-go1.9/examples/go-app
|
||||||
install -m 644 -p debian/unit.example-go-app debian/unit-go1.9/usr/share/doc/unit-go1.9/examples/go-app/let-my-people.go
|
install -m 644 -p debian/unit.example-go-app debian/unit-go1.9/usr/share/doc/unit-go1.9/examples/go-app/let-my-people.go
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
Source: %%NAME%%
|
|
||||||
Section: admin
|
|
||||||
Priority: extra
|
|
||||||
Maintainer: Andrei Belov <defan@nginx.com>
|
|
||||||
Build-Depends: debhelper (>= 9),
|
|
||||||
linux-libc-dev%%MODULE_BUILD_DEPENDS%%
|
|
||||||
Standards-Version: 3.9.5
|
|
||||||
Homepage: https://unit.nginx.org
|
|
||||||
|
|
||||||
Package: %%NAME%%
|
|
||||||
Section: admin
|
|
||||||
Architecture: all
|
|
||||||
Depends: lsb-base,
|
|
||||||
${misc:Depends},
|
|
||||||
unit (= %%UNIT_VERSION%%-%%UNIT_RELEASE%%~%%CODENAME%%)%%MODULE_DEPENDS%%
|
|
||||||
Description: %%SUMMARY%%
|
|
||||||
NGINX Unit is a runtime and delivery environment for modern distributed
|
|
||||||
applications. It runs the application code in multiple languages
|
|
||||||
(PHP, Python, Go, etc.), and tightly couples it with traffic delivery
|
|
||||||
in and out of the application. Take this application server and proxy
|
|
||||||
directly in the cloud / container environments and fully control your app
|
|
||||||
dynamically via an API.
|
|
||||||
This package contains %%SUMMARY%%.
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
#!/usr/bin/make -f
|
|
||||||
|
|
||||||
# Uncomment this to turn on verbose mode.
|
|
||||||
#export DH_VERBOSE=1
|
|
||||||
|
|
||||||
export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie
|
|
||||||
export DEB_CFLAGS_MAINT_APPEND=-Wp,-D_FORTIFY_SOURCE=2 -fPIC
|
|
||||||
DPKG_EXPORT_BUILDFLAGS = 1
|
|
||||||
include /usr/share/dpkg/buildflags.mk
|
|
||||||
|
|
||||||
BUILDDIR_unit = $(CURDIR)/debian/build-unit
|
|
||||||
BUILDDIR_unit_debug = $(CURDIR)/debian/build-unit-debug
|
|
||||||
INSTALLDIR = $(CURDIR)/debian/%%NAME%%
|
|
||||||
BASEDIR = $(CURDIR)
|
|
||||||
|
|
||||||
%%MODULE_DEFINITIONS%%
|
|
||||||
|
|
||||||
config.env.%:
|
|
||||||
dh_testdir
|
|
||||||
mkdir -p $(BUILDDIR_$*)
|
|
||||||
cp -Pa $(CURDIR)/auto $(BUILDDIR_$*)/
|
|
||||||
cp -Pa $(CURDIR)/configure $(BUILDDIR_$*)/
|
|
||||||
cp -Pa $(CURDIR)/src $(BUILDDIR_$*)/
|
|
||||||
cp -Pa $(CURDIR)/test $(BUILDDIR_$*)/
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
configure.unit: config.env.unit
|
|
||||||
cd $(BUILDDIR_unit) && \
|
|
||||||
CFLAGS= ./configure \
|
|
||||||
%%CONFIGURE_ARGS%% \
|
|
||||||
--modules=/usr/lib/unit/modules \
|
|
||||||
--cc-opt="$(CFLAGS)" && \
|
|
||||||
./configure %%MODULE_CONFARGS%%
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
configure.unit_debug: config.env.unit_debug
|
|
||||||
cd $(BUILDDIR_unit_debug) && \
|
|
||||||
CFLAGS= ./configure \
|
|
||||||
%%CONFIGURE_ARGS%% \
|
|
||||||
--modules=/usr/lib/unit/debug-modules \
|
|
||||||
--cc-opt="$(CFLAGS)" \
|
|
||||||
--debug && \
|
|
||||||
./configure %%MODULE_CONFARGS%%
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
build-arch.%: configure.%
|
|
||||||
dh_testdir
|
|
||||||
$(MAKE) -C $(BUILDDIR_$*) %%MODULE_MAKEARGS%%
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
build-indep:
|
|
||||||
dh_testdir
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
build-arch: build-arch.unit build-arch.unit_debug
|
|
||||||
dh_testdir
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
build: build-arch build-indep
|
|
||||||
dh_testdir
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
clean:
|
|
||||||
dh_testdir
|
|
||||||
dh_testroot
|
|
||||||
dh_clean
|
|
||||||
find $(CURDIR) -maxdepth 1 -size 0 -delete
|
|
||||||
|
|
||||||
install: build
|
|
||||||
dh_testdir
|
|
||||||
dh_testroot
|
|
||||||
dh_prep
|
|
||||||
dh_installdirs
|
|
||||||
dh_installinit
|
|
||||||
dh_installlogrotate
|
|
||||||
%%MODULE_PREINSTALL%%
|
|
||||||
cd $(BUILDDIR_unit) && \
|
|
||||||
DESTDIR=$(INSTALLDIR) make %%MODULE_INSTARGS%%
|
|
||||||
cd $(BUILDDIR_unit_debug) && \
|
|
||||||
DESTDIR=$(INSTALLDIR) make %%MODULE_INSTARGS%%
|
|
||||||
|
|
||||||
binary-indep: build install
|
|
||||||
dh_testdir
|
|
||||||
dh_testroot
|
|
||||||
dh_installdocs
|
|
||||||
dh_installchangelogs
|
|
||||||
dh_link
|
|
||||||
dh_compress
|
|
||||||
dh_fixperms
|
|
||||||
dh_installdeb
|
|
||||||
dh_perl
|
|
||||||
dh_gencontrol
|
|
||||||
dh_md5sums
|
|
||||||
dh_builddeb
|
|
||||||
|
|
||||||
binary-arch: install
|
|
||||||
|
|
||||||
binary: binary-indep binary-arch
|
|
||||||
|
|
||||||
.PHONY: clean binary-indep binary-arch binary install build
|
|
||||||
@@ -26,13 +26,11 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_go)
|
|||||||
ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed))
|
ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed))
|
||||||
define MODULE_DEFINITIONS_go
|
define MODULE_DEFINITIONS_go
|
||||||
BuildRequires: $(BUILD_DEPENDS_go)
|
BuildRequires: $(BUILD_DEPENDS_go)
|
||||||
BuildArch: noarch
|
|
||||||
%define gopath /usr/share/go/contrib
|
%define gopath /usr/share/go/contrib
|
||||||
endef
|
endef
|
||||||
else
|
else
|
||||||
define MODULE_DEFINITIONS_go
|
define MODULE_DEFINITIONS_go
|
||||||
BuildRequires: $(BUILD_DEPENDS_go)
|
BuildRequires: $(BUILD_DEPENDS_go)
|
||||||
BuildArch: noarch
|
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
export MODULE_DEFINITIONS_go
|
export MODULE_DEFINITIONS_go
|
||||||
|
|||||||
Reference in New Issue
Block a user