summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c4fab2d35b63fff128b22a025bf7c71c445c16a5 (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
#
# PKGBUILD file for package czkawka
#
# Copyright (C) 2020  sp1rit
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

# Maintainer: sp1rit <sp1ritCS@protonmail.com>

_basename=czkawka
pkgname=${_basename}-git
pkgver=4.1.0.r16.g56fc29f
pkgrel=1
pkgdesc="Multi functional app to find duplicates, empty folders etc."
arch=(any)
url="https://github.com/qarmin/czkawka"
license=('MIT')
depends=("gtk4")
makedepends=("git" "rust" "cargo")
provides=("czkawka")
conflicts=("czkawka" "czkawka-gui" "czkawka-bin")
source=("${_basename}::git+https://github.com/qarmin/czkawka.git")
md5sums=("SKIP")

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

build() {
	cd "${_basename}/"
	cargo build --release --bin czkawka_gui
	cargo build --release --bin czkawka_cli
}

check() {
	cd "${_basename}/czkawka_core"
	cargo test
}

package() {
	cd "${_basename}"
	#ls -lah target/release/
	install -Dm755 target/release/czkawka_gui $pkgdir/usr/bin/${_basename}_gui
	install -Dm755 target/release/czkawka_cli $pkgdir/usr/bin/${_basename}_cli

	ln -s $pkgdir/usr/bin/${_basename}_gui $pkgdir/usr/bin/${_basename}

	install -Dm644 LICENSE $pkgdir/usr/share/licenses/${_basename}/LICENSE
	install -Dm644 data/com.github.qarmin.czkawka.desktop -t $pkgdir/usr/share/applications/
}