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.

103 lines
3.0 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.3
  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:=fc0df945188172264ec5bf1d0bda08264fadc8a3f856d47eba91f31fe354b507
  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_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/nls.mk
  23. define Package/cryptsetup
  24. SECTION:=utils
  25. CATEGORY:=Utilities
  26. SUBMENU:=Encryption
  27. TITLE:=Cryptsetup
  28. DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +libblkid +libuuid +libpopt +lvm2 \
  29. +libdevmapper +libjson-c +@KERNEL_DIRECT_IO +kmod-crypto-user
  30. URL:=https://gitlab.com/cryptsetup/cryptsetup/
  31. endef
  32. define Package/cryptsetup/description
  33. Cryptsetup is utility used to conveniently setup disk encryption based on DMCrypt kernel module.
  34. endef
  35. define Package/cryptsetup-ssh
  36. SECTION:=utils
  37. CATEGORY:=Utilities
  38. SUBMENU:=Encryption
  39. TITLE:=Cryptsetup SSH token
  40. DEPENDS:=+cryptsetup +PACKAGE_cryptsetup-ssh:libssh
  41. URL:=https://gitlab.com/cryptsetup/cryptsetup/
  42. endef
  43. define Package/cryptsetup-ssh/description
  44. Experimental SSH token support for cryptsetup.
  45. endef
  46. CONFIGURE_ARGS += \
  47. --disable-cryptsetup-reencrypt \
  48. --disable-integritysetup \
  49. --disable-selinux \
  50. --disable-rpath \
  51. --disable-veritysetup \
  52. --disable-udev \
  53. --with-default-luks-format=LUKS2 \
  54. --with-luks2-lock-path=/var/run/cryptsetup \
  55. --with-crypto_backend=kernel
  56. ifeq ($(CONFIG_PACKAGE_cryptsetup-ssh),)
  57. CONFIGURE_ARGS += --disable-ssh-token
  58. endif
  59. CONFIGURE_VARS += \
  60. LIBSSH_CFLAGS="-I$(STAGING_DIR)/usr/include" \
  61. LIBSSH_LIBS="-L$(STAGING_DIR)/usr/lib -lssh"
  62. TARGET_LDFLAGS += -Wl,--gc-sections $(if $(INTL_FULL),-lintl)
  63. define Build/InstallDev
  64. $(INSTALL_DIR) $(1)/usr/include
  65. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libcryptsetup.h $(1)/usr/include
  66. $(INSTALL_DIR) $(1)/usr/lib
  67. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcryptsetup.so* $(1)/usr/lib
  68. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  69. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcryptsetup.pc $(1)/usr/lib/pkgconfig
  70. endef
  71. define Package/cryptsetup/install
  72. $(INSTALL_DIR) $(1)/usr/lib
  73. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcryptsetup.so* $(1)/usr/lib
  74. $(INSTALL_DIR) $(1)/usr/sbin
  75. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/cryptsetup $(1)/usr/sbin
  76. endef
  77. define Package/cryptsetup-ssh/install
  78. $(INSTALL_DIR) $(1)/usr/lib/cryptsetup
  79. $(CP) $(PKG_INSTALL_DIR)/usr/lib/cryptsetup/* $(1)/usr/lib/cryptsetup
  80. $(INSTALL_DIR) $(1)/usr/sbin
  81. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/cryptsetup-ssh $(1)/usr/sbin
  82. endef
  83. $(eval $(call BuildPackage,cryptsetup))
  84. $(eval $(call BuildPackage,cryptsetup-ssh))