blob: 48c1d5168403b71b1ae91b7fb3ca6df0bb4f7f9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
include $(TOPDIR)/rules.mk
PKG_NAME:=td
PKG_VERSION:=1.8.0
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/tdlib/td/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=30d560205fe82fb811cd57a8fcbc7ac853a5b6195e9cb9e6ff142f5e2d8be217
PKG_MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
PKG_LICENSE:=BSL-1.0
PKG_LICENSE_FILES:=LICENSE_1_0.txt
PKG_BUILD_DEPENDS:=gperf/host td/host
PKG_BUILD_PARALLEL:=1
CMAKE_BINARY_SUBDIR:=openwrt-build
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
EXTRA_CFLAGS += -Wno-psabi
define Package/td
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Telegram Database library
DEPENDS:=+zlib +libopenssl +libstdcpp
URL:=https://github.com/tdlib/td
endef
define Package/td/description
Cross-platform library for building Telegram clients.
endef
define Build/Prepare
$(call Build/Prepare/Default)
$(INSTALL_DIR) \
$(PKG_BUILD_DIR)/td/generate/auto \
$(PKG_BUILD_DIR)/tdutils/generate
$(CP) \
$(STAGING_DIR_HOSTPKG)/include/td/generate/auto/td \
$(PKG_BUILD_DIR)/td/generate/auto/td
$(CP) \
$(STAGING_DIR_HOSTPKG)/include/tdutils/generate/auto \
$(PKG_BUILD_DIR)/tdutils/generate/auto
endef
define Host/Compile
$(NINJA) -C $(HOST_BUILD_DIR)/$(CMAKE_BINARY_SUBDIR) prepare_cross_compiling
endef
define Host/Install
$(INSTALL_DIR) \
$(STAGING_DIR_HOSTPKG)/include/td/generate/auto \
$(STAGING_DIR_HOSTPKG)/include/tdutils/generate
$(CP) \
$(HOST_BUILD_DIR)/td/generate/auto/td \
$(STAGING_DIR_HOSTPKG)/include/td/generate/auto/td
$(CP) \
$(HOST_BUILD_DIR)/tdutils/generate/auto \
$(STAGING_DIR_HOSTPKG)/include/tdutils/generate/auto
endef
define Package/td/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtdjson.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,td))
$(eval $(call HostBuild))
|