1
0

Makefile 3.0 KB

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