summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 23b145c4260db6c5e7e1935fba7b876a9846de79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
_pkgname=rsync
pkgname="$_pkgname-reflink-git"
pkgver=3.2.7.r16.g90df93e4
pkgrel=1
pkgdesc='A fast and versatile file copying tool for remote and local files - with reflink support (git)'
arch=('i686' 'x86_64')
url='https://github.com/WayneD/rsync/issues/153'
license=('GPL3')
depends=(
  'acl'
  'libacl.so'
  'libxxhash.so'
  'popt'
  'xxhash'
  'zstd'
)
optdepends=(
  'python: for rrsync'
)
makedepends=('git' 'python-commonmark')
provides=("$_pkgname")
conflicts=(${provides[@]})
backup=(
  'etc/rsyncd.conf'
  'etc/xinetd.d/rsync'
)
source=(
  "$_pkgname"::"git+https://github.com/WayneD/rsync"
  'https://github.com/WayneD/rsync-patches/raw/master/clone-dest.diff'
  'https://github.com/WayneD/rsync-patches/raw/master/detect-renamed.diff'
  'https://github.com/WayneD/rsync-patches/raw/master/detect-renamed-lax.diff'
  'rsyncd.conf'
)
sha256sums=(
  'SKIP'
  'SKIP'
  'SKIP'
  'SKIP'
  '733ccb571721433c3a6262c58b658253ca6553bec79c2bdd0011810bb4f2156b'
)

pkgver() {
  cd "$srcdir/$_pkgname"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir/$_pkgname"
  patch -Np1 -F100 -i "$srcdir/clone-dest.diff"
  patch -Np1 -F100 -i "$srcdir/detect-renamed.diff"
  patch -Np1 -F100 -i "$srcdir/detect-renamed-lax.diff"
}

build() {
  cd "$srcdir/$_pkgname"

  ./configure \
    --prefix=/usr \
    --disable-debug \
    --with-included-popt=no \
    --with-included-zlib=no
  make
}

check() {
  cd "$srcdir/$_pkgname"
  make test
}


package() {
  cd "$srcdir/$_pkgname"

  make DESTDIR="$pkgdir" install
  install -Dm0644 ../rsyncd.conf "$pkgdir/etc/rsyncd.conf"
  install -Dm0644 packaging/lsb/rsync.xinetd "$pkgdir/etc/xinetd.d/rsync"
  install -Dm0644 packaging/systemd/rsync.service "$pkgdir/usr/lib/systemd/system/rsyncd.service"
  install -Dm0644 packaging/systemd/rsync.socket "$pkgdir/usr/lib/systemd/system/rsyncd.socket"
  install -Dm0644 packaging/systemd/rsync@.service "$pkgdir/usr/lib/systemd/system/rsyncd@.service"
  install -Dm0755 support/rrsync "$pkgdir/usr/lib/rsync/rrsync"  
}