summaryrefslogtreecommitdiffstats
path: root/package/libgcrypt
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf.samuelsson@atmel.com>2007-07-17 18:10:35 +0000
committerUlf Samuelsson <ulf.samuelsson@atmel.com>2007-07-17 18:10:35 +0000
commit630dec28c22b632288f642e11a0ef9b79ec01784 (patch)
tree6465ec4e22fc840d0bb1ab005c399299ffc6fa21 /package/libgcrypt
parent3a18b7b9f797fdf2c6161f5dcb88f7025fb913f4 (diff)
downloadbuildroot-novena-630dec28c22b632288f642e11a0ef9b79ec01784.tar.gz
buildroot-novena-630dec28c22b632288f642e11a0ef9b79ec01784.zip
Add GNU Crypto library
Diffstat (limited to 'package/libgcrypt')
-rw-r--r--package/libgcrypt/Config.in8
-rw-r--r--package/libgcrypt/libgcrypt.mk75
2 files changed, 83 insertions, 0 deletions
diff --git a/package/libgcrypt/Config.in b/package/libgcrypt/Config.in
new file mode 100644
index 000000000..491b84ed9
--- /dev/null
+++ b/package/libgcrypt/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBGCRYPT
+ bool "libgcrypt"
+ select BR2_PACKAGE_LIBGPG_ERROR
+ default n
+ help
+ LibGCrypt is GNU's basic cryptographic library.
+
+ ftp://gd.tuwien.ac.at/privacy/gnupg/libgcrypt/
diff --git a/package/libgcrypt/libgcrypt.mk b/package/libgcrypt/libgcrypt.mk
new file mode 100644
index 000000000..585494031
--- /dev/null
+++ b/package/libgcrypt/libgcrypt.mk
@@ -0,0 +1,75 @@
+#############################################################
+#
+# libgcrypt
+#
+#############################################################
+LIBGCRYPT_VERSION:=1.2.4
+LIBGCRYPT_SOURCE:=libgcrypt-$(LIBGCRYPT_VERSION).tar.bz2
+LIBGCRYPT_SITE:=ftp://gd.tuwien.ac.at/privacy/gnupg/libgcrypt/
+LIBGCRYPT_DIR:=$(BUILD_DIR)/libgcrypt-$(LIBGCRYPT_VERSION)
+LIBGCRYPT_LIBRARY:=src/libgcrypt.la
+LIBGCRYPT_DESTDIR:=lib
+LIBGCRYPT_TARGET_LIBRARY=$(LIBGCRYPT_DESTDIR)/libgcrypt.so
+
+$(DL_DIR)/$(LIBGCRYPT_SOURCE):
+ $(WGET) -P $(DL_DIR) $(LIBGCRYPT_SITE)/$(LIBGCRYPT_SOURCE)
+
+$(LIBGCRYPT_DIR)/.source: $(DL_DIR)/$(LIBGCRYPT_SOURCE)
+ $(BZCAT) $(DL_DIR)/$(LIBGCRYPT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(LIBGCRYPT_DIR) package/libgcrypt/ libgcrypt\*.patch
+ touch $@
+
+$(LIBGCRYPT_DIR)/.configured: $(LIBGCRYPT_DIR)/.source
+ (cd $(LIBGCRYPT_DIR); \
+ $(TARGET_CONFIGURE_OPTS) \
+ $(TARGET_CONFIGURE_ARGS) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libdir=/lib \
+ --libexecdir=/$(LIBGCRYPT_DESTDIR) \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --includedir=/include \
+ --includedir=/usr/include \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ );
+ touch $@
+
+$(LIBGCRYPT_DIR)/$(LIBGCRYPT_LIBRARY): $(LIBGCRYPT_DIR)/.configured
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(LIBGCRYPT_DIR)
+
+$(STAGING_DIR)/$(LIBGCRYPT_TARGET_LIBRARY): $(LIBGCRYPT_DIR)/$(LIBGCRYPT_LIBRARY)
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(STAGING_DIR) -C $(LIBGCRYPT_DIR) install
+ touch -c $@
+
+$(TARGET_DIR)/$(LIBGCRYPT_TARGET_LIBRARY): $(STAGING_DIR)/$(LIBGCRYPT_TARGET_LIBRARY)
+ cp -dpf $<* $(TARGET_DIR)/$(LIBGCRYPT_DESTDIR)
+
+libgcrypt: uclibc libgpg-error $(TARGET_DIR)/$(LIBGCRYPT_TARGET_LIBRARY)
+
+libgcrypt-source: $(DL_DIR)/$(LIBGCRYPT_SOURCE)
+
+libgcrypt-clean:
+ rm -f $(TARGET_DIR)/$(LIBGCRYPT_TARGET_LIBRARY)*
+ -$(MAKE) -C $(LIBGCRYPT_DIR) clean
+
+libgcrypt-dirclean:
+ rm -rf $(LIBGCRYPT_DIR)
+
+.PHONY: libgcrypt
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LIBGCRYPT)),y)
+TARGETS+=libgcrypt
+endif