Merge pull request #3960 from hbl0307106015/add-tree
[feed/packages.git] / net / gnurl / Makefile
1 #
2 # Copyright (C) 2007-2015 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:=gnurl
11 PKG_VERSION:=7.51.0
12 PKG_RELEASE:=1
13
14 PKG_DIST_VERSION:=$(subst .,_,$(strip $(PKG_VERSION)))
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_DIST_VERSION).tar.bz2
16 PKG_SOURCE_URL:=https://gnunet.org/sites/default/files
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_DIST_VERSION)
18
19 PKG_MD5SUM:=2f0200d38eca6c9567447d2b8ac4676911ec73b9613a15bef31bbe9f9f22f4e5
20
21 PKG_LICENSE:=MIT
22 PKG_LICENSE_FILES:=COPYING
23
24 PKG_FIXUP:=autoreconf
25 PKG_BUILD_PARALLEL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/gnurl/Default
30 SECTION:=net
31 CATEGORY:=Network
32 URL:=https://gnunet.org/gnurl
33 MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
34 endef
35
36 define Package/gnurl
37 $(call Package/gnurl/Default)
38 SUBMENU:=File Transfer
39 DEPENDS:=+libgnurl
40 TITLE:=A client-side HTTP/HTTPS transfer utility
41 endef
42
43 define Package/libgnurl
44 $(call Package/gnurl/Default)
45 SECTION:=libs
46 CATEGORY:=Libraries
47 DEPENDS:=+libgnutls +libidn +zlib
48 TITLE:=A client-side HTTP/HTTPS transfer library
49 endef
50
51 TARGET_CFLAGS += $(FPIC)
52
53 CONFIGURE_ARGS += \
54 $(call autoconf_bool,CONFIG_IPV6,ipv6) \
55 --with-gnutls="$(STAGING_DIR)/usr" \
56 --with-libidn="$(STAGING_DIR)/usr" \
57 --with-zlib="$(STAGING_DIR)/usr" \
58 --with-ca-path="/etc/ssl/certs/" \
59 --enable-shared \
60 --enable-static \
61 --without-axtls \
62 --without-libssh2 \
63 --without-libmetalink \
64 --without-winidn \
65 --without-librtmp \
66 --without-nghttp2 \
67 --without-nss \
68 --without-cyassl \
69 --without-polarssl \
70 --without-ssl \
71 --without-winssl \
72 --without-darwinssl \
73 --disable-ares \
74 --disable-sspi \
75 --disable-ntlm-wb \
76 --disable-ldap \
77 --disable-ldaps \
78 --disable-rtsp \
79 --disable-dict \
80 --disable-telnet \
81 --disable-tftp \
82 --disable-pop3 \
83 --disable-imap \
84 --disable-smtp \
85 --disable-gopher \
86 --disable-file \
87 --disable-ftp \
88 --disable-smb \
89 --disable-debug \
90 --disable-manual \
91 --disable-verbose
92
93 define Build/Compile
94 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
95 DESTDIR="$(PKG_INSTALL_DIR)" \
96 CC="$(TARGET_CC)" \
97 install
98 endef
99
100 define Build/InstallDev
101 $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include/gnurl $(1)/usr/lib $(1)/usr/lib/pkgconfig
102 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnurl-config $(1)/usr/bin/
103 $(CP) $(PKG_INSTALL_DIR)/usr/include/curl/*.h $(1)/usr/include/gnurl
104 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnurl.{a,so*} $(1)/usr/lib/
105 $(CP) $(PKG_BUILD_DIR)/libgnurl.pc $(1)/usr/lib/pkgconfig/
106 $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/gnurl-config
107 [ -n "$(TARGET_LDFLAGS)" ] && $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/libgnurl.pc || true
108 $(LN) $(STAGING_DIR)/usr/bin/gnurl-config $(2)/bin/
109 endef
110
111 define Package/gnurl/install
112 $(INSTALL_DIR) $(1)/usr/bin
113 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnurl $(1)/usr/bin/
114 endef
115
116 define Package/libgnurl/install
117 $(INSTALL_DIR) $(1)/usr/lib
118 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnurl.so.* $(1)/usr/lib/
119 endef
120
121 $(eval $(call BuildPackage,gnurl))
122 $(eval $(call BuildPackage,libgnurl))