wok-tiny view rsync/receipt @ rev 133

Add fbvnc-config & fbvnc-auth
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 23 12:08:35 2017 +0200 (2017-08-23)
parents 371673f39e46
children 1869a110d35f
line source
1 # SliTaz package receipt.
3 PACKAGE="rsync"
4 VERSION="3.1.1"
5 CATEGORY="network"
6 SHORT_DESC="Utility that provides fast incremental."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL"
9 [ -n "$TARGET" ] || TARGET="i486"
10 BUILD_DEPENDS="uclibc-cross-compiler-$TARGET perl"
11 DEPENDS=""
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WEB_SITE="http://rsync.samba.org/"
14 WGET_URL="${WEB_SITE}ftp/$PACKAGE/$TARBALL"
15 CONFIG_FILES="/etc/rsyncd.conf /etc/rsyncd.secrets"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 sed -i 's/cross_compiling=no/cross_compiling=yes/' configure.sh
21 ./configure CC=uclibc-$TARGET-cc --host=i486-pc-linux-gnu \
22 --prefix=/usr \
23 --mandir=/usr/share/man \
24 --disable-iconv --disable-iconv-open \
25 --disable-acl-support --disable-xattr-support \
26 --with-included-popt --disable-debug \
27 $CONFIGURE_ARGS
28 sed -i -e 's/HAVE_ICONV_H ./HAVE_ICONV_H 0/' \
29 -e 's/HAVE_ICONV_OPEN ./HAVE_ICONV_OPEN 0/' config.h
30 sed -i 's/-liconv//' Makefile
31 make &&
32 make DESTDIR=$DESTDIR install
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 mkdir -p $fs/usr
39 cp -a $install/usr/bin $fs/usr
40 # Config file is /etc/rsyncd.conf.
41 # User and passwd in /etc/rsyncd.secrets, syntax : user:passwd
42 #
43 cp -a $stuff/etc $fs
44 chown root.root $fs/etc/init.d/*
45 chmod 0644 $fs/etc/rsyncd.conf
47 }
49 config_form()
50 {
51 cat <<EOT
52 <p>
53 <input type="checkbox" name="START" ${START:+ckecked=ckecked }> start rsync daemon during boot
54 </p>
55 <fieldset>
56 <legend><i>/etc/rsyncd.conf</i></legend>
57 <textarea name="RSYNCD_CONF" rows="15" cols="60" wrap="off">
58 ${RSYNCD_CONF:-$(cat $1/etc/rsyncd.conf)}
59 </textarea>
60 </fieldset>
61 <fieldset>
62 <legend><i>/etc/rsyncd.secrets</i></legend>
63 <textarea name="RSYNCD_SECRETS" cols="60" wrap="off">
64 ${RSYNCD_SECRETS:-$(cat $1/etc/rsyncd.secrets)}
65 </textarea>
66 </fieldset>
67 <fieldset>
68 <legend><i>/etc/rsyncd.motd</i></legend>
69 <textarea name="RSYNCD_MOTD" rows="10" cols="60" wrap="off">
70 $RSYNCD_MOTD
71 </textarea>
72 </fieldset>
73 EOT
74 }
76 config_note()
77 {
78 cat <<EOT
79 <script type="text/javascript">
80 function update_form()
81 {
82 var hide = true
83 for (var i = 0; i < document.forms.length; i++) {
84 for (var j = 0; j < document.forms[i].elements.length; j++) {
85 var obj = document.forms[i].elements[j]
86 if (obj.name == "START" && obj.checked == true)
87 hide = false
88 }
89 }
90 for (var i = 0; i < document.forms.length; i++) {
91 for (var j = 0; j < document.forms[i].elements.length; j++) {
92 var obj = document.forms[i].elements[j]
93 switch (obj.name) {
94 case "RSYNCD_CONF" :
95 case "RSYNCD_SECRETS" :
96 case "RSYNCD_MOTD" :
97 obj.disabled = hide; break;
98 }
99 }
100 }
101 }
102 update_form()
103 window.onchange = update_form
104 //-->
105 </script>
106 EOT
107 }
109 post_install()
110 {
111 if [ -n "$START" ]; then
112 cat > $1/etc/rsyncd.conf <<EOT
113 $RSYNCD_CONF
114 EOT
115 cat > $1/etc/rsyncd.secrets <<EOT
116 $RSYNCD_SECRETS
117 EOT
118 cat > $1/etc/rsyncd.motd <<EOT
119 $RSYNCD_MOTD
120 EOT
121 grep -q inetd $1/etc/rcS.conf ||
122 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
123 grep -q rsync $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
124 rsync stream tcp nowait root /usr/bin/rsync /usr/bin/rsync --daemon
125 EOT
126 else
127 rm -f $1/etc/rsyncd.conf $1/etc/rsyncd.secrets \
128 $1/etc/init.d/rsyncd
129 fi
130 }