Merge pull request #9137 from nickberry17/master
[feed/packages.git] / net / dcwifi / mrmctl / 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:=mrmctl
11 PKG_VERSION:=1.0.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=macremapper-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/ewsi/macremapper/tar.gz/v$(PKG_VERSION)?
16 PKG_HASH:=f054201dd805ce005b89606a507b58a5717d383a4339c69dfdc02f0202935437
17 PKG_BUILD_DIR:=$(BUILD_DIR)/macremapper-$(PKG_VERSION)
18
19 PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
20 PKG_LICENSE:=Apache-2.0
21 PKG_LICENSE_FILES:=userland/COPYING
22
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/mrmctl
29 SECTION:=utils
30 CATEGORY:=Utilities
31 TITLE:=mrmctl utility (macremapper kernel module)
32 URL:=https://www.edgewaterwireless.com
33 DEPENDS:= +kmod-macremapper
34 endef
35
36 define Package/mrmctl/description
37 Command-line utility to manually manipulate the macremapper kernel module
38 endef
39
40 MAKE_PATH:=userland
41 CONFIGURE_PATH:=userland
42 CONFIGURE_ARGS += \
43 --enable-shared
44
45 TARGET_CFLAGS += -std=c89 -ffunction-sections -fdata-sections -flto
46 TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
47
48 define Build/InstallDev
49 $(INSTALL_DIR) $(1)/usr/include
50 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
51 $(INSTALL_DIR) $(1)/usr/lib
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
53 endef
54
55 define Package/mrmctl/install
56 $(INSTALL_DIR) $(1)/bin
57 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/bin/
58
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
61 endef
62
63 $(eval $(call BuildPackage,mrmctl))