aboutsummaryrefslogtreecommitdiffstats
path: root/packages/nginx_ldp.mk
diff options
context:
space:
mode:
authorxiaolongx.jiang <xiaolongx.jiang@intel.com>2020-05-12 05:07:26 +0000
committerxiaolongx.jiang <xiaolongx.jiang@intel.com>2020-05-15 16:42:40 +0000
commit5fad054675b47633f5ba1e33f775e34be4917c06 (patch)
tree49a3eafb868726c4478c18f7dc732799228c3c4b /packages/nginx_ldp.mk
parent1e75471aed27194fb8ee0b2c07c64fb8a8f55279 (diff)
add makefile
Signed-off-by: xiaolongx.jiang <xiaolongx.jiang@intel.com> Change-Id: Iaf6ec4d79538f8810d0c0ebc69b458d40ffb9c53
Diffstat (limited to 'packages/nginx_ldp.mk')
-rw-r--r--packages/nginx_ldp.mk69
1 files changed, 69 insertions, 0 deletions
diff --git a/packages/nginx_ldp.mk b/packages/nginx_ldp.mk
new file mode 100644
index 0000000..cde52a2
--- /dev/null
+++ b/packages/nginx_ldp.mk
@@ -0,0 +1,69 @@
+# Copyright (c) 2020 Intel and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+nginx_ldp_version := 1.14.2
+nginx_ldp_src_dir := $(B)/nginx_ldp
+nginx_ldp_install_dir := $(I)/local/nginx
+nginx_ldp_deb_inst_dir := /usr/local/nginx
+nginx_ldp_pkg_deb_name := nginx
+nginx_ldp_pkg_deb_dir := $(I)/deb-ldp
+nginx_ldp_tarball := nginx-$(nginx_ldp_version).tar.gz
+nginx_ldp_tarball_strip_dirs := 1
+nginx_ldp_desc := "ldp nginx"
+
+
+define nginx_ldp_patch_cmds
+ @true
+endef
+
+define nginx_ldp_config_cmds
+ @cd $(nginx_ldp_src_dir); \
+ ./configure --prefix=$(nginx_ldp_install_dir) \
+ --with-http_stub_status_module \
+ --with-http_ssl_module
+endef
+
+define nginx_ldp_build_cmds
+ @$(MAKE) -C $(nginx_ldp_src_dir)
+endef
+
+define nginx_ldp_install_cmds
+ @$(MAKE) -C $(nginx_ldp_src_dir) install
+ @cp configs/mime.types $(nginx_ldp_install_dir)/conf/.
+ @cp configs/nginx.conf $(nginx_ldp_install_dir)/conf/.
+ @cp configs/tls-* $(nginx_ldp_install_dir)/conf/.
+ @cp configs/vcl.conf $(nginx_ldp_install_dir)/conf/.
+endef
+
+define nginx_ldp_pkg_deb_cmds
+ @fpm -f -s dir \
+ -t deb \
+ -n $(nginx_ldp_pkg_deb_name) \
+ -v $(nginx_ldp_version) \
+ -C $(nginx_ldp_install_dir) \
+ -p $(nginx_ldp_pkg_deb_dir) \
+ --prefix $(nginx_ldp_deb_inst_dir) \
+ --license $(LICENSE) \
+ --iteration $(LINUX_ITER) \
+ --vendor Intel \
+ --description $(nginx_ldp_desc) \
+ --deb-no-default-config-files \
+ --pre-install packages/pre-install
+endef
+
+define nginx_ldp_pkg_deb_cp_cmds
+ @echo "--- copy deb to $(CURDIR)/deb-ldp ---"
+ @cp $(nginx_ldp_pkg_deb_dir)/*.deb deb-ldp/.
+endef
+
+$(eval $(call package,nginx_ldp))