1
0

Makefile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #
  2. # Copyright (C) 2005-2011 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:=libgcrypt
  9. PKG_VERSION:=1.6.6
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=ftp://ftp.gnupg.org/gcrypt/libgcrypt
  13. PKG_MD5SUM:=944cf6595021d0c33478148a315b335b
  14. PKG_FIXUP:=patch-libtool
  15. PKG_INSTALL:=1
  16. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/libgcrypt
  19. SECTION:=libs
  20. CATEGORY:=Libraries
  21. DEPENDS:=+libgpg-error
  22. TITLE:=GNU crypto library
  23. URL:=http://directory.fsf.org/security/libgcrypt.html
  24. MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  25. endef
  26. define Package/libgcrypt/description
  27. This is a general purpose cryptographic library based on the code from
  28. GnuPG. It provides functions for all cryptograhic building blocks:
  29. symmetric ciphers (AES, DES, Arcfour, CAST5), hash algorithms (MD5, SHA-1,
  30. RIPE-MD160, SHA-224/256, SHA-384/512), MACs (HMAC for all hash
  31. algorithms), public key algorithms (RSA, DSA), large integer functions,
  32. random numbers and a lot of supporting functions. Some algorithms have
  33. been disabled to reduce size (Blowfish, Twofish, Serpent,
  34. RC2, SEED, Camellia, CRC, MD4, TIGER-192, Whirlpool, ElGamal, ECC).
  35. endef
  36. CONFIGURE_ARGS += \
  37. --enable-shared \
  38. --enable-static \
  39. --disable-asm \
  40. --with-gpg-error-prefix="$(STAGING_DIR)/usr"
  41. TARGET_CFLAGS += $(FPIC)
  42. define Build/InstallDev
  43. $(INSTALL_DIR) $(1)/usr/bin $(2)/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/share/aclocal
  44. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libgcrypt-config $(1)/usr/bin/
  45. $(CP) $(PKG_INSTALL_DIR)/usr/include/gcrypt*.h $(1)/usr/include/
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.{la,a,so*} $(1)/usr/lib/
  47. $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libgcrypt.m4 $(1)/usr/share/aclocal/
  48. $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/libgcrypt-config
  49. $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/libgcrypt-config
  50. ln -sf $(STAGING_DIR)/usr/bin/libgcrypt-config $(2)/bin/
  51. endef
  52. define Package/libgcrypt/install
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.so.* $(1)/usr/lib/
  55. endef
  56. $(eval $(call BuildPackage,libgcrypt))