summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d19379e73182768709ae44f03532de09c04ebd50 (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
# Maintainer: Hill YU <hillyunews@gmail.com>, Saren Arterius <saren@gmail.com>
# Contributor: favonia <favonia@gmail.com>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: Stefan Tatschner <stefan@sevenbyte.org>

pkgname=syncthing-inotify-git
_pkgname=syncthing-inotify
pkgver=0.8.5.r24.gaf6fbf9
pkgrel=3
pkgdesc="Inotify file watcher for Syncthing, deprecated in favor of integration since Syncthing v0.14.40"
url="https://github.com/syncthing/syncthing-inotify"
license=('MPL')
arch=(any)
provides=("$_pkgname")
conflicts=("$_pkgname")
depends=('syncthing')
makedepends=('git' 'go' 'godep')
source=("$_pkgname-$pkgver::git+https://github.com/syncthing/syncthing-inotify.git")
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}/src/github.com/syncthing/${_pkgname}"
  # cutting off 'v' prefix that presents in the git tag
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
    cd "${srcdir}"
    mkdir -p "src/github.com/syncthing"
    mv "${_pkgname}-${pkgver}" "src/github.com/syncthing/${_pkgname}"
}

build() {
    export GOPATH="${srcdir}"
    cd "${srcdir}/src/github.com/syncthing/${_pkgname}"
    go get
    go get -u github.com/FiloSottile/gvt
    ${srcdir}/bin/gvt update github.com/zillode/notify
    go build
}


package() {
    cd "${srcdir}/src/github.com/syncthing/${_pkgname}"
    install -Dm755 ${_pkgname} "${pkgdir}/usr/bin/${_pkgname}"
    install -Dm644 "etc/linux-systemd/user/syncthing-inotify.service" "${pkgdir}/usr/lib/systemd/user/syncthing-inotify.service"
    install -Dm644 "etc/linux-systemd/system/syncthing-inotify@.service" "${pkgdir}/usr/lib/systemd/system/syncthing-inotify@.service"
    install -Dm644 README.md "${pkgdir}/usr/share/doc/${_pkgname}/README.md"
    install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${_pkgname}/LICENSE
}