void-packages/srcpkgs/qbittorrent/template

44 lines
1.3 KiB
Bash

# Template file for 'qbittorrent'
pkgname=qbittorrent
version=4.1.0
revision=1
build_style=qmake
hostmakedepends="automake libtool pkg-config qt5-host-tools qt5-tools"
makedepends="libtorrent-rasterbar-devel qt5-declarative-devel qt5-svg-devel"
depends="qt5-svg"
short_desc="Free software alternative to µtorrent"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-2"
homepage="http://www.qbittorrent.org/"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
checksum=fc9684b6246f1597fecf19a2d9bb64ec7618a87a7427b37410a487c13439b939
if [ -n "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-declarative-devel qt5-svg-devel"
fi
build_options="gui webui"
desc_option_gui="Enable the graphical user interface"
desc_option_webui="Enable the web user interface"
build_options_default="gui"
pre_configure() {
local conf="--prefix=/usr"
conf+=" --disable-systemd"
conf+=" --with-boost=${XBPS_CROSS_BASE}/usr"
conf+=" --with-boost-libdir=${XBPS_CROSS_BASE}/usr/lib"
if [ -n "$CROSS_BUILD" ]; then
conf+=" --host=${XBPS_CROSS_TRIPLET}"
fi
./bootstrap.sh
./configure ${conf} $(vopt_enable gui) $(vopt_enable webui)
}
post_configure() {
sed -i src/Makefile \
-e "s;^\(CC\\s*=\) .*;\1 $CC;" \
-e "s;^\(CXX\\s*=\) .*;\1 $CXX;" \
-e "s;^\(LINK\\s*=\) .*;\1 $CXX;" \
-e "s;@g++ ;@$CXX ;"
}