aboutsummaryrefslogtreecommitdiffhomepage
path: root/srcpkgs/qtutilities/template
blob: 9061bf8b9a292cbaa1e40ce1820c37b5967da12b (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
# Template file for 'qtutilities'
pkgname=qtutilities
version=6.19.1
revision=1
build_style=cmake
configure_args="-DBUILD_SHARED_LIBS=ON -DQT_PACKAGE_PREFIX=Qt6"
hostmakedepends="qt6-base qt6-tools"
makedepends="qt6-base-devel cpp-utilities-devel"
checkdepends="xvfb-run"
short_desc="Qt helper routines, including dialogs, widgets, and models"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="GPL-2.0-only"
homepage="https://github.com/Martchus/qtutilities"
distfiles="https://github.com/Martchus/qtutilities/archive/v${version}.tar.gz"
checksum=5f6f7f4c5f49416fb6826be712dadcce7a7cf3673a5db403f75f65497efc737a

pre_check() {
	ninja -C build tests
}

qtutilities-devel_package() {
	short_desc+=" - development files"
	depends="${sourcepkg}>=${version}_${revision} cpp-utilities-devel"
	pkg_install() {
		vmove usr/include
		vmove "usr/lib/*.so"
		vmove usr/lib/pkgconfig

		# Rename cmake modules to fit with the rest of the system
		vmkdir usr/lib/cmake
		cmake_source="${DESTDIR}/usr/share/${sourcepkg}/cmake"
		cmake_dest="${PKGDESTDIR}/usr/lib/cmake/${sourcepkg}"
		mv "$cmake_source" "$cmake_dest"

		# Update cmake configuration to point to new location
		vsed -i "${cmake_dest}/${sourcepkg}Config.cmake" \
			-e "s@share/${sourcepkg}/cmake@lib/cmake/${sourcepkg}@g"
	}
}