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