summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 656540292834be3194c7e2541b0dfd3c12b4850d (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
# Maintainer: decipher3114 <decipher3114@gmail.com>
pkgname="capter"
pkgver=v2.2.2
pkgrel=1
pkgdesc="A simple cross-platform screenshot tool made in rust"
arch=("x86_64")
url="https://github.com/decipher3114/capter"
license=("Apache-2.0")
depends=(
    "git"
    "gtk3"
    "xdotool"
    "libayatana-appindicator"
    "libxcb"
    "libxrandr"
    "dbus"
)
makedepends=(
	"rust"
	"gtk3"
    "xdotool"
    "libayatana-appindicator"
    "libxcb"
    "libxrandr"
    "dbus"
)
source=(
    "git+https://github.com/decipher3114/capter"
)
noextract=()
md5sums=('SKIP')

pkgver() {  
	cd "${srcdir}/${pkgname}"
    git fetch --tags
    git describe --tags | sed 's/-.*//g'
}

prepare() {
    cd "${srcdir}/${pkgname}"
    git fetch --all --tags
}

build() {
    cd "${srcdir}/${pkgname}"
    git reset --hard "${pkgver}"
    cargo build --release
}

package() {
    cd "${srcdir}/${pkgname}"
    install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
    mkdir -p "${pkgdir}/usr/share/icons"
    cp -R --update "assets/resources/linux/hicolor" "${pkgdir}/usr/share/icons"
    install -Dm644 "assets/resources/linux/capter.desktop" -t "${pkgdir}/usr/share/applications"
}