PKGBUILD 1.02 KB
Newer Older
gnastyle's avatar
gnastyle committed
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
pkgname=plasma5-applets-rssnow
pkgver=1.0.r29.46e7e43
pkgrel=1
pkgdesc="Show news from various sources"
arch=('x86_64')
url="https://github.com/Misenko/rssnow-plasma5-applet"
license=('GPL')
depends=('plasma-workspace')
makedepends=('cmake' 'git' 'extra-cmake-modules')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=(${pkgname}::git+https://github.com/Misenko/rssnow-plasma5-applet.git)
sha1sums=('SKIP')

pkgver() {
        cd "$srcdir/${pkgname}"
        printf "%s.r%s.%s"  "$(sed -n "s/^X-KDE-PluginInfo-Version=\(.*\)$/\1/p" plasmoid/metadata.desktop)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
        cd "$srcdir/${pkgname}"
        rm -rf build
        mkdir -p build
}

build() {
        cd "$srcdir/${pkgname}/build"
        
        export QT_SELECT=5
        cmake .. \
          -DCMAKE_INSTALL_PREFIX=$(kf5-config --prefix) \
          -DCMAKE_BUILD_TYPE=Release
        make
}

package() {
        cd "$srcdir/${pkgname}/build"
        make DESTDIR="${pkgdir}/" install
}