oath-toolkit: splitting liboath from oath-toolkit
[feed/packages.git] / utils / oath-toolkit / Makefile
1 #
2 # Copyright (C) 2016 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:=oath-toolkit
11 PKG_VERSION:=2.6.5
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SAVANNAH/oath-toolkit
16 PKG_HASH:=d207120c7e7fdd540142d04ca06d83fb3277c8f2fb794a74535d04b2aa0ec219
17
18 PKG_MAINTAINER:=Fam Zheng <fam@euphon.net>
19 PKG_LICENSE:=LGPL-2.0-or-later GPL-3.0-or-later
20 PKG_LICENSE_FILES:=COPYING
21 PKG_CPE_ID:=cpe:/a:nongnu:oath_toolkit
22
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 CONFIGURE_ARGS += \
29 --disable-xmltest \
30 --disable-pskc
31
32 define Package/liboath
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE:=A shared and static C library for OATH handling
36 URL:=http://www.nongnu.org/oath-toolkit/index.html
37 endef
38
39 define Package/oath-toolkit
40 SECTION:=utils
41 CATEGORY:=Utilities
42 TITLE:=A command line tool for generating and validating OTPs
43 URL:=http://www.nongnu.org/oath-toolkit/index.html
44 DEPENDS:= +liboath
45 endef
46
47 define Package/liboath/description
48 The OATH Toolkit provide components for building one-time password
49 authentication systems. It contains shared libraries, command line
50 tools and a PAM module. Supported technologies include the event-based
51 HOTP algorithm (RFC4226) and the time-based TOTP algorithm (RFC6238).
52 endef
53
54 Package/oath-toolkit/description = $(Package/liboath/description)
55
56 define Build/InstallDev
57 $(INSTALL_DIR) $(1)/usr/include/liboath
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
61 endef
62
63 define Package/liboath/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liboath.so* $(1)/usr/lib/
66 endef
67
68 define Package/oath-toolkit/install
69 $(INSTALL_DIR) $(1)/usr/bin
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/oathtool $(1)/usr/bin/
71 endef
72
73 $(eval $(call BuildPackage,liboath))
74 $(eval $(call BuildPackage,oath-toolkit))