libyubikey: Initial checkin of makefile
authorStuart B. Wilkins <stuwilkins@mac.com>
Sat, 22 Dec 2018 13:47:07 +0000 (08:47 -0500)
committerPaul Spooren <mail@aparcar.org>
Fri, 22 Mar 2019 14:34:48 +0000 (15:34 +0100)
Signed-off-by: Stuart B. Wilkins <stuwilkins@mac.com>
libs/libyubikey/Makefile [new file with mode: 0644]

diff --git a/libs/libyubikey/Makefile b/libs/libyubikey/Makefile
new file mode 100644 (file)
index 0000000..b66def3
--- /dev/null
@@ -0,0 +1,49 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libyubikey
+PKG_VERSION:=1.13
+PKG_RELEASE:=1
+
+PKG_SOURCE:=libyubikey-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://developers.yubico.com/yubico-c/Releases
+PKG_HASH:=04edd0eb09cb665a05d808c58e1985f25bb7c5254d2849f36a0658ffc51c3401
+PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
+PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=BSD-2-Clause
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/libyubikey-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libyubikey
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=The Yuibco yubikey c library
+  URL:=https://developers.yubico.com/yubico-c/
+endef
+
+define Package/libyubikey/description
+       The c library for the yubikey from Yubico
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/include
+       $(CP) $(PKG_BUILD_DIR)/yubikey.h $(STAGING_DIR)/usr/include
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/.libs/libyubikey.so* $(STAGING_DIR)/usr/lib
+endef
+
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --disable-static
+
+define Package/libyubikey/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/modhex $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykgenerate $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykparse $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/.libs/libyubikey.so.* $(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,libyubikey))