diff options
author | MatMoul | 2019-07-28 03:26:58 +0200 |
---|---|---|
committer | MatMoul | 2019-07-28 03:26:58 +0200 |
commit | f350f71a6babcc42b342164d8a20ec1ff142141f (patch) | |
tree | e67b72808e8da34ac2a9c773a77292129a7e7e7a | |
parent | 0e9cb0f5a73b7165e16bad19ec06a2e5c868f36b (diff) | |
download | aur-f350f71a6babcc42b342164d8a20ec1ff142141f.tar.gz |
New version
-rw-r--r-- | PKGBUILD | 61 |
1 files changed, 42 insertions, 19 deletions
@@ -1,13 +1,20 @@ # Maintainer: MatMoul <matmoul@gmail.com> + +# Comment to preserve the very old release... +USE_DEV='1' + + pkgbase=octopi-notifier-qt5 pkgname=('octopi-notifier-qt5') pkgver=0.9.0 pkgrel=2 pkgdesc="Notifier for Octopi using Qt5 libs" pkggit=octopi -# Temporary solution for an up to date release, need to be commented for the tagged release. -_gitcommit=31060ae2b2f7c496c95b2262b8219c39b65e45be +if [[ ${USE_DEV} == '1' ]]; then + _gitcommit=31060ae2b2f7c496c95b2262b8219c39b65e45be + _gitsha256='2eac6062b3589700b0d0e37c601f5bff4ad49dc59847be5950777d7e5a09685c' +fi arch=('i686' 'x86_64') url="http://octopiproject.wordpress.com" license=('GPL2') @@ -17,48 +24,64 @@ optdepends=('xfce4-notifyd: for notifications in XFCE') provides=('octopi-notifier') conflicts=('octopi-notifier-frameworks') -if [ "${_gitcommit}" != "" ]; then +if [[ ${USE_DEV} == '1' ]]; then source=("octopi-${pkgver}-${pkgrel}.tar.gz::https://github.com/aarnt/octopi/archive/${_gitcommit}.tar.gz") + sha256sums=(${_gitsha256}) else source=("octopi-${pkgver}.tar.gz::https://github.com/aarnt/octopi/archive/v${pkgver}.tar.gz") + sha256sums=('f6c7fe6bbcc26a79b1e455a42a8dc906bee4edd1b386b4f76178f006f4d7f822') fi -sha256sums=('2eac6062b3589700b0d0e37c601f5bff4ad49dc59847be5950777d7e5a09685c') - prepare() { - if [ ! -z ${_gitcommit} ]; then + if [[ ${USE_DEV} == '1' ]]; then cd "${srcdir}/${pkggit}-${_gitcommit}" + + # set version + sed -i -e "s|0.10.0 (dev)|${pkgver}-${pkgrel} (git-${_gitcommit:0:6})|g" src/strconstants.cpp else cd "${srcdir}/${pkggit}-${pkgver}" fi - - # set version - sed -i -e "s|0.10.0 (dev)|${pkgver}-${pkgrel} (git-${_gitcommit:0:6})|g" src/strconstants.cpp } build() { cpucount=$(grep -c processor /proc/cpuinfo 2>/dev/null) cpucount=$((${cpucount:-1})) - if [ ! -z ${_gitcommit} ]; then + if [[ ${USE_DEV} == '1' ]]; then cd "${srcdir}/${pkggit}-${_gitcommit}" + + msg "Building octopi-notifier..." + cd notifier + qmake-qt5 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" octopi-notifier.pro -spec linux-clang + make -j $cpucount else cd "${srcdir}/${pkggit}-${pkgver}" + + msg "Building octopi-pacmanhelper..." + cd notifier/pacmanhelper + qmake-qt5 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" pacmanhelper.pro -spec linux-clang + make -j $cpucount + + msg "Building octopi-notifier..." + cd ../octopi-notifier + qmake-qt5 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" octopi-notifier.pro -spec linux-clang + make -j $cpucount fi - - cd notifier - msg "Building octopi-notifier..." - qmake-qt5 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" octopi-notifier.pro -spec linux-clang - make -j $cpucount } package() { - if [ ! -z ${_gitcommit} ]; then + if [[ ${USE_DEV} == '1' ]]; then cd "${srcdir}/${pkggit}-${_gitcommit}" + + cd notifier + make INSTALL_ROOT="${pkgdir}" install else cd "${srcdir}/${pkggit}-${pkgver}" + + cd notifier/pacmanhelper + make INSTALL_ROOT="${pkgdir}" install + + cd ../octopi-notifier + make INSTALL_ROOT="${pkgdir}" install fi - - cd notifier - make INSTALL_ROOT="${pkgdir}" install } |