libnpupnp: add
authorRosen Penev <rosenp@gmail.com>
Fri, 1 May 2020 22:06:18 +0000 (15:06 -0700)
committerRosen Penev <rosenp@gmail.com>
Sun, 3 May 2020 00:23:07 +0000 (17:23 -0700)
This is needed for newer versions of libupnpp. This may or may not also
be needed for newer versions of Gerbera.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/libnpupnp/Makefile [new file with mode: 0644]

diff --git a/libs/libnpupnp/Makefile b/libs/libnpupnp/Makefile
new file mode 100644 (file)
index 0000000..ebeec33
--- /dev/null
@@ -0,0 +1,51 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libnpupnp
+PKG_VERSION:=2.2.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.lesbonscomptes.com/upmpdcli/downloads
+PKG_HASH:=da67d4c258d139d476af6b800926cd9cd09ba17d9e9fcfaebe3fb98241b32790
+
+PKG_MAINTAINER:=
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libnpupnp
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+libstdcpp +libexpat +libcurl +libmicrohttpd
+  TITLE:=A C++ base UPnP library
+  URL:=https://framagit.org/medoc92/npupnp
+endef
+
+define Package/libnpupnp/description
+npupnp (new pupnp or not pupnp ?) is an UPnP library derived from the
+venerable pupnp (https://github.com/pupnp/pupnp), based on its 1.6.x
+branch (around 1.6.25).
+endef
+
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -flto
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/npupnp/upnp
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/npupnp/upnp/* $(1)/usr/include/npupnp/upnp
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnpupnp.so* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnpupnp.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libnpupnp/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnpupnp.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libnpupnp))