bluez-tools: Add package bluezetools
[feed/packages.git] / libs / libtalloc / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=talloc
9 PKG_VERSION:=2.3.1
10 MAJOR_VERSION:=2
11 PKG_RELEASE:=3
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=https://www.samba.org/ftp/talloc
15 PKG_HASH:=ef4822d2fdafd2be8e0cabc3ec3c806ae29b8268e932c5e9a4cd5585f37f9f77
16
17 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
18 PKG_LICENSE:=LGPL-3.0-or-later
19
20 PKG_BUILD_PARALLEL:=0
21 PKG_BUILD_DEPENDS:=python3/host
22
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/kernel.mk
25
26 define Package/libtalloc
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=Core memory allocator used in Samba
30 DEPENDS:=$(ICONV_DEPENDS) +libattr
31 URL:=https://talloc.samba.org/talloc/doc/html/index.html
32 endef
33
34 define Package/libtalloc/description
35 talloc is a hierarchical, reference counted memory pool system with destructors.
36 endef
37
38 CROSS = " \
39 \nChecking simple C program: \"hello world\" \
40 \nrpath library support: (127, \"\") \
41 \n-Wl,--version-script support: (127, \"\") \
42 \nChecking getconf LFS_CFLAGS: NO \
43 \nChecking for large file support without additional flags: OK \
44 \nChecking correct behavior of strtoll: OK \
45 \nChecking for working strptime: NO \
46 \nChecking for C99 vsnprintf: \"1\" \
47 \nChecking for HAVE_SHARED_MMAP: NO \
48 \nChecking for HAVE_MREMAP: NO \
49 \nChecking for HAVE_INCOHERENT_MMAP: (2, \"\") \
50 \nChecking for HAVE_SECURE_MKSTEMP: OK \
51 \n"
52
53 define Build/Configure
54 (cd $(PKG_BUILD_DIR); \
55 echo -e >cache.txt $(CROSS) " \
56 \nChecking uname machine type: \"$(ARCH)\" \
57 \nChecking uname release type: \"$(LINUX_VERSION)\" \
58 \nChecking uname sysname type: \"Linux\" \
59 \nChecking uname version type: \"$(LINUX_UNAME_VERSION)\" \
60 \n" ; \
61 $(CONFIGURE_VARS) \
62 ./buildtools/bin/waf configure \
63 --prefix=/usr \
64 --sysconfdir=/etc \
65 --localstatedir=/var \
66 --with-libiconv="$(ICONV_PREFIX)" \
67 --cross-compile \
68 --cross-answers=cache.txt \
69 --disable-python \
70 --disable-rpath \
71 --disable-rpath-install \
72 )
73 endef
74
75 define Build/InstallDev
76 $(INSTALL_DIR) $(1)/usr/lib
77 $(CP) $(PKG_BUILD_DIR)/bin/default/libtalloc.so $(1)/usr/lib/
78 $(INSTALL_DIR) $(1)/usr/include
79 $(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/
80 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
81 $(CP) $(PKG_BUILD_DIR)/bin/default/talloc.pc $(1)/usr/lib/pkgconfig/
82 endef
83
84 define Package/libtalloc/install
85 $(INSTALL_DIR) $(1)/usr/lib
86 $(CP) $(PKG_BUILD_DIR)/bin/default/libtalloc.so $(1)/usr/lib/libtalloc.so.$(MAJOR_VERSION)
87 (cd $(1)/usr/lib; ln -sf libtalloc.so.$(MAJOR_VERSION) libtalloc.so)
88 endef
89
90 $(eval $(call BuildPackage,libtalloc))