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.

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