libcurl-gnutls: fix build
[feed/packages.git] / net / libcurl-gnutls / Makefile
1 #
2 # Copyright (C) 2007-2023 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:=libcurl-gnutls
11
12 PKG_SOURCE_NAME:=curl
13 PKG_VERSION:=8.6.0
14 PKG_RELEASE:=2
15 PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.xz
16 PKG_SOURCE_URL:=https://github.com/curl/curl/releases/download/curl-$(subst .,_,$(PKG_VERSION))/ \
17 https://dl.uxnr.de/mirror/curl/ \
18 https://curl.askapache.com/download/ \
19 https://curl.se/download/
20 PKG_HASH:=3ccd55d91af9516539df80625f818c734dc6f2ecf9bada33c76765e99121db15
21
22 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
23 PKG_LICENSE:=MIT
24 PKG_LICENSE_FILES:=COPYING
25 PKG_CPE_ID:=cpe:/a:haxx:libcurl
26 PKG_ABI_VERSION:=4
27
28 PKG_FIXUP:=autoreconf
29 PKG_INSTALL:=1
30 PKG_BUILD_PARALLEL:=1
31 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
32
33 # Make sure headers are present for packages using libcurl-gnutls
34 PKG_BUILD_DEPENDS:=curl
35
36 include $(INCLUDE_DIR)/package.mk
37
38 define Package/libcurl-gnutls
39 SECTION:=libs
40 CATEGORY:=Libraries
41 URL:=https://gnunet.org/en/gnurl.html
42 SECTION:=libs
43 CATEGORY:=Libraries
44 DEPENDS:=+libgnutls +libidn2 +zlib
45 TITLE:=A client-side HTTP/HTTPS transfer library (build against gnuTLS)
46 ABI_VERSION:=$(PKG_ABI_VERSION)
47 endef
48
49 TARGET_CFLAGS += $(FPIC)
50
51 CONFIGURE_ARGS += \
52 $(call autoconf_bool,CONFIG_IPV6,ipv6) \
53 --with-gnutls="$(STAGING_DIR)/usr" \
54 --with-libidn2="$(STAGING_DIR)/usr" \
55 --with-zlib="$(STAGING_DIR)/usr" \
56 --with-ca-path="/etc/ssl/certs/" \
57 --enable-shared \
58 --enable-static \
59 --without-brotli \
60 --without-libssh2 \
61 --without-winidn \
62 --without-librtmp \
63 --without-nghttp2 \
64 --without-nghttp3 \
65 --without-wolfssl \
66 --without-libpsl \
67 --without-openssl \
68 --without-schannel \
69 --without-zstd \
70 --disable-libcurl-option \
71 --disable-ares \
72 --disable-sspi \
73 --disable-basic-auth \
74 --disable-bearer-auth \
75 --disable-digest-auth \
76 --disable-kerberos-auth \
77 --disable-negotiate-auth \
78 --disable-aws \
79 --disable-ntlm \
80 --disable-ntlm-wb \
81 --disable-tls-srp \
82 --disable-ldap \
83 --disable-ldaps \
84 --disable-mqtt \
85 --disable-rtsp \
86 --disable-dict \
87 --disable-telnet \
88 --disable-tftp \
89 --disable-pop3 \
90 --disable-imap \
91 --disable-smtp \
92 --disable-gopher \
93 --disable-file \
94 --disable-ftp \
95 --disable-smb \
96 --disable-debug \
97 --disable-manual \
98 --disable-verbose
99
100 define Build/Compile
101 $(call Build/Compile/Default)
102 patchelf --set-soname 'libcurl-gnutls.so.$(PKG_ABI_VERSION)' $(PKG_BUILD_DIR)/lib/.libs/libcurl.so.$(PKG_ABI_VERSION).*
103 endef
104
105 define Build/InstallDev
106 $(INSTALL_DIR) $(1)/usr/lib
107 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.$(PKG_ABI_VERSION).* $(1)/usr/lib/libcurl-gnutls.so.$(PKG_ABI_VERSION)
108 $(LN) libcurl-gnutls.so.$(PKG_ABI_VERSION) $(1)/usr/lib/libcurl-gnutls.so
109 endef
110
111 define Package/libcurl-gnutls/install
112 $(INSTALL_DIR) $(1)/usr/lib
113 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.$(PKG_ABI_VERSION).* $(1)/usr/lib/libcurl-gnutls.so.$(PKG_ABI_VERSION)
114 $(LN) libcurl-gnutls.so.$(PKG_ABI_VERSION) $(1)/usr/lib/libcurl-gnutls.so
115 endef
116
117 $(eval $(call BuildPackage,libcurl-gnutls))