summaryrefslogtreecommitdiff
path: root/repo/qtchooser/qtchooser.xibuild
blob: b2c9a987fe18da130d8068ce8359e6a15f658acf (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
#!/bin/sh

NAME="qtchooser"
DESC="Wrap the other Qt tools by searching for different instances of Qt on the system"

MAKEDEPS=""

PKG_VER=66
SOURCE="https://download.qt.io/official_releases/qtchooser/qtchooser-$PKG_VER.tar.xz"

ADDITIONAL="
qt5.conf
qt6.conf
"

prepare () {
    sed -i "s/install -m 644 -p/install -m 644/g" Makefile
    sed -i "s/install -m 755 -p/install -m 755/g" src/qtchooser/Makefile
}

build() {
	bindir=/usr/lib/qtchooser/ make
}

package() {
	INSTALL_ROOT="$PKG_DEST" make install

	install -d "$PKG_DEST"/etc/xdg/qtchooser
	install -m644 "$BUILD_ROOT"/qt5.conf \
		"$PKG_DEST"/etc/xdg/qtchooser/
	install -m644 "$BUILD_ROOT"/qt6.conf \
		"$PKG_DEST"/etc/xdg/qtchooser/

	# Set the default Qt
	ln -s /etc/xdg/qtchooser/qt5.conf \
		"$PKG_DEST"/etc/xdg/qtchooser/default.conf
}