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