makedeb


dolphin-root 23.04.2-3


KDE File Manager, patched to be able to run as root

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for dolphin-root.

# Maintainer: huakim-tyk <zuhhaga@gmail.com>
# Contributor: Nafis <mnabid.25@outlook.com>
# Contributor: Shayne Hartford <shayneehartford@gmail.com>
# Contributor: David P. <megver83@parabola.nu>
# Contributor: Antonio Rojas <arojas@archlinux,org>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>

pkgname=(
'dolphin-root'
'dolphin-dev'
'libdolphinvcs-dev'
'libdolphinvcs5'
) 
pkgbase=dolphin-root
_pkgname=dolphin
pkgver=23.04.2
pkgrel=3
pkgdesc='KDE File Manager, patched to be able to run as root'
arch=(any)
url='https://apps.kde.org/dolphin/'
license=(LGPL)

copy(){
    set -o noglob 
    echo "${1}"
    echo "${2}"
    sed -n '/^[[:space:]]*#/!p' | while read line; do
        line1=($line)
        src=${line1[0]}
        dest=${line1[1]}
        line1=($(set +o noglob; cd "${1}"; eval echo "${src}"))
        if [ -z $dest ]; then
            for i in "${line1[@]}"; do
                mkdir -pv "$(dirname ${2}/${i})"
                cp -RTfvp "${1}/${i}" "${2}/${i}" 
            done
        else 
            mkdir -pv "${2}/${dest}"
            for i in "${line1[@]}"; do
                cp -RTfvp "${1}/${i}" "${2}/${dest}/$(basename ${i})" 
            done 
        fi
    done;
}


makedepends=(
'shlibdeps-resolve'
'baloo-kf5-dev'
'cmake'
'c++-compiler'
'coreutils'
'debhelper-compat'
'dh-sequence-kf5'
'dh-sequence-pkgkde-symbolshelper'
'extra-cmake-modules'
'gettext'
'kinit-dev'
'kuserfeedback-dev'
'libkf5activities-dev'
'libkf5baloowidgets-dev'
'libkf5bookmarks-dev'
'libkf5completion-dev'
'libkf5config-dev'
'libkf5coreaddons-dev'
'libkf5crash-dev'
'libkf5dbusaddons-dev'
'libkf5doctools-dev'
'libqt5x11extras5-dev'
'libkf5filemetadata-dev'
'libkf5i18n-dev'
'libkf5iconthemes-dev'
'libkf5kcmutils-dev'
'libkf5kio-dev'
'libkf5newstuff-dev'
'libkf5notifications-dev'
'libkf5parts-dev'
'libkf5solid-dev'
'libkf5textwidgets-dev'
'libkf5widgetsaddons-dev'
'libkf5windowsystem-dev'
'libpackagekitqt5-dev'
'libphonon4qt5-dev'
'libphonon4qt5experimental-dev'
'pkg-config'
'pkg-kde-tools'
'qtbase5-dev'
)

optdepends=('kde-cli-tools: for editing file type options' 'ffmpegthumbs: video thumbnails' 'kdegraphics-thumbnailers: PDF and PS thumbnails'
            'konsole: terminal panel' 'purpose: share context menu')

groups=(kde-applications kde-system)
source=(git+https://github.com/KDE/dolphin.git
        '0001-Defuse-root-block.patch')
sha256sums=(
            'SKIP'
            '1b372599571e6c3a3a927781e32775ec6254801e287d1d3eac2c26acecffaf44'
)
#            '00654a86c84389b35a12f5e20c215b06229c4cc378ca6cbf8aeae154259d47c8')
#validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid@kde.org>
#              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87  # Christoph Feck <cfeck@kde.org>
#              D81C0CB38EB725EF6691C385BB463350D6EF31EF) # Heiko Becker <heiko.becker@kde.org>

prepare() {
  # root shall be allowed once again
  patch -d $_pkgname -Np1 -t -i "${srcdir}/0001-Defuse-root-block.patch" || :
}

pkgver(){
    cd "${srcdir}/dolphin"
    ver="$(git describe --tags $(git rev-list --tags --max-count=1))"
    echo ${ver:1} 
}

build() {
  cmake -B build -S $_pkgname \
    -DBUILD_TESTING=OFF
  cmake --build build
  DESTDIR="${srcdir}/library" cmake --install build
}



package_dolphin-root(){
    pkgdesc="file manager
 Dolphin is the default file manager in the Plasma, intended
 to be both powerful and easy to use.

 Features include:
   Customisable sidebars
   \"Breadcrumb\" navigation
   View properties remembered for each folder
   Split views
   Network transparency
   Undo/redo functionality
   Ratings, comments, and tags"
   
   echo "usr/bin/dolphin
usr/bin/servicemenuinstaller
usr/lib/*/libdolphinprivate.so.*
usr/lib/*/qt5/plugins/dolphin/kcms/kcm_dolphingeneral.so
usr/lib/*/qt5/plugins/dolphin/kcms/kcm_dolphinnavigation.so
usr/lib/*/qt5/plugins/dolphin/kcms/kcm_dolphinviewmodes.so
usr/lib/*/qt5/plugins/kf5/parts/dolphinpart.so
usr/lib/systemd/user/plasma-dolphin.service
usr/share/applications/org.kde.dolphin.desktop
usr/share/config.kcfg/
usr/share/dbus-1/services/org.kde.dolphin.FileManager1.service
usr/share/doc/
usr/share/dolphin/dolphinpartactions.desktop
usr/share/kconf_update/dolphin_detailsmodesettings.upd
usr/share/kglobalaccel/org.kde.dolphin.desktop
usr/share/knsrcfiles/servicemenu.knsrc
usr/share/locale/
usr/share/metainfo/org.kde.dolphin.appdata.xml
usr/share/qlogging-categories5/" | copy "${srcdir}/library" "${pkgdir}"
   depends=($(shlibdeps-resolve -b ${pkgdir}/usr/bin/ -b ${pkgdir}/usr/lib/ -r "${srcdir}/library") libdolphinvcs5)

provides=('dolphin')
conflicts=('dolphin')

}
package_dolphin-dev(){
    multiarch=same
    pkgdesc="file manager - development files
Contains DBus interface XML files to access dolphin via the DBus
org.freedesktop.FileManager1 interface."

    echo "usr/share/dbus-1/interfaces/org.freedesktop.FileManager1.xml" \
    | copy "${srcdir}/library" "${pkgdir}"
}
package_libdolphinvcs-dev(){
    multiarch=same
    pkgdesc="library to show version control in Dolphin - development files
This library enables developers to expand Dolphin with the ability to show
version control status in directories that are version controlled.

This package contains the development files."

echo "usr/include/Dolphin/KVersionControlPlugin
usr/include/Dolphin/dolphinvcs_version.h
usr/include/Dolphin/kversioncontrolplugin.h
usr/include/dolphin_export.h
usr/include/dolphinvcs_export.h
usr/lib/*/cmake/DolphinVcs/DolphinVcsConfig.cmake
usr/lib/*/cmake/DolphinVcs/DolphinVcsConfigVersion.cmake
usr/lib/*/cmake/DolphinVcs/DolphinVcsTargets.cmake
usr/lib/*/libdolphinvcs.so" | copy "${srcdir}/library" "${pkgdir}"
    depends=('libdolphinvcs5' 'libkf5kio-dev' 'qtbase5-dev')

}
package_libdolphinvcs5(){
    multiarch=same
    pkgdesc="library to show version control in Dolphin
This library enables developers to expand Dolphin with the ability to show
version control status in directories that are version controlled."

   
   echo "usr/lib/*/libdolphinvcs.so.5
usr/lib/*/libdolphinvcs.so.5.*" \
   | copy "${srcdir}/library" "${pkgdir}"
   depends=($(shlibdeps-resolve -b ${pkgdir}/usr/lib/ -r "${srcdir}/library") )
}