pkgname=octopi pkgver=0.16.2 pkgrel=1 _commit=dcc00671ee5cfc6373871dec2a325eccd53e9329 pkgdesc="This is Octopi, a powerful Pacman frontend using Qt libs" url="https://tintaescura.com/projects/octopi/" arch=('x86_64') license=('GPL2') depends=('pacman' 'pacman-contrib' 'pkgfile' 'alpm_octopi_utils' 'qtermwidget-qt6' 'qt-sudo' 'knotifications6' 'kstatusnotifieritem' 'kconfig6') makedepends=('qt6-tools' 'cmake') replaces=('octopi6') groups=('system') source=("https://github.com/aarnt/octopi/archive/${_commit}.zip" "images3.tar.xz" 'folder_tree.png' 'qtsingleapplication.diff' 'mainwindow.diff') md5sums=('64eca61b595b4de8ab825c521f6e2d1b' '09decb09a2fa58f2211ff3d5e0350ff0' 'eff9d31629ad8de08c9198524f798bd3' 'b40bc05a359372ff4277e776e15211f6' 'fea73aca460daf0d3cdeefa2875182a9') prepare() { cd ${pkgname}-${_commit}/ rm -r resources/images mv -iv ${srcdir}/images/ resources/ cp resources/images/octopi_green.png resources/images/octopi.png cp ${srcdir}/folder_tree.png resources/images/folder_tree.png # enable the kstatus switch #sed -e "s|KF6Notifications QUIET|KF6StatusNotifierItem REQUIRED|" -i notifier/CMakeLists.txt #sed -e "s|KF6::Notifications|KF6::Notifications KF6::StatusNotifierItem|" -i notifier/CMakeLists.txt sed -e "s|gui network|gui network dbus|" -i notifier/octopi-notifier.pro sed -e "s|pacman -U --force|pacman -U|" -i src/pacmanexec.cpp # show correct text for SysInfo window sed -e "s|mhwd -li -d|installation.log|" -i src/strconstants.cpp sed -e "s|head --bytes=256K /var/log/pacman.log|/var/log/pacman.log|" -i src/strconstants.cpp sed -e "s|/usr/local/bin/qt-sudo|/usr/bin/qt-sudo|" -i src/constants.h patch -p1 -i ${srcdir}/qtsingleapplication.diff patch -p1 -i ${srcdir}/mainwindow.diff } build() { cmake -B build -S ${pkgname}-${_commit} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DUSE_QTERMWIDGET6=ON \ -DUSE_KF6NOTIFICATIONS=ON cmake --build build } package() { DESTDIR=${pkgdir} cmake --install build }