# HG changeset patch # User Pascal Bellard # Date 1342731789 -7200 # Node ID a53953f4078ed2b959eefc7313af86919416391f # Parent d55b82d5919c9e46818eae7f20cb69e94a5a64b6 Add rsync diff -r d55b82d5919c -r a53953f4078e p910nd/receipt --- a/p910nd/receipt Tue Jun 12 11:57:26 2012 +0200 +++ b/p910nd/receipt Thu Jul 19 23:03:09 2012 +0200 @@ -26,7 +26,6 @@ { mkdir -p $fs/usr $fs/etc/init.d $fs/dev cp -a $_pkg/usr/sbin $fs/usr - mknod -m 660 $fs/dev/lp0 c 6 0 ln -s daemon $fs/etc/init.d/p910nd } @@ -41,6 +40,9 @@ echo "$DEVICES" | dos2unix | awk '{ if ($1 != "") printf \ "%d stream tcp nowait root %s %s -b -f %s\n", 9100 + n++, \ "/usr/sbin/p910nd", "/usr/sbin/p910nd", $1 }' >> $1/etc/inetd.conf + for dev in $DEVICES; do + mknod -m 660 $fs$dev c 6 ${dev#*lp} + done } config_form() diff -r d55b82d5919c -r a53953f4078e rsync/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rsync/receipt Thu Jul 19 23:03:09 2012 +0200 @@ -0,0 +1,124 @@ +# SliTaz package receipt. + +PACKAGE="rsync" +VERSION="3.0.9" +CATEGORY="network" +SHORT_DESC="Utility that provides fast incremental." +MAINTAINER="pankso@slitaz.org" +[ -n "$TARGET" ] || TARGET="i486" +BUILD_DEPENDS="uclibc-cross-compiler-$TARGET" +DEPENDS="" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://rsync.samba.org/" +WGET_URL="${WEB_SITE}ftp/$PACKAGE/$TARBALL" +CONFIG_FILES="/etc/rsyncd.conf /etc/rsyncd.secrets" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src +sed -i 's/cross_compiling=no/cross_compiling=yes/' configure.sh + ./configure CC=uclibc-$TARGET-cc --host=i486-pc-linux-gnu \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --disable-iconv --disable-iconv-open \ + --disable-acl-support --disable-xattr-support \ + --with-included-popt --disable-debug \ + $CONFIGURE_ARGS + sed -i -e 's/HAVE_ICONV_H ./HAVE_ICONV_H 0/' \ + -e 's/HAVE_ICONV_OPEN ./HAVE_ICONV_OPEN 0/' config.h + sed -i 's/-liconv//' Makefile + make && + make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr + cp -a $_pkg/usr/bin $fs/usr + # Config file is /etc/rsyncd.conf. + # User and passwd in /etc/rsyncd.secrets, syntax : user:passwd + # + cp -a stuff/etc $fs + chown root.root $fs/etc/init.d/* + chmod 0644 $fs/etc/rsyncd.conf + +} + +config_form() +{ + cat < + start rsync daemon during boot +

+
+/etc/rsyncd.conf + +
+
+/etc/rsyncd.secrets + +
+
+/etc/rsyncd.motd + +
+EOT +} + +config_note() +{ + cat < +function update_form() +{ + var hide = true + for (var i = 0; i < document.forms.length; i++) { + for (var j = 0; j < document.forms[i].elements.length; j++) { + var obj = document.forms[i].elements[j] + if (obj.name == "START" && obj.checked == true) + hide = false + } + } + for (var i = 0; i < document.forms.length; i++) { + for (var j = 0; j < document.forms[i].elements.length; j++) { + var obj = document.forms[i].elements[j] + switch (obj.name) { + case "RSYNCD_CONF" : + case "RSYNCD_SECRETS" : + case "RSYNCD_MOTD" : + obj.disabled = hide; break; + } + } + } +} +update_form() +window.onchange = update_form +//--> + +EOT +} + +post_install() +{ + if [ -n "$START" ]; then + cat > $1/etc/rsyncd.conf < $1/etc/rsyncd.secrets < $1/etc/rsyncd.motd <