You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
2.9 KiB

  1. #
  2. # Copyright (C) 2006-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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=cryptsetup
  9. PKG_VERSION:=2.4.1
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v2.4
  13. PKG_HASH:=a356a727a83a464ade566e95239622a22dbe4e0f482b198fdb04ab0d3a5a9c5f
  14. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  15. PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later
  16. PKG_LICENSE_FILES:=COPYING COPYING.LGPL
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. define Package/cryptsetup
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. SUBMENU:=Encryption
  26. TITLE:=Cryptsetup
  27. DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +libblkid +libuuid +libpopt +lvm2 \
  28. +libdevmapper +libjson-c +@KERNEL_DIRECT_IO +kmod-crypto-user
  29. URL:=https://gitlab.com/cryptsetup/cryptsetup/
  30. endef
  31. define Package/cryptsetup/description
  32. Cryptsetup is utility used to conveniently setup disk encryption based on DMCrypt kernel module.
  33. endef
  34. define Package/cryptsetup-ssh
  35. SECTION:=utils
  36. CATEGORY:=Utilities
  37. SUBMENU:=Encryption
  38. TITLE:=Cryptsetup SSH token
  39. DEPENDS:=+cryptsetup +PACKAGE_cryptsetup-ssh:libssh
  40. URL:=https://gitlab.com/cryptsetup/cryptsetup/
  41. endef
  42. define Package/cryptsetup-ssh/description
  43. Experimental SSH token support for cryptsetup.
  44. endef
  45. CONFIGURE_ARGS += \
  46. --disable-cryptsetup-reencrypt \
  47. --disable-integritysetup \
  48. --disable-selinux \
  49. --disable-rpath \
  50. --disable-veritysetup \
  51. --disable-udev \
  52. --with-default-luks-format=LUKS2 \
  53. --with-luks2-lock-path=/var/run/cryptsetup \
  54. --with-crypto_backend=kernel
  55. ifeq ($(CONFIG_PACKAGE_cryptsetup-ssh),)
  56. CONFIGURE_ARGS += --disable-ssh-token
  57. endif
  58. CONFIGURE_VARS += \
  59. LIBSSH_CFLAGS="-I$(STAGING_DIR)/usr/include" \
  60. LIBSSH_LIBS="-L$(STAGING_DIR)/usr/lib -lssh"
  61. TARGET_LDFLAGS += -Wl,--gc-sections $(if $(INTL_FULL),-lintl)
  62. define Build/InstallDev
  63. $(INSTALL_DIR) $(1)/usr/include
  64. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libcryptsetup.h $(1)/usr/include
  65. $(INSTALL_DIR) $(1)/usr/lib
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcryptsetup.so* $(1)/usr/lib
  67. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  68. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcryptsetup.pc $(1)/usr/lib/pkgconfig
  69. endef
  70. define Package/cryptsetup/install
  71. $(INSTALL_DIR) $(1)/usr/lib
  72. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcryptsetup.so* $(1)/usr/lib
  73. $(INSTALL_DIR) $(1)/usr/sbin
  74. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/cryptsetup $(1)/usr/sbin
  75. endef
  76. define Package/cryptsetup-ssh/install
  77. $(INSTALL_DIR) $(1)/usr/lib/cryptsetup
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/cryptsetup/* $(1)/usr/lib/cryptsetup
  79. $(INSTALL_DIR) $(1)/usr/sbin
  80. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/cryptsetup-ssh $(1)/usr/sbin
  81. endef
  82. $(eval $(call BuildPackage,cryptsetup))
  83. $(eval $(call BuildPackage,cryptsetup-ssh))