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
|
# Maintainer: frousties
# Contributor: frousties
_pkgname=tacentview
pkgname=${_pkgname}-git
pkgver=1.0.44.45.g78efdee
pkgrel=1
pkgdesc="An image and texture viewer for tga, png, apng, exr, dds, ktx, ktx2, astc, pkm, qoi, gif, hdr, jpg, tif, ico, webp, and bmp files. Uses Dear ImGui, OpenGL and Tacent."
arch=('any')
url="https://github.com/bluescan/${_pkgname}"
license=('ISC')
provides=("${_pkgname}=${pkgver}")
provides=(${_pkgname})
depends=('gcc-libs' 'hicolor-icon-theme' 'libx11' 'libxcb')
makedepends=('cmake' 'git' 'ninja')
source=("git+${url}.git")
sha512sums=('SKIP')
pkgver() {
cd "${_pkgname}"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/\1/;s/-/./g'
}
prepare() {
# `cmake` call in `prepare()` since it will download stuff.
cmake -S "${_pkgname}" -B build \
-DCMAKE_BUILD_TYPE=Release \
-DFETCHCONTENT_QUIET=OFF \
-GNinja
}
build() {
# We build!
ninja -C build install
}
package() {
DEB_TEMPLATE="${_pkgname}/Linux/deb_template/usr"
# Installing the program's binaries
install -D -m755 build/ViewerInstall/${_pkgname} -t "${pkgdir}/usr/bin/"
# Installing the program's data
install -D -m644 build/ViewerInstall/Data/* -t "${pkgdir}/usr/share/${_pkgname}/Data/"
# Installing the desktop file
install -D -m644 ${DEB_TEMPLATE}/share/applications/* -t "${pkgdir}/usr/share/applications/"
# Installing the docs
install -D -m644 ${_pkgname}/docs/* -t "${pkgdir}/usr/share/doc/${_pkgname}"
# Installing the licenses
install -D -m644 ${_pkgname}/LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}/"
# Installing the icon files (quick and dirty solution due to the complex structure)
cd ${DEB_TEMPLATE}/share/icons/
find ./* -type f -exec install -D -m644 "{}" "${pkgdir}/usr/share/icons/{}" \;
}
|