ソースを参照

rsync: import from packages

Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
Maxim Storchak 10 年 前
コミット
4145614571
共有3 個のファイルを変更した110 個の追加0 個の削除を含む
  1. 81
    0
      net/rsync/Makefile
  2. 15
    0
      net/rsync/files/rsyncd.conf
  3. 14
    0
      net/rsync/files/rsyncd.init

+ 81
- 0
net/rsync/Makefile ファイルの表示

@@ -0,0 +1,81 @@
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.1.0
12
+PKG_RELEASE:=2
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://rsync.samba.org/ftp/rsync/src
16
+PKG_MD5SUM:=3be148772a33224771a8d4d2a028b132
17
+
18
+PKG_INSTALL:=1
19
+PKG_BUILD_PARALLEL:=1
20
+
21
+include $(INCLUDE_DIR)/package.mk
22
+
23
+define Package/rsync
24
+  SECTION:=net
25
+  CATEGORY:=Network
26
+  SUBMENU:=File Transfer
27
+  TITLE:=Fast remote file copy program (like rcp)
28
+  DEPENDS:=+libpopt +zlib
29
+  URL:=http://rsync.samba.org/
30
+endef
31
+
32
+define Package/rsyncd
33
+  SECTION:=net
34
+  CATEGORY:=Network
35
+  SUBMENU:=File Transfer
36
+  TITLE:=Rsync daemon
37
+  DEPENDS:=+rsync
38
+  URL:=http://rsync.samba.org/
39
+endef
40
+
41
+define Package/rsync/description
42
+ rsync is a program that allows files to be copied to and from remote machines
43
+ in much the same way as rcp. It has many more options than rcp, and uses the
44
+ rsync remote-update protocol to greatly speed up file transfers when the
45
+ destination file already exists.
46
+
47
+ The rsync remote-update protocol allows rsync to transfer just the differences
48
+ between two sets of files across the network link.
49
+endef
50
+
51
+CONFIGURE_ARGS += \
52
+	--with-included-popt=no \
53
+	--with-included-zlib=no \
54
+	--disable-debug \
55
+	--disable-locale \
56
+	--disable-xattr-support \
57
+	--disable-acl-support \
58
+
59
+define Package/rsync/install
60
+	$(INSTALL_DIR) $(1)/usr/bin
61
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
62
+endef
63
+
64
+define Package/rsyncd/description
65
+ rsyncd is a configuration file and initscript to utilize rsync as a daemon. It
66
+ uses the same binary as rsync.
67
+endef
68
+
69
+define Package/rsyncd/conffiles
70
+/etc/rsyncd.conf
71
+endef
72
+
73
+define Package/rsyncd/install
74
+	$(INSTALL_DIR) $(1)/etc
75
+	$(INSTALL_DATA) ./files/rsyncd.conf $(1)/etc/
76
+	$(INSTALL_DIR) $(1)/etc/init.d
77
+	$(INSTALL_BIN) ./files/rsyncd.init $(1)/etc/init.d/rsyncd
78
+endef
79
+
80
+$(eval $(call BuildPackage,rsync))
81
+$(eval $(call BuildPackage,rsyncd))

+ 15
- 0
net/rsync/files/rsyncd.conf ファイルの表示

@@ -0,0 +1,15 @@
1
+# /etc/rsyncd.conf
2
+# Minimal configuration for rsync daemon
3
+
4
+# Next line required for init script
5
+pid file = /var/run/rsyncd.pid
6
+use chroot = yes
7
+uid = nobody
8
+gid = nogroup
9
+read only = yes
10
+
11
+# Simple example to configure server
12
+#[openwrt-etc]
13
+#path = /etc
14
+#comment = OpenWrt Configuration Files
15
+#exclude = /init.d

+ 14
- 0
net/rsync/files/rsyncd.init ファイルの表示

@@ -0,0 +1,14 @@
1
+#!/bin/sh /etc/rc.common
2
+# Copyright (C) 2011-2014 OpenWrt.org
3
+
4
+START=90
5
+STOP=10
6
+
7
+USE_PROCD=1
8
+PROG=/usr/bin/rsync
9
+
10
+start_service() {
11
+	procd_open_instance
12
+	procd_set_param command "$PROG" --daemon --no-detach
13
+	procd_close_instance
14
+}