wok-current annotate urbackup-server/receipt @ rev 25187
mencoder: reordered recipe
author | Hans-G?nter Theisgen |
---|---|
date | Tue Jul 12 10:44:40 2022 +0100 (2022-07-12) |
parents | 922f061231c2 |
children | 3c71bb4367c3 |
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" |
pascal@24939 | 10 WEB_SITE="https://github.com/uroni/urbackup_backend" |
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@24304 | 18 # What is the latest version available today? |
pascal@24304 | 19 current_version() |
pascal@24304 | 20 { |
pascal@24939 | 21 wget -O - https://www.urbackup.org/download.html 2>/dev/null | \ |
pascal@24304 | 22 sed "/$PACKAGE-/!d;/href/!d;s|.*$PACKAGE-||;s|.tar.*||;q" |
pascal@24304 | 23 } |
pascal@24304 | 24 |
pascal@19952 | 25 # Rules to configure and make the package. |
pascal@19952 | 26 compile_rules() |
pascal@19952 | 27 { |
pascal@19954 | 28 sed -i 's/chown/echo &/;s/adduser/echo &/g' Makefile* |
Hans-G?nter@23722 | 29 |
Hans-G?nter@23722 | 30 ./configure \ |
Hans-G?nter@23722 | 31 --prefix=/usr \ |
Hans-G?nter@23722 | 32 --localstatedir=/var \ |
pascal@19952 | 33 $CONFIGURE_ARGS && |
pascal@19952 | 34 make && |
pascal@19952 | 35 make DESTDIR=$DESTDIR install |
pascal@19952 | 36 } |
pascal@19952 | 37 |
pascal@19952 | 38 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@19952 | 39 genpkg_rules() |
pascal@19952 | 40 { |
pascal@19952 | 41 mkdir -p $install/usr/share/man |
Hans-G?nter@23722 | 42 |
Hans-G?nter@23722 | 43 cp -a $install/* $fs |
Hans-G?nter@23722 | 44 cp $src/docs/* $install/usr/share/man |
pascal@19952 | 45 } |
pascal@19953 | 46 |
pascal@19953 | 47 # Pre and post install commands for Tazpkg. |
pascal@19953 | 48 post_install() |
pascal@19953 | 49 { |
pascal@19953 | 50 |
pascal@19953 | 51 local user |
pascal@19953 | 52 local group |
pascal@19953 | 53 |
pascal@19953 | 54 user=urbackup |
pascal@19953 | 55 group=urbackup |
pascal@19953 | 56 |
Hans-G?nter@23722 | 57 if ! grep -q $user "$1/etc/passwd" |
Hans-G?nter@23722 | 58 then |
pascal@20319 | 59 echo |
pascal@19953 | 60 echo -n "Adding user/group $user..." |
pascal@19953 | 61 chroot "$1/" addgroup -S $group |
pascal@19954 | 62 chroot "$1/" adduser -s /bin/false -S -D -h /var/urbackup -G $group $user |
pascal@19953 | 63 status |
pascal@19953 | 64 fi |
pascal@19953 | 65 chroot "$1/" chown urbackup:urbackup /usr/share/urbackup /usr/share/urbackup/urbackup_ecdsa409k1.pub |
pascal@19953 | 66 chroot "$1/" chown -R urbackup:urbackup /usr/share/urbackup/www |
pascal@19953 | 67 chroot "$1/" chmod +s /usr/bin/urbackup_snapshot_helper /usr/bin/urbackup_mount_helper |
pascal@19953 | 68 } |
pascal@19953 | 69 |
pascal@19953 | 70 post_remove() |
pascal@19953 | 71 { |
pascal@19953 | 72 echo "Removing user/group urbackup" |
pascal@19953 | 73 chroot "$1/" deluser urbackup |
pascal@19953 | 74 } |