wok view urbackup-server/receipt @ rev 24466
updated darkstat (3.0.719 -> 3.0.721)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Feb 17 13:39:12 2022 +0100 (2022-02-17) |
parents | 4ffed9fa96a7 |
children | 970deba23db6 |
line source
1 # SliTaz package receipt.
3 PACKAGE="urbackup-server"
4 VERSION="2.4.12"
5 CATEGORY="network"
6 TAGS="backup"
7 SHORT_DESC="An easy to setup Open Source client-server backup system."
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="GPL3"
10 WEB_SITE="https://www.urbackup.org/"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://hndl.urbackup.org/Server/$VERSION/$TARBALL"
15 DEPENDS="cryptopp libcurl"
16 BUILD_DEPENDS="cryptopp curl-dev"
18 # What is the latest version available today?
19 current_version()
20 {
21 wget -O - $WEB_SITE/download.html 2>/dev/null | \
22 sed "/$PACKAGE-/!d;/href/!d;s|.*$PACKAGE-||;s|.tar.*||;q"
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 sed -i 's/chown/echo &/;s/adduser/echo &/g' Makefile*
30 ./configure \
31 --prefix=/usr \
32 --localstatedir=/var \
33 $CONFIGURE_ARGS &&
34 make &&
35 make DESTDIR=$DESTDIR install
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $install/usr/share/man
43 cp -a $install/* $fs
44 cp $src/docs/* $install/usr/share/man
45 }
47 # Pre and post install commands for Tazpkg.
48 post_install()
49 {
51 local user
52 local group
54 user=urbackup
55 group=urbackup
57 if ! grep -q $user "$1/etc/passwd"
58 then
59 echo
60 echo -n "Adding user/group $user..."
61 chroot "$1/" addgroup -S $group
62 chroot "$1/" adduser -s /bin/false -S -D -h /var/urbackup -G $group $user
63 status
64 fi
65 chroot "$1/" chown urbackup:urbackup /usr/share/urbackup /usr/share/urbackup/urbackup_ecdsa409k1.pub
66 chroot "$1/" chown -R urbackup:urbackup /usr/share/urbackup/www
67 chroot "$1/" chmod +s /usr/bin/urbackup_snapshot_helper /usr/bin/urbackup_mount_helper
68 }
70 post_remove()
71 {
72 echo "Removing user/group urbackup"
73 chroot "$1/" deluser urbackup
74 }