aboutsummaryrefslogtreecommitdiffstats
path: root/community/czkawka/APKBUILD
blob: c33853f8c40315cc98878b2f69ec89369af49a52 (plain) (blame)
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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=czkawka
pkgver=3.1.0
pkgrel=0
pkgdesc="Multi functional app to find duplicates, empty folders, similar images etc. (CLI)"
url="https://github.com/qarmin/czkawka"
arch="x86_64 armv7 armhf aarch64 x86 ppc64le"  # limited by rust/cargo
license="MIT"
makedepends="alsa-lib-dev bzip2-dev cargo gtk+3.0-dev"
subpackages="$pkgname-gui $pkgname-doc"
source="https://github.com/qarmin/czkawka/archive/$pkgver/$pkgname-$pkgver.tar.gz
	minimize-size.patch
	"

build() {
	cargo build --release --locked
}

check() {
	cargo test --locked
}

package() {
	install -D -m 755 target/release/czkawka_cli "$pkgdir"/usr/bin/czkawka
	ln -s czkawka "$pkgdir"/usr/bin/czkawka_cli

	install -D -m 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}

gui() {
	pkgdesc="${pkgdesc/CLI/GUI}"
	license="$license AND CC-BY-4.0"

	cd "$builddir"

	install -D -m 755 ./target/release/czkawka_gui -t "$subpkgdir"/usr/bin/

	install -D -m 644 ./data/icons/com.github.qarmin.czkawka.svg \
		-t "$subpkgdir"/usr/share/icons/hicolor/scalable/apps/

	install -D -m 644 ./pkgs/com.github.qarmin.czkawka.desktop \
		-t "$subpkgdir"/usr/share/applications/

	install -D -m 644 ./data/com.github.qarmin.czkawka.metainfo.xml \
		-t "$subpkgdir"/usr/share/metainfo/
}

sha512sums="
74654989484283d76174897100828bd739961400a2c5952a4971813809a7b338fb65e1db39ba1bc843888136ea4dac9af19598aaf0622587e9154bb0ffae6efc  czkawka-3.1.0.tar.gz
f3215f6999ab5f20f8227eca123981638f9c4cfda7876c21ba192f367755756d8a4774482a39c151af309331b666af343b29d0cb951b7389368b322a39098bfa  minimize-size.patch
"