wok-6.x annotate urbackup-server/receipt @ rev 23925
Add Connect-Four
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Aug 23 10:18:23 2020 +0000 (2020-08-23) |
parents | fffb92e609f9 |
children | 922f061231c2 |
rev | line source |
---|---|
pascal@19952 | 1 # SliTaz package receipt. |
pascal@19952 | 2 |
pascal@19952 | 3 PACKAGE="urbackup-server" |
Hans-G?nter@23722 | 4 VERSION="2.4.12" |
pascal@19952 | 5 CATEGORY="network" |
Hans-G?nter@23722 | 6 TAGS="backup" |
Hans-G?nter@23722 | 7 SHORT_DESC="An easy to setup Open Source client-server backup system." |
pascal@19952 | 8 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@19952 | 9 LICENSE="GPL3" |
Hans-G?nter@23722 | 10 WEB_SITE="https://www.urbackup.org/" |
Hans-G?nter@23722 | 11 |
pascal@19952 | 12 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@19952 | 13 WGET_URL="https://hndl.urbackup.org/Server/$VERSION/$TARBALL" |
pascal@19952 | 14 |
Hans-G?nter@23722 | 15 DEPENDS="cryptopp libcurl" |
Hans-G?nter@23722 | 16 BUILD_DEPENDS="cryptopp curl-dev" |
pascal@19952 | 17 |
pascal@19952 | 18 # Rules to configure and make the package. |
pascal@19952 | 19 compile_rules() |
pascal@19952 | 20 { |
pascal@19954 | 21 sed -i 's/chown/echo &/;s/adduser/echo &/g' Makefile* |
Hans-G?nter@23722 | 22 |
Hans-G?nter@23722 | 23 ./configure \ |
Hans-G?nter@23722 | 24 --prefix=/usr \ |
Hans-G?nter@23722 | 25 --localstatedir=/var \ |
pascal@19952 | 26 $CONFIGURE_ARGS && |
pascal@19952 | 27 make && |
pascal@19952 | 28 make DESTDIR=$DESTDIR install |
pascal@19952 | 29 } |
pascal@19952 | 30 |
pascal@19952 | 31 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@19952 | 32 genpkg_rules() |
pascal@19952 | 33 { |
pascal@19952 | 34 mkdir -p $install/usr/share/man |
Hans-G?nter@23722 | 35 |
Hans-G?nter@23722 | 36 cp -a $install/* $fs |
Hans-G?nter@23722 | 37 cp $src/docs/* $install/usr/share/man |
pascal@19952 | 38 } |
pascal@19953 | 39 |
pascal@19953 | 40 # Pre and post install commands for Tazpkg. |
pascal@19953 | 41 post_install() |
pascal@19953 | 42 { |
pascal@19953 | 43 |
pascal@19953 | 44 local user |
pascal@19953 | 45 local group |
pascal@19953 | 46 |
pascal@19953 | 47 user=urbackup |
pascal@19953 | 48 group=urbackup |
pascal@19953 | 49 |
Hans-G?nter@23722 | 50 if ! grep -q $user "$1/etc/passwd" |
Hans-G?nter@23722 | 51 then |
pascal@20319 | 52 echo |
pascal@19953 | 53 echo -n "Adding user/group $user..." |
pascal@19953 | 54 chroot "$1/" addgroup -S $group |
pascal@19954 | 55 chroot "$1/" adduser -s /bin/false -S -D -h /var/urbackup -G $group $user |
pascal@19953 | 56 status |
pascal@19953 | 57 fi |
pascal@19953 | 58 chroot "$1/" chown urbackup:urbackup /usr/share/urbackup /usr/share/urbackup/urbackup_ecdsa409k1.pub |
pascal@19953 | 59 chroot "$1/" chown -R urbackup:urbackup /usr/share/urbackup/www |
pascal@19953 | 60 chroot "$1/" chmod +s /usr/bin/urbackup_snapshot_helper /usr/bin/urbackup_mount_helper |
pascal@19953 | 61 } |
pascal@19953 | 62 |
pascal@19953 | 63 post_remove() |
pascal@19953 | 64 { |
pascal@19953 | 65 echo "Removing user/group urbackup" |
pascal@19953 | 66 chroot "$1/" deluser urbackup |
pascal@19953 | 67 } |