summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f0901498a73b984eff8bf403a9f4b1ecf0f66498 (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
# Maintainer: frousties
# Contributor: frousties
_pkgname=tacentview
pkgname=${_pkgname}-git
pkgver=1.0.39.r0.g3f6b1cb
pkgrel=1
pkgdesc="Tacent View. An image and texture viewer for tga, png, apng, exr, dds, gif, hdr, jpg, tiff, ico, webp, and bmp files."
arch=('i686' 'x86_64')
url="https://github.com/bluescan/${_pkgname}"
license=('ISC')
groups=('')
depends=('libx11')
makedepends=('cmake' 'dpkg' 'gcc12' 'git' 'ninja')
options=('!emptydirs')
source_x86_64=("git+https://github.com/bluescan/${_pkgname}.git")
sha512sums_x86_64=('SKIP')

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

build() {
	cmake -S "${_pkgname}" -B build -GNinja -DPACKAGE_DEB=True -DCMAKE_CXX_COMPILER=gcc-12 -DCMAKE_C_COMPILER=gcc-12
	ninja -C build install
}

package() {
	# Cleaning some rogue .gitignore lying around
	find . -name ".gitignore" -exec rm -rf {} \;
	
	cd "${srcdir}/build/ViewerInstall/Package/"
	INPUT=$(find . -maxdepth 1 -type d | grep "${_pkgname}_*")
	cp -r "${INPUT}/usr" "${pkgdir}"
}