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.

113 lines
2.7 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.1.3
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://download.samba.org/pub/rsync/src
  13. PKG_HASH:=55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0
  14. PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
  15. PKG_LICENSE:=GPL-3.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/rsync
  21. SECTION:=net
  22. CATEGORY:=Network
  23. SUBMENU:=File Transfer
  24. TITLE:=Fast remote file copy program (like rcp)
  25. DEPENDS:=+libpopt +RSYNC_xattr:libattr +RSYNC_acl:libacl +RSYNC_zlib:zlib
  26. URL:=https://rsync.samba.org/
  27. MENU:=1
  28. endef
  29. define Package/rsync/config
  30. source "$(SOURCE)/Config.in"
  31. endef
  32. CONFIGURE_ARGS += \
  33. --with-included-popt=no \
  34. --disable-debug \
  35. --disable-locale \
  36. ifeq ($(CONFIG_RSYNC_xattr),y)
  37. CONFIGURE_ARGS+= --enable-xattr-support
  38. else
  39. CONFIGURE_ARGS+= --disable-xattr-support
  40. endif
  41. ifeq ($(CONFIG_RSYNC_acl),y)
  42. CONFIGURE_ARGS+= --enable-acl-support
  43. else
  44. CONFIGURE_ARGS+= --disable-acl-support
  45. endif
  46. ifeq ($(CONFIG_RSYNC_zlib),y)
  47. CONFIGURE_ARGS+= --with-included-zlib=no
  48. else
  49. CONFIGURE_ARGS+= --with-included-zlib=yes
  50. endif
  51. ifeq ($(CONFIG_IPV6),y)
  52. TARGET_CFLAGS+= -DINET6
  53. else
  54. CONFIGURE_ARGS+= --disable-ipv6
  55. endif
  56. CONFIGURE_VARS += rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes
  57. define Package/rsyncd
  58. SECTION:=net
  59. CATEGORY:=Network
  60. SUBMENU:=File Transfer
  61. TITLE:=Rsync daemon
  62. DEPENDS:=+rsync
  63. URL:=https://rsync.samba.org/
  64. endef
  65. define Package/rsync/description
  66. rsync is a program that allows files to be copied to and from remote machines
  67. in much the same way as rcp. It has many more options than rcp, and uses the
  68. rsync remote-update protocol to greatly speed up file transfers when the
  69. destination file already exists.
  70. The rsync remote-update protocol allows rsync to transfer just the differences
  71. between two sets of files across the network link.
  72. endef
  73. define Package/rsync/install
  74. $(INSTALL_DIR) $(1)/usr/bin
  75. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
  76. endef
  77. define Package/rsyncd/description
  78. rsyncd is a configuration file and initscript to utilize rsync as a daemon. It
  79. uses the same binary as rsync.
  80. endef
  81. define Package/rsyncd/conffiles
  82. /etc/rsyncd.conf
  83. endef
  84. define Package/rsyncd/install
  85. $(INSTALL_DIR) $(1)/etc
  86. $(INSTALL_DATA) ./files/rsyncd.conf $(1)/etc/
  87. $(INSTALL_DIR) $(1)/etc/init.d
  88. $(INSTALL_BIN) ./files/rsyncd.init $(1)/etc/init.d/rsyncd
  89. endef
  90. $(eval $(call BuildPackage,rsync))
  91. $(eval $(call BuildPackage,rsyncd))