Преглед изворни кода

libsodium: add package, version 0.7.0

Damiano Renfer пре 10 година
родитељ
комит
6c91732b07
1 измењених фајлова са 64 додато и 0 уклоњено
  1. 64
    0
      libs/libsodium/Makefile

+ 64
- 0
libs/libsodium/Makefile Прегледај датотеку

@@ -0,0 +1,64 @@
1
+#
2
+# Copyright (C) 2009-2014 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:=libsodium
11
+PKG_VERSION:=0.7.0
12
+PKG_RELEASE:=1
13
+
14
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16
+PKG_SOURCE_URL:=https://download.libsodium.org/libsodium/releases
17
+PKG_MD5SUM:=b9029bf810c4b5a8acc3afec1286a36a
18
+PKG_CAT:=zcat
19
+
20
+PKG_FIXUP:=libtool autoreconf
21
+PKG_USE_MIPS16:=0
22
+PKG_INSTALL:=1
23
+
24
+PKG_MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
25
+PKG_LICENSE:=ISC
26
+
27
+include $(INCLUDE_DIR)/package.mk
28
+
29
+define Package/libsodium
30
+  SECTION:=libs
31
+  CATEGORY:=Libraries
32
+  DEFAULT:=y
33
+  TITLE:=P(ortable|ackageable) NaCl-based crypto library
34
+  URL:=https://github.com/jedisct1/libsodium
35
+  MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
36
+endef
37
+
38
+define Package/libsodium/description
39
+  NaCl (pronounced "salt") is a new easy-to-use high-speed software library for network communication, encryption, decryption, signatures, etc.
40
+  NaCl's goal is to provide all of the core operations needed to build higher-level cryptographic tools.
41
+  Sodium is a portable, cross-compilable, installable, packageable fork of NaCl (based on the latest released upstream version nacl-20110221), with a compatible API.
42
+  The design choices, particularly in regard to the Curve25519 Diffie-Hellman function, emphasize security (whereas NIST curves emphasize "performance" at the cost of security), and "magic constants" in NaCl/Sodium have clear rationales.
43
+  The same cannot be said of NIST curves, where the specific origins of certain constants are not described by the standards.
44
+  And despite the emphasis on higher security, primitives are faster across-the-board than most implementations of the NIST standards.
45
+endef
46
+
47
+define Build/Configure
48
+  $(call Build/Configure/Default, --disable-ssp)
49
+endef
50
+
51
+define Build/InstallDev
52
+	$(INSTALL_DIR) $(1)/usr/include/sodium
53
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/sodium.h $(1)/usr/include
54
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/sodium/*.h $(1)/usr/include/sodium
55
+	$(INSTALL_DIR) $(1)/usr/lib
56
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsodium.{a,so*} $(1)/usr/lib
57
+endef
58
+
59
+define Package/libsodium/install
60
+	$(INSTALL_DIR) $(1)/usr/lib
61
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsodium.so.* $(1)/usr/lib/
62
+endef
63
+
64
+$(eval $(call BuildPackage,libsodium))