desktop/octopi/PKGBUILD
Chaoting Liu cabab9e7dd [failed to build] octopi: update to latest commit
- remove qtermwidget depends in source code
- failed due to alpm_option_add_hookdir() not avalible (pacman5 required)
- check the build log
2018-02-11 18:08:52 +00:00

94 lines
3.5 KiB
Bash

pkgbase=octopi
pkgname=('octopi' 'octopi-notifier')
pkgver=0.8.1.90
pkgrel=3
url="https://octopiproject.wordpress.com/"
arch=('x86_64')
license=('GPL2')
depends=('pacman' 'pacmanlogviewer' 'gist' 'qt5-quickcontrols' 'chaser' 'alpm_octopi_utils')
categories=('system')
screenshot=('http://octopiproject.files.wordpress.com/2014/01/octopi_in_kaos.png')
gitsha=52e111f
source=("$pkgname"::"git://github.com/aarnt/${pkgname}.git#commit=${gitsha}"
'0001-remove-qtermwidget.patch')
md5sums=('SKIP' 'SKIP')
prepare(){
cd "${srcdir}/${pkgbase}"
# patch .desktop files
sed -i 's/Categories=GNOME;GTK;System;/Categories=System;Tools;/g' octopi.desktop notifier/octopi-notifier/octopi-notifier.desktop cachecleaner/octopi-cachecleaner.desktop
sed -i 's/\/\/#define NO_GTK_STYLE/#define NO_GTK_STYLE/g' src/main.cpp notifier/octopi-notifier/main.cpp
sed -i 's/Icon=octopi/Icon=octopi-notifier/g' notifier/octopi-notifier/octopi-notifier.desktop
# enable the kstatus switch
sed -e "s|DEFINES += ALPM_BACKEND #KSTATUS|DEFINES += ALPM_BACKEND KSTATUS|" -i notifier/octopi-notifier/octopi-notifier.pro
# disable lxqt qtermwidget
patch -Np1 -i ../0001-remove-qtermwidget.patch
}
build() {
cd "${srcdir}/${pkgbase}"
/usr/lib/qt5/bin/qmake
QTERMWIDGET=off make
pushd "notifier/pacmanhelper"
qmake-qt5 pacmanhelper.pro
make
popd
pushd "notifier/octopi-notifier"
qmake-qt5 octopi-notifier.pro
make
popd
pushd "repoeditor"
qmake-qt5 octopi-repoeditor.pro
make
popd
pushd "cachecleaner"
qmake-qt5 octopi-cachecleaner.pro
make
popd
}
package_octopi() {
pkgdesc="Octopi, a powerful Pacman frontend using Qt libs"
depends+=('qt5-declarative' 'knotifications')
# start package
cd ${srcdir}/${pkgbase}
install -Dm 755 bin/octopi ${pkgdir}/usr/bin/octopi
install -Dm 755 repoeditor/bin/octopi-repoeditor ${pkgdir}/usr/bin/octopi-repoeditor
install -Dm 644 octopi.desktop ${pkgdir}/usr/share/applications/octopi.desktop
install -Dm 644 resources/images/octopi_green.png ${pkgdir}/usr/share/icons/octopi.png
install -Dm 644 speedup/octopi.service ${pkgdir}/usr/lib/systemd/system/
#Octopi-cachecleaner file
install -Dm 755 cachecleaner/bin/octopi-cachecleaner ${pkgdir}/usr/bin/octopi-cachecleaner
install -Dm 644 cachecleaner/octopi-cachecleaner.desktop ${pkgdir}/usr/share/applications/octopi-cachecleaner.desktop
}
package_octopi-notifier() {
pkgdesc="Octopi system tray notification"
depends+=('qt5-declarative')
# main application
cd "${srcdir}/${pkgbase}"
install -Dm755 notifier/bin/octopi-notifier ${pkgdir}/usr/bin/${pkgname}
install -Dm644 octopi-notifier.desktop ${pkgdir}/usr/share/applications/octopi-notifier.desktop
install -Dm644 resources/images/octopi_red.png ${pkgdir}/usr/share/icons/${pkgname}.png
#Pacmanhelper service files
install -Dm755 notifier/bin/pacmanhelper ${pkgdir}/usr/lib/octopi/pacmanhelper
install -Dm644 notifier/pacmanhelper/polkit/org.octopi.pacman.policy ${pkgdir}/usr/share/polkit-1/actions/org.octopi.pacman.policy
install -Dm644 notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.conf ${pkgdir}/etc/dbus-1/system.d/org.octopi.pacmanhelper.conf
install -Dm644 notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.xml ${pkgdir}/usr/share/dbus-1/interfaces/org.octopi.pacmanhelper.xml
install -Dm644 notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.service ${pkgdir}/usr/share/dbus-1/system-services/org.octopi.pacmanhelper.service
}