-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·67 lines (53 loc) · 1.72 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# 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:=1
PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/caddyserver/caddy.git
PKG_SOURCE_VERSION:=240de5a5dd20caba4560b9463d532dc629aaab4c
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MD5SUM:=5184ff1ebade8ec13b19318940d43279
PKG_MAINTAINER:=SYB
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/caddyserver/caddy
GO_PKG_TAG:=-tags full
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define Package/$(PKG_NAME)
TITLE:=Caddy 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
Caddy is an extensible server platform that uses TLS by default.
endef
define Build/Prepare
$(call Build/Prepare/Default)
endef
define Build/Compile
$(eval GO_PKG_BUILD_PKG:=$(GO_PKG)/caddy)
$(call GoPackage/Build/Configure)
$(call GoPackage/Build/Compile)
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/caddy1
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/caddy $(1)/usr/caddy1
$(INSTALL_DIR) $(1)/etc/caddy
$(INSTALL_CONF) ./files/Caddyfile $(1)/etc/caddy/Caddyfile
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/caddy.init $(1)/etc/init.d/caddy
$(INSTALL_DIR) $(1)/etc/security
$(INSTALL_CONF) ./files/limits.conf $(1)/etc/security/limits.conf
endef
$(eval $(call GoBinPackage,$(PKG_NAME)))
$(eval $(call BuildPackage,$(PKG_NAME)))