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.

126 lines
3.4 KiB

  1. #
  2. # Copyright (C) 2007-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:=rsync
  9. PKG_VERSION:=3.2.5
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://download.samba.org/pub/$(PKG_NAME)/src
  13. PKG_HASH:=2ac4d21635cdf791867bc377c35ca6dda7f50d919a58be45057fd51600c69aba
  14. PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
  15. PKG_LICENSE:=GPL-3.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:rsync:rsync
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. define Package/rsync
  23. SECTION:=net
  24. CATEGORY:=Network
  25. SUBMENU:=File Transfer
  26. TITLE:=Fast remote file copy program (like rcp)
  27. DEPENDS:=+libpopt +zlib +RSYNC_xattr:libattr +RSYNC_acl:libacl +RSYNC_zstd:libzstd $(ICONV_DEPENDS)
  28. URL:=https://rsync.samba.org/
  29. MENU:=1
  30. endef
  31. define Package/rsync/config
  32. source "$(SOURCE)/Config.in"
  33. endef
  34. TARGET_CFLAGS += $(if $(CONFIG_IPV6),-DINET6,)
  35. CONFIGURE_ARGS += \
  36. --without-included-popt \
  37. --without-included-zlib \
  38. --disable-debug \
  39. --disable-asm \
  40. --disable-lz4 \
  41. --disable-locale \
  42. --disable-md2man \
  43. --disable-openssl \
  44. --disable-simd \
  45. --disable-roll-simd \
  46. --disable-xxhash \
  47. --$(if $(CONFIG_BUILD_NLS),en,dis)able-iconv \
  48. --$(if $(CONFIG_BUILD_NLS),en,dis)able-iconv-open \
  49. --$(if $(CONFIG_RSYNC_zstd),en,dis)able-zstd \
  50. --$(if $(CONFIG_RSYNC_xattr),en,dis)able-xattr-support \
  51. --$(if $(CONFIG_RSYNC_acl),en,dis)able-acl-support \
  52. $(if $(CONFIG_IPV6),,--disable-ipv6)
  53. define Package/rsyncd
  54. SECTION:=net
  55. CATEGORY:=Network
  56. SUBMENU:=File Transfer
  57. TITLE:=Rsync daemon
  58. DEPENDS:=+rsync
  59. URL:=https://rsync.samba.org/
  60. endef
  61. define Package/rrsync
  62. SECTION:=net
  63. CATEGORY:=Network
  64. SUBMENU:=File Transfer
  65. TITLE:=Restricted rsync script
  66. DEPENDS:=+rsync +perlbase-file +perl @(PACKAGE_openssh-server||PACKAGE_openssh-server-pam)
  67. URL:=https://www.samba.org/ftp/unpacked/rsync/support/rrsync
  68. endef
  69. define Package/rsync/description
  70. rsync is a program that allows files to be copied to and from remote machines
  71. in much the same way as rcp. It has many more options than rcp, and uses the
  72. rsync remote-update protocol to greatly speed up file transfers when the
  73. destination file already exists.
  74. The rsync remote-update protocol allows rsync to transfer just the differences
  75. between two sets of files across the network link.
  76. endef
  77. define Package/rsync/install
  78. $(INSTALL_DIR) $(1)/usr/bin
  79. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
  80. endef
  81. define Package/rsyncd/description
  82. rsyncd is a configuration file and initscript to utilize rsync as a daemon. It
  83. uses the same binary as rsync.
  84. endef
  85. define Package/rsyncd/conffiles
  86. /etc/rsyncd.conf
  87. endef
  88. define Package/rsyncd/install
  89. $(INSTALL_DIR) $(1)/etc
  90. $(INSTALL_DATA) ./files/rsyncd.conf $(1)/etc/
  91. $(INSTALL_DIR) $(1)/etc/init.d
  92. $(INSTALL_BIN) ./files/rsyncd.init $(1)/etc/init.d/rsyncd
  93. endef
  94. define Package/rrsync/description
  95. rrsync is a script which wraps around rsync to restrict its permission to a
  96. particular subdirectory via ~/.ssh/authorized_keys and/or to read-only
  97. or write-only mode
  98. endef
  99. define Package/rrsync/install
  100. $(INSTALL_DIR) $(1)/usr/bin
  101. $(INSTALL_BIN) $(PKG_BUILD_DIR)/support/rrsync $(1)/usr/bin
  102. endef
  103. $(eval $(call BuildPackage,rsync))
  104. $(eval $(call BuildPackage,rsyncd))
  105. $(eval $(call BuildPackage,rrsync))