Merge pull request #11353 from kvuorine/fwknop-fixes
[feed/packages.git] / libs / libdcwsocket / 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:=libdcwsocket
11 PKG_VERSION:=1.1.0
12 PKG_RELEASE:=2
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_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17 PKG_HASH:=71383c4d8c5f58c1299a3717d7de9a8b5dabfd51a2dcf9993248f2709908d23a
18
19 PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
20 PKG_LICENSE:=Apache-2.0
21 PKG_LICENSE_FILES:=COPYING
22
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libdcwsocket
29 SECTION:=libs
30 CATEGORY:=Libraries
31 SUBMENU:=Networking
32 TITLE:=Dual-Channel socket library
33 URL:=https://www.edgewaterwireless.com
34 endef
35
36 define Package/libdcwsocket/description
37 User-land C library for sending and receiving DCW "EtherType"d messages
38 endef
39
40 TARGET_CFLAGS += -std=c89 -ffunction-sections -fdata-sections -flto
41 TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
42
43 define Build/InstallDev
44 $(INSTALL_DIR) $(1)/usr/include
45 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
46 $(INSTALL_DIR) $(1)/usr/lib
47 $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)*.so* $(1)/usr/lib/
48 endef
49
50 define Package/libdcwsocket/install
51 $(INSTALL_DIR) $(1)/usr/lib
52 # Note: $(INSTALL_BIN) does not keep symlinks, so use $(CP)
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)*.so* $(1)/usr/lib/
54 endef
55
56 $(eval $(call BuildPackage,libdcwsocket))