summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 243121440b9d48a336df1515ca7a33a8554c2cad (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
# Maintainer: karwler <karwler@horsefucker.org>
pkgname='sfbrename-cli'
_pkgname='sfbrename'
pkgver='1.0.0'
pkgrel='1'
pkgdesc='Simple bulk rename utility (CLI tool)'
arch=('x86_64')
url='https://github.com/karwler/sfbrename'
license=('custom')
depends=('glib2')
makedepends=('cmake' 'gcc' 'git' 'make')
provides=("$_pkgname")
conflicts=("$_pkgname-gtk")
source=("$_pkgname::git+https://github.com/karwler/sfbrename.git#tag=70d9967d46b209ac1247cb863bfbb42f0549213f")
sha256sums=('SKIP')

prepare() {
	sed -i 's/Exec=usr/Exec=\/usr/;s/Icon=sfbrename/Icon=\/usr\/share\/sfbrename\/sfbrename.png/' "$srcdir/$_pkgname/rsc/$_pkgname.desktop"
}

pkgver() {
	cd "$srcdir/$_pkgname"
	git describe --tags | sed 's/^v//'
}

build() {
	cd "$srcdir/$_pkgname"
	cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" -DCONSOLE=1
	make
}

package() {
	cd "$srcdir/$_pkgname"
	make install
	mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
	cp "$srcdir/$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
}