avahi: backport CVE fixes from upstream
[feed/packages.git] / libs / npth / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=npth
4 PKG_VERSION:=1.6
5 PKG_RELEASE:=1
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
8 PKG_SOURCE_URL:=https://gnupg.org/ftp/gcrypt/$(PKG_NAME)
9 PKG_HASH:=1393abd9adcf0762d34798dc34fdcf4d0d22a8410721e76f1e3afcd1daa4e2d1
10
11 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
12 PKG_LICENSE:=LGPL-2.1-or-later
13 PKG_LICENSE_FILES:=COPYING.LIB
14
15 PKG_FIXUP:=autoreconf
16 PKG_INSTALL:=1
17 PKG_BUILD_PARALLEL:=1
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libnpth
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=The New GNU Portable Threads Library
25 URL:=https://gnupg.org/software/npth/index.html
26 DEPENDS:=+libgpg-error
27 endef
28
29 define Package/libnpth/description
30 nPth is a library to provide the GNU Pth API and thus a non-preemptive threads implementation.
31 endef
32
33 define Build/InstallDev
34 $(INSTALL_DIR) $(2)/bin $(1)/usr/bin
35 $(INSTALL_BIN) \
36 $(PKG_INSTALL_DIR)/usr/bin/npth-config \
37 $(2)/bin/
38 $(SED) \
39 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
40 $(2)/bin/npth-config
41 ln -sf $(STAGING_DIR)/host/bin/npth-config $(1)/usr/bin/npth-config
42
43 $(INSTALL_DIR) $(1)/usr/include
44 $(INSTALL_DATA) \
45 $(PKG_INSTALL_DIR)/usr/include/npth.h \
46 $(1)/usr/include/
47
48 $(INSTALL_DIR) $(1)/usr/lib
49 $(CP) \
50 $(PKG_INSTALL_DIR)/usr/lib/libnpth.{la,so*} \
51 $(1)/usr/lib/
52
53 $(INSTALL_DIR) $(1)/usr/share/aclocal
54 $(INSTALL_DATA) \
55 $(PKG_INSTALL_DIR)/usr/share/aclocal/npth.m4 \
56 $(1)/usr/share/aclocal/
57 endef
58
59 define Package/libnpth/install
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) \
62 $(PKG_INSTALL_DIR)/usr/lib/libnpth.so.* \
63 $(1)/usr/lib/
64 endef
65
66 $(eval $(call BuildPackage,libnpth))