octopi: switchable qt-version, cleanup

This commit is contained in:
Ray Donnelly
2014-04-23 23:41:03 +01:00
parent e099ee81cb
commit 3676609f17

View File

@@ -3,18 +3,21 @@
_realname=octopi
_mingw_suff=mingw-w64-${CARCH}
pkgname="${_mingw_suff}-${_realname}-git"
pkgver=r432.c19d9fa
_qmake=${MINGW_PREFIX}/bin/qmake
#_qmake=${MINGW_PREFIX}/qt5-static/bin/qmake
pkgver=r503.50e15c9
pkgrel=1
pkgdesc="a powerful Pacman frontend using Qt libs"
arch=('any')
url="https://github.com/aarnt/octopi"
license=('GPL2')
makedepends=('git' "${_mingw_suff}-gcc" "${_mingw_suff}-make")
depends=("${_mingw_suff}-qt5" "${_mingw_suff}-gcc-libs")
makedepends=('git' "${_mingw_suff}-qt5-static" "${_mingw_suff}-gcc" "${_mingw_suff}-make")
depends=("${_mingw_suff}-gcc-libs")
provides=("${_mingw_suff}-${_realname}")
conflicts=("${_mingw_suff}-${_realname}" "${_mingw_suff}-${_realname}-git")
_gitroot="git://github.com/aarnt/octopi.git"
_gitname="octopi"
options=('debug' '!strip')
source=("${_gitname}"::"${_gitroot}"
"0001-Hack-isRootRunning-to-always-be-false-for-_WIN32.patch"
"0002-Define-QT_WA-as-unicode.patch"
@@ -43,30 +46,34 @@ prepare() {
}
build() {
cpucount=$(grep -c processor /proc/cpuinfo 2>/dev/null)
jc=${cpucount:-1}
local _config
cd ${srcdir}
if check_option "debug" "n"; then
_config="release"
else
_config="debug"
fi
cd "$srcdir"
rm -rf build-${MINGW_CHOST}
mkdir build-${MINGW_CHOST}
cd build-${MINGW_CHOST}
msg "Building Octopi..."
qmake ../$_gitname/$_gitname.pro CONFIG+="c++11 release"
mingw32-make -j$jc release
qmake ../$_gitname/$_gitname.pro CONFIG+="c++11 ${_config}"
mingw32-make ${_config}
mkdir -p notifier/pacmanhelper
pushd notifier/pacmanhelper
msg "Building pacmanhelper..."
qmake ../../../$_gitname/notifier/pacmanhelper/pacmanhelper.pro CONFIG+="release"
mingw32-make -j$jc release
${_qmake} ../../../$_gitname/notifier/pacmanhelper/pacmanhelper.pro CONFIG+="${_config}"
mingw32-make ${_config}
popd
mkdir -p notifier/$_gitname-notifier
pushd notifier/$_gitname-notifier
msg "Building $_gitname-notifier..."
qmake ../../../$_gitname/notifier/$_gitname-notifier/$_gitname-notifier.pro CONFIG+="release"
mingw32-make -j$jc release
${_qmake} ../../../$_gitname/notifier/$_gitname-notifier/$_gitname-notifier.pro CONFIG+="release"
mingw32-make ${_config}
popd
}