Merge pull request #9137 from nickberry17/master
[feed/packages.git] / net / dcwifi / dcwapd / Makefile
1 #
2 # Copyright (C) 2019 EWSI
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=dcwapd
11 PKG_VERSION:=1.0.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
16 PKG_HASH:=750a08abccd88d9aeda942307f76ce5711181c06f9f3e8fded5cb5ce42bac323
17
18 PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
19 PKG_LICENSE:=Apache-2.0
20 PKG_LICENSE_FILES:=COPYING
21
22 PKG_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/uclibc++.mk
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/dcwapd
30 SECTION:=net
31 CATEGORY:=Network
32 SUBMENU:=Routing and Redirection
33 TITLE:=Dual-Channel WiFi AP daemon
34 URL:=https://www.edgewaterwireless.com
35 DEPENDS:=$(CXX_DEPENDS) +kmod-macremapper +libdcwsocket +libdcwproto +mrmctl +libuci
36 endef
37
38 define Package/dcwapd/description
39 Implementation of the Dual-Channel WiFi AP daemon
40 endef
41
42 CONFIGURE_ARGS += \
43 --enable-platform=linuxjsonstatic \
44 --enable-shared
45
46 TARGET_CXXFLAGS += -std=c++11 -DRAPIDJSON_HAS_CXX11_RVALUE_REFS=0 -ffunction-sections -fdata-sections -flto
47 TARGET_LDFLAGS += -ldcwproto -ldcwsocket -lmrmfilterparser -luci -Wl,--gc-sections,--as-needed
48
49 define Build/InstallDev
50 $(INSTALL_DIR) $(1)/usr/lib
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
52 endef
53
54 define Package/dcwapd/install
55 $(INSTALL_DIR) $(1)/bin
56 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/bin/
57 $(INSTALL_DIR) $(1)/usr/lib
58 # Note: $(INSTALL_BIN) does not keep symlinks, so use $(CP)
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
60
61 # Utility files
62 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
63 $(INSTALL_DATA) ./files/*.inc $(1)/etc/$(PKG_NAME)/
64 $(INSTALL_BIN) ./files/*.sh $(1)/etc/$(PKG_NAME)/
65 # UCI config file copy - this is here for convenience and reference only
66 $(INSTALL_DATA) ./files/dcwapd.uci $(1)/etc/$(PKG_NAME)/
67
68 # UCI config file
69 $(INSTALL_DIR) $(1)/etc/config
70 $(INSTALL_DATA) ./files/dcwapd.uci $(1)/etc/config/dcwapd
71
72 # Init script
73 $(INSTALL_DIR) $(1)/etc/init.d
74 $(INSTALL_BIN) ./files/dcwapd.init.d $(1)/etc/init.d/dcwapd
75 endef
76 $(eval $(call BuildPackage,dcwapd))