ca5257d036a6c821f47e68e43bc0c3dcaa0a0d59
[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.2.3
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://download.samba.org/pub/rsync/src
16 PKG_HASH:=becc3c504ceea499f4167a260040ccf4d9f2ef9499ad5683c179a697146ce50e
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-xxhash \
56 --$(if $(CONFIG_BUILD_NLS),en,dis)able-iconv \
57 --$(if $(CONFIG_BUILD_NLS),en,dis)able-iconv-open \
58 --$(if $(CONFIG_RSYNC_zstd),en,dis)able-zstd \
59 --$(if $(CONFIG_RSYNC_xattr),en,dis)able-xattr-support \
60 --$(if $(CONFIG_RSYNC_acl),en,dis)able-acl-support \
61 $(if $(CONFIG_IPV6),,--disable-ipv6)
62
63 define Package/rsyncd
64 SECTION:=net
65 CATEGORY:=Network
66 SUBMENU:=File Transfer
67 TITLE:=Rsync daemon
68 DEPENDS:=+rsync
69 URL:=https://rsync.samba.org/
70 endef
71
72 define Package/rrsync
73 SECTION:=net
74 CATEGORY:=Network
75 SUBMENU:=File Transfer
76 TITLE:=Restricted rsync script
77 DEPENDS:=+rsync +perlbase-file +perl @(PACKAGE_openssh-server||PACKAGE_openssh-server-pam)
78 URL:=https://www.samba.org/ftp/unpacked/rsync/support/rrsync
79 endef
80
81 define Package/rsync/description
82 rsync is a program that allows files to be copied to and from remote machines
83 in much the same way as rcp. It has many more options than rcp, and uses the
84 rsync remote-update protocol to greatly speed up file transfers when the
85 destination file already exists.
86
87 The rsync remote-update protocol allows rsync to transfer just the differences
88 between two sets of files across the network link.
89 endef
90
91 define Package/rsync/install
92 $(INSTALL_DIR) $(1)/usr/bin
93 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
94 endef
95
96 define Package/rsyncd/description
97 rsyncd is a configuration file and initscript to utilize rsync as a daemon. It
98 uses the same binary as rsync.
99 endef
100
101 define Package/rsyncd/conffiles
102 /etc/rsyncd.conf
103 endef
104
105 define Package/rsyncd/install
106 $(INSTALL_DIR) $(1)/etc
107 $(INSTALL_DATA) ./files/rsyncd.conf $(1)/etc/
108 $(INSTALL_DIR) $(1)/etc/init.d
109 $(INSTALL_BIN) ./files/rsyncd.init $(1)/etc/init.d/rsyncd
110 endef
111
112 define Package/rrsync/description
113 rrsync is a script which wraps around rsync to restrict its permission to a
114 particular subdirectory via ~/.ssh/authorized_keys and/or to read-only
115 or write-only mode
116 endef
117
118 define Package/rrsync/install
119 $(INSTALL_DIR) $(1)/usr/bin
120 $(INSTALL_BIN) $(PKG_BUILD_DIR)/support/rrsync $(1)/usr/bin
121 endef
122
123 $(eval $(call BuildPackage,rsync))
124 $(eval $(call BuildPackage,rsyncd))
125 $(eval $(call BuildPackage,rrsync))