usbmuxd: Update to latest git
[feed/packages.git] / net / miniupnpd / Makefile
1 #
2 # Copyright (C) 2006-2014 OpenWrt.org
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:=miniupnpd
11 PKG_VERSION:=2.1.20180706
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_HASH:=fc2d2fd044d8c3f8d02b63d70489bb35ece836a4fc1b6386865ac8fbe8d8b006
17
18 PKG_LICENSE:=BSD-3-Clause
19
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/version.mk
22
23 define Package/miniupnpd
24 SECTION:=net
25 CATEGORY:=Network
26 DEPENDS:=+iptables +libip4tc +IPV6:libip6tc +IPV6:ip6tables +libuuid
27 TITLE:=Lightweight UPnP IGD, NAT-PMP & PCP daemon
28 SUBMENU:=Firewall
29 URL:=https://miniupnp.tuxfamily.org/
30 endef
31
32 define Package/miniupnpd/conffiles
33 /etc/config/upnpd
34 endef
35
36 define Build/Prepare
37 $(call Build/Prepare/Default)
38 echo "$(VERSION_NUMBER)" | tr '() ' '_' >$(PKG_BUILD_DIR)/os.openwrt
39 endef
40
41 TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
42 TARGET_CFLAGS += -flto -ffunction-sections -fdata-sections -O2
43 TARGET_LDFLAGS += $(FPIC) -flto -Wl,--gc-sections
44 MAKE_FLAGS += \
45 TARGET_OPENWRT=1 TEST=0 LIBS="" \
46 CC="$(TARGET_CC) -DIPTABLES_143 -lip4tc -luuid \
47 $(if $(CONFIG_IPV6),-lip6tc)" \
48 CONFIG_OPTIONS="--portinuse --leasefile --igd2 \
49 $(if $(CONFIG_IPV6),--ipv6)" \
50 -f Makefile.linux miniupnpd
51
52 define Package/miniupnpd/install
53 $(INSTALL_DIR) $(1)/usr/sbin
54 $(INSTALL_DIR) $(1)/etc/init.d
55 $(INSTALL_DIR) $(1)/etc/config
56 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
57 $(INSTALL_DIR) $(1)/etc/uci-defaults
58 $(INSTALL_DIR) $(1)/usr/share/miniupnpd
59
60 $(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/sbin/miniupnpd
61 $(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
62 $(INSTALL_CONF) ./files/upnpd.config $(1)/etc/config/upnpd
63 $(INSTALL_DATA) ./files/miniupnpd.hotplug $(1)/etc/hotplug.d/iface/50-miniupnpd
64 $(INSTALL_BIN) ./files/miniupnpd.defaults $(1)/etc/uci-defaults/99-miniupnpd
65 $(INSTALL_DATA) ./files/firewall.include $(1)/usr/share/miniupnpd/firewall.include
66 endef
67
68 $(eval $(call BuildPackage,miniupnpd))