Packages: added njs support.
This commit is contained in:
@@ -115,7 +115,7 @@ include Makefile.jsc-common
|
|||||||
include Makefile.jsc11
|
include Makefile.jsc11
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CONFIGURE_ARGS=\
|
CONFIGURE_ARGS_COMMON=\
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--state=/var/lib/unit \
|
--state=/var/lib/unit \
|
||||||
--control="unix:/var/run/control.unit.sock" \
|
--control="unix:/var/run/control.unit.sock" \
|
||||||
@@ -127,6 +127,10 @@ CONFIGURE_ARGS=\
|
|||||||
--tests \
|
--tests \
|
||||||
--openssl
|
--openssl
|
||||||
|
|
||||||
|
CONFIGURE_ARGS=\
|
||||||
|
$(CONFIGURE_ARGS_COMMON) \
|
||||||
|
--njs
|
||||||
|
|
||||||
export CR=\\n
|
export CR=\\n
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -195,7 +199,7 @@ endif
|
|||||||
debuild/unit_$(VERSION).orig.tar.gz: | debuild/$(SRCDIR)/debian
|
debuild/unit_$(VERSION).orig.tar.gz: | debuild/$(SRCDIR)/debian
|
||||||
cd ../.. && tar -czf pkg/deb/debuild/$(SRCDIR).tar.gz \
|
cd ../.. && tar -czf pkg/deb/debuild/$(SRCDIR).tar.gz \
|
||||||
--transform "s#^#$(SRCDIR)/#" \
|
--transform "s#^#$(SRCDIR)/#" \
|
||||||
LICENSE NOTICE CHANGES README.md CONTRIBUTING.md configure auto src test version go docs/man/unitd.8.in
|
LICENSE NOTICE CHANGES README.md CONTRIBUTING.md configure auto src test version go pkg/contrib docs/man/unitd.8.in
|
||||||
mv debuild/$(SRCDIR).tar.gz debuild/unit_$(VERSION).orig.tar.gz
|
mv debuild/$(SRCDIR).tar.gz debuild/unit_$(VERSION).orig.tar.gz
|
||||||
cd debuild && tar zxf unit_$(VERSION).orig.tar.gz
|
cd debuild && tar zxf unit_$(VERSION).orig.tar.gz
|
||||||
|
|
||||||
@@ -257,7 +261,7 @@ endif
|
|||||||
-e "s#%%CODENAME%%#$(CODENAME)#g" \
|
-e "s#%%CODENAME%%#$(CODENAME)#g" \
|
||||||
-e "s#%%UNIT_VERSION%%#$(VERSION)#g" \
|
-e "s#%%UNIT_VERSION%%#$(VERSION)#g" \
|
||||||
-e "s#%%UNIT_RELEASE%%#$(RELEASE)#g" \
|
-e "s#%%UNIT_RELEASE%%#$(RELEASE)#g" \
|
||||||
-e "s#%%CONFIGURE_ARGS%%#$(CONFIGURE_ARGS)#g" \
|
-e "s#%%CONFIGURE_ARGS%%#$(CONFIGURE_ARGS_COMMON)#g" \
|
||||||
-e "s#%%MODULE_CONFARGS%%#$(MODULE_CONFARGS_$*)#g" \
|
-e "s#%%MODULE_CONFARGS%%#$(MODULE_CONFARGS_$*)#g" \
|
||||||
-e "s#%%MODULE_MAKEARGS%%#$(MODULE_MAKEARGS_$*)#g" \
|
-e "s#%%MODULE_MAKEARGS%%#$(MODULE_MAKEARGS_$*)#g" \
|
||||||
-e "s#%%MODULE_INSTARGS%%#$(MODULE_INSTARGS_$*)#g" \
|
-e "s#%%MODULE_INSTARGS%%#$(MODULE_INSTARGS_$*)#g" \
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ Maintainer: %%PACKAGE_VENDOR%%
|
|||||||
Build-Depends: debhelper (>= 11),
|
Build-Depends: debhelper (>= 11),
|
||||||
linux-libc-dev,
|
linux-libc-dev,
|
||||||
libssl-dev,
|
libssl-dev,
|
||||||
libpcre2-dev
|
libpcre2-dev,
|
||||||
|
pkg-config
|
||||||
Standards-Version: 4.1.4
|
Standards-Version: 4.1.4
|
||||||
Homepage: https://unit.nginx.org
|
Homepage: https://unit.nginx.org
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,12 @@ BASEDIR = $(CURDIR)
|
|||||||
|
|
||||||
DOTESTS = 0
|
DOTESTS = 0
|
||||||
|
|
||||||
config.env.%:
|
njs:
|
||||||
|
dh_testdir
|
||||||
|
cd pkg/contrib && make .njs
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
config.env.%: njs
|
||||||
dh_testdir
|
dh_testdir
|
||||||
mkdir -p $(BUILDDIR_$*)
|
mkdir -p $(BUILDDIR_$*)
|
||||||
cp -Pa $(CURDIR)/auto $(BUILDDIR_$*)/
|
cp -Pa $(CURDIR)/auto $(BUILDDIR_$*)/
|
||||||
@@ -40,6 +45,7 @@ config.env.%:
|
|||||||
|
|
||||||
configure.unit: config.env.unit
|
configure.unit: config.env.unit
|
||||||
cd $(BUILDDIR_unit) && \
|
cd $(BUILDDIR_unit) && \
|
||||||
|
PKG_CONFIG_PATH=$(CURDIR)/pkg/contrib/njs/build \
|
||||||
CFLAGS= ./configure \
|
CFLAGS= ./configure \
|
||||||
%%CONFIGURE_ARGS%% \
|
%%CONFIGURE_ARGS%% \
|
||||||
--modules=/usr/lib/unit/modules \
|
--modules=/usr/lib/unit/modules \
|
||||||
@@ -50,6 +56,7 @@ configure.unit: config.env.unit
|
|||||||
|
|
||||||
configure.unit_debug: config.env.unit_debug
|
configure.unit_debug: config.env.unit_debug
|
||||||
cd $(BUILDDIR_unit_debug) && \
|
cd $(BUILDDIR_unit_debug) && \
|
||||||
|
PKG_CONFIG_PATH=$(CURDIR)/pkg/contrib/njs/build \
|
||||||
CFLAGS= ./configure \
|
CFLAGS= ./configure \
|
||||||
%%CONFIGURE_ARGS%% \
|
%%CONFIGURE_ARGS%% \
|
||||||
--modules=/usr/lib/unit/debug-modules \
|
--modules=/usr/lib/unit/debug-modules \
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ include Makefile.jsc8
|
|||||||
include Makefile.jsc11
|
include Makefile.jsc11
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CONFIGURE_ARGS=\
|
CONFIGURE_ARGS_COMMON=\
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--state=%{_sharedstatedir}/unit \
|
--state=%{_sharedstatedir}/unit \
|
||||||
--control="unix:/var/run/unit/control.sock" \
|
--control="unix:/var/run/unit/control.sock" \
|
||||||
@@ -118,6 +118,10 @@ CONFIGURE_ARGS=\
|
|||||||
--tests \
|
--tests \
|
||||||
--openssl
|
--openssl
|
||||||
|
|
||||||
|
CONFIGURE_ARGS=\
|
||||||
|
$(CONFIGURE_ARGS_COMMON) \
|
||||||
|
--njs
|
||||||
|
|
||||||
export CR=\\n
|
export CR=\\n
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -176,7 +180,7 @@ endif
|
|||||||
rpmbuild/SOURCES/unit-$(VERSION).tar.gz:
|
rpmbuild/SOURCES/unit-$(VERSION).tar.gz:
|
||||||
cd ../.. && tar -czf pkg/rpm/rpmbuild/SOURCES/unit-$(VERSION).tar.gz \
|
cd ../.. && tar -czf pkg/rpm/rpmbuild/SOURCES/unit-$(VERSION).tar.gz \
|
||||||
--transform "s#^#unit-$(VERSION)/#" \
|
--transform "s#^#unit-$(VERSION)/#" \
|
||||||
LICENSE NOTICE CHANGES README.md CONTRIBUTING.md configure auto src test version go docs/man/unitd.8.in
|
LICENSE NOTICE CHANGES README.md CONTRIBUTING.md configure auto src test version go pkg/contrib docs/man/unitd.8.in
|
||||||
|
|
||||||
unit: check-build-depends-unit rpmbuild/SPECS/unit.spec rpmbuild/SOURCES/unit-$(VERSION).tar.gz
|
unit: check-build-depends-unit rpmbuild/SPECS/unit.spec rpmbuild/SOURCES/unit-$(VERSION).tar.gz
|
||||||
@echo "===> Building $@ package" ; \
|
@echo "===> Building $@ package" ; \
|
||||||
@@ -212,7 +216,7 @@ rpmbuild/SPECS/unit-%.spec: unit.module.spec.in ../../docs/changes.xml | rpmbuil
|
|||||||
-e "s#%%UNIT_RELEASE%%#$(RELEASE)#g" \
|
-e "s#%%UNIT_RELEASE%%#$(RELEASE)#g" \
|
||||||
-e "s#%%PACKAGE_VENDOR%%#$(PACKAGE_VENDOR)#g" \
|
-e "s#%%PACKAGE_VENDOR%%#$(PACKAGE_VENDOR)#g" \
|
||||||
-e "s#%%MODULE_SOURCES%%#$${sources}#g" \
|
-e "s#%%MODULE_SOURCES%%#$${sources}#g" \
|
||||||
-e "s#%%CONFIGURE_ARGS%%#$(CONFIGURE_ARGS)#g" \
|
-e "s#%%CONFIGURE_ARGS%%#$(CONFIGURE_ARGS_COMMON)#g" \
|
||||||
-e "s#%%MODULE_CONFARGS%%#$(MODULE_CONFARGS_$*)#g" \
|
-e "s#%%MODULE_CONFARGS%%#$(MODULE_CONFARGS_$*)#g" \
|
||||||
-e "s#%%MODULE_MAKEARGS%%#$(MODULE_MAKEARGS_$*)#g" \
|
-e "s#%%MODULE_MAKEARGS%%#$(MODULE_MAKEARGS_$*)#g" \
|
||||||
-e "s#%%MODULE_INSTARGS%%#$(MODULE_INSTARGS_$*)#g" \
|
-e "s#%%MODULE_INSTARGS%%#$(MODULE_INSTARGS_$*)#g" \
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ Requires(preun): systemd
|
|||||||
Requires(postun): systemd
|
Requires(postun): systemd
|
||||||
|
|
||||||
BuildRequires: pcre2-devel
|
BuildRequires: pcre2-devel
|
||||||
|
BuildRequires: pkg-config
|
||||||
|
|
||||||
Provides: unit-r%{version}
|
Provides: unit-r%{version}
|
||||||
|
|
||||||
@@ -74,6 +75,9 @@ Library and include files required for NGINX Unit modules development.
|
|||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%{__make} %{?_smp_mflags} -C pkg/contrib .njs
|
||||||
|
|
||||||
|
PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \
|
||||||
./configure \
|
./configure \
|
||||||
%{CONFIGURE_ARGS} \
|
%{CONFIGURE_ARGS} \
|
||||||
--modules=%{_libdir}/unit/debug-modules \
|
--modules=%{_libdir}/unit/debug-modules \
|
||||||
@@ -84,6 +88,8 @@ Library and include files required for NGINX Unit modules development.
|
|||||||
%{__make} %{?_smp_mflags}
|
%{__make} %{?_smp_mflags}
|
||||||
%{__make} %{?_smp_mflags} build/libunit.a
|
%{__make} %{?_smp_mflags} build/libunit.a
|
||||||
%{__mv} build build-debug
|
%{__mv} build build-debug
|
||||||
|
|
||||||
|
PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \
|
||||||
./configure \
|
./configure \
|
||||||
%{CONFIGURE_ARGS} \
|
%{CONFIGURE_ARGS} \
|
||||||
--modules=%{_libdir}/unit/modules \
|
--modules=%{_libdir}/unit/modules \
|
||||||
|
|||||||
Reference in New Issue
Block a user