archrelease: copy trunk to community-any
[ArchLinux/community.git] / rsnapshot / repos / community-any / PKGBUILD
blobdb339c6c56039cf97d4ea8011ad3509d5de37bdf
1 # Maintainer:
2 # Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
3 # Contributor: Thorsten Tasch <tht@thorstentasch.de>
4 # Contributor: JJDaNiMoTh <jjdanimoth@gmail.com>
5 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
7 pkgname=rsnapshot
8 pkgver=1.4.5
9 pkgrel=1
10 pkgdesc="A remote filesystem snapshot utility"
11 arch=('any')
12 url="https://www.rsnapshot.org"
13 license=('GPL')
14 depends=('perl' 'rsync' 'openssh' 'perl-lchown')
15 backup=('etc/rsnapshot.conf')
16 source=("$pkgname-$pkgver.tar.gz::https://github.com/rsnapshot/rsnapshot/archive/$pkgver.tar.gz"
17         'rsnapshot'
18                 '0001-added-missing-back.patch'
19                 "pod-fix.patch")
20 sha256sums=('8ef500e2eaee85a37fb8000f73b3b1325569fcfe940a7e8ea66a8f243cb289a3'
21             'ab98a605b8c8fe3d99dcd6c5d74ec3bc3c19dcf95766290ae697594fa881122f'
22             '8b89cb048b5b52b2fe748ec14e9d092e79fc2bd24e9cd5c0877bac535466cc8e'
23             '9f89badd3c3dbea6c03883ae269f7759b869a3c981eff699353dce7d19becb47')
25 prepare() {
26         cd "${srcdir}/${pkgname}-${pkgver}"
28         patch -p1 -i "$srcdir/0001-added-missing-back.patch"
29         patch -p1 -i "$srcdir/pod-fix.patch"
31         # SSH testing requires a local SSH daemon with a specific user and won't
32         # work reliably on different build hosts.
33         rm t/ssh_args/ssh_args.t.in
36 build() {
37         cd "${srcdir}/${pkgname}-${pkgver}"
38         ./autogen.sh
39         ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
40         sed -i 's:/usr/bin/pod2man:/usr/bin/core_perl/pod2man:' Makefile
41         make
44 check() {
45         cd "${srcdir}/${pkgname}-${pkgver}"
46         make test
49 package() {
50         cd "${srcdir}/${pkgname}-${pkgver}"
52         make DESTDIR=${pkgdir} install
53         install -Dm755 utils/rsnapreport.pl "$pkgdir/usr/bin/rsnapreport.pl"
54         mv "${pkgdir}/etc/rsnapshot.conf.default" "${pkgdir}/etc/rsnapshot.conf"
55         install -Dm644 "${srcdir}/rsnapshot" "${pkgdir}/etc/logrotate.d/rsnapshot"