aboutsummaryrefslogtreecommitdiffstats
path: root/community/imgbrd-grabber/APKBUILD
blob: 5e4ddb8da420d5eae1a171d194caa734481e892d (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
40
41
42
43
44
45
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=imgbrd-grabber
pkgver=7.3.2
pkgrel=0
pkgdesc="Powerful imageboard/booru downloader"
options="!check" # Tests requires graphics
url="https://bionus.github.io/imgbrd-grabber"
# mps64 and mips64el blocked by nodejs restrictions
# armhf blocked by qt5-qtdeclarative
arch="all !mips64 !mips64el !armhf"
license="Apache-2.0"
makedepends="cmake nodejs qt5-qtdeclarative-dev qt5-qtmultimedia-dev
	qt5-qtbase-mysql qt5-qtbase-odbc qt5-qtbase-sqlite qt5-qtbase-tds
	qt5-qtscript-dev qt5-qtbase-dev qt5-qttools-dev npm"
source="$pkgname-$pkgver.tar.gz::https://github.com/Bionus/imgbrd-grabber/archive/v$pkgver.tar.gz"
builddir="$srcdir"/imgbrd-grabber-$pkgver/src

prepare() {
	default_prepare
	sed -i 's|USE_QSCINTILLA 1|USE_QSCINTILLA 0|' gui/CMakeLists.txt
	sed -i 's|USE_BREAKPAD 1|USE_BREAKPAD 0|' gui/CMakeLists.txt
	sed -i '/add_subdirectory(tests)/d' CMakeLists.txt
}

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		$CMAKE_CROSSOPTS
	make -C build
}

package() {
	make -C build DESTDIR="$pkgdir" install
	touch "$pkgdir"/usr/share/Grabber/settings.ini
}

sha512sums="44ee7f55d9cc6efee3ae27ace15fd54fd1b3d8511e8bc831fb6146a4ee46e4a0bbd753fa69361f385a58fc1ce743694d2eda044c13ae813835e69080a2a28acc  imgbrd-grabber-7.3.2.tar.gz"