Browse Source

utils: add stoken

stoken is a tokencode generator compatible with RSA SecurID
128-bit (AES). stoken supports libtomcrypt and libnettle, we build
against nettle by default since tomcrypt is not packaged by OpenWrt

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Florian Fainelli 10 years ago
parent
commit
ebd0c44052
1 changed files with 77 additions and 0 deletions
  1. 77
    0
      utils/stoken/Makefile

+ 77
- 0
utils/stoken/Makefile View File

@@ -0,0 +1,77 @@
1
+#
2
+# Copyright (C) 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:=stoken
11
+PKG_VERSION:=0.8
12
+PKG_REV:=c4d79ffbf5053e44be4b64da22b1b7fb6a51daf2
13
+PKG_RELEASE:=1
14
+
15
+PKG_SOURCE_PROTO:=git
16
+PKG_SOURCE_URL:=https://github.com/cernekee/stoken.git
17
+
18
+PKG_SOURCE_VERSION:=$(PKG_REV)
19
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
20
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
21
+PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
22
+PKG_LICENSE:=LGPL-2.1
23
+PKG_INSTALL:=1
24
+
25
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
26
+
27
+PKG_FIXUP:=autoreconf
28
+
29
+include $(INCLUDE_DIR)/package.mk
30
+
31
+define Package/stoken/Default
32
+  TITLE:=stoken is a tokencode generator compatible with RSA SecurID 128-bit (AES)
33
+  URL:=http://sourceforge.net/p/stoken/
34
+  DEPENDS:= +libxml2 +libnettle
35
+endef
36
+
37
+define Package/stoken
38
+  $(call Package/stoken/Default)
39
+  SECTION:=utils
40
+  CATEGORY:=Utilities
41
+  DEPENDS:=+libstoken
42
+  MENU:=1
43
+endef
44
+
45
+define Package/stoken/description
46
+  stoken is a tokencode generator compatible with RSA SecurID 128-bit (AES). This package contains the cli
47
+endef
48
+
49
+define Package/libstoken
50
+  $(call Package/stoken/Default)
51
+  SECTION:=libs
52
+  CATEGORY:=Libraries
53
+endef
54
+
55
+CONFIGURE_ARGS += \
56
+	--with-nettle
57
+
58
+define Build/InstallDev
59
+	$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
60
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
61
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libstoken*.{la,a,so*} $(1)/usr/lib
62
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/stoken.pc \
63
+		$(1)/usr/lib/pkgconfig/
64
+endef
65
+
66
+define Package/stoken/install
67
+	$(INSTALL_DIR) $(1)/usr/bin
68
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/stoken $(1)/usr/bin/
69
+endef
70
+
71
+define Package/libstoken/install
72
+	$(INSTALL_DIR) $(1)/usr/lib
73
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libstoken*.so* $(1)/usr/lib
74
+endef
75
+
76
+$(eval $(call BuildPackage,stoken))
77
+$(eval $(call BuildPackage,libstoken))