Create Makefile
This commit is contained in:
parent
50a2b669d2
commit
0105764798
60
caddy/Makefile
Normal file
60
caddy/Makefile
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
# Copyright (C) 2010-2020 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=caddy
|
||||||
|
PKG_VERSION:=2.7.6
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://codeload.github.com//caddyserver/caddy/tar.gz/v$(PKG_VERSION)?
|
||||||
|
PKG_HASH:=skip
|
||||||
|
|
||||||
|
PKG_BUILD_DEPENDS:=golang/host
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_USE_MIPS16:=0
|
||||||
|
PKG_BUILD_FLAGS:=no-mips16
|
||||||
|
|
||||||
|
GO_PKG:=github.com/caddyserver/caddy/v2
|
||||||
|
GO_PKG_BUILD_PKG:=$(GO_PKG)/caddy
|
||||||
|
GO_PKG_LDFLAGS:=-s -w
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||||
|
|
||||||
|
define Package/$(PKG_NAME)
|
||||||
|
TITLE:=Caddy2 is an open source web server
|
||||||
|
URL:=https://caddyserver.com
|
||||||
|
SECTION:=net
|
||||||
|
CATEGORY:=Network
|
||||||
|
SUBMENU:=Web Servers/Proxies
|
||||||
|
DEPENDS:=$(GO_ARCH_DEPENDS) +libpthread
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/$(PKG_NAME)/description
|
||||||
|
Still the only web server to use TLS automatically and by default. Deploy and scale HTTPS effortlessly with Caddy2.
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
$(call Build/Prepare/Default)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(eval GO_PKG_BUILD_PKG:=$(GO_PKG)/cmd/caddy)
|
||||||
|
$(call GoPackage/Build/Configure)
|
||||||
|
$(call GoPackage/Build/Compile)
|
||||||
|
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/caddy
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/$(PKG_NAME)/install
|
||||||
|
$(INSTALL_DIR) $(1)/tmp
|
||||||
|
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/caddy $(1)/tmp/caddy
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call GoBinPackage,$(PKG_NAME)))
|
||||||
|
$(eval $(call BuildPackage,$(PKG_NAME)))
|
Loading…
x
Reference in New Issue
Block a user