summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMusikolo2018-07-07 20:10:01 -0500
committerMusikolo2018-07-07 20:10:01 -0500
commit19568988ef0ff759104d8ad8b0973d2be4f72229 (patch)
tree8ff7c779c8f61280c7c5f686749d18e8d524af65
parent141f311bb84a1006a18e7a9c681a6e4b176b5365 (diff)
downloadaur-19568988ef0ff759104d8ad8b0973d2be4f72229.tar.gz
Add support for KDE5 service menus. Not fully functional now though
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD38
2 files changed, 41 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e24e0f34fcb..e398d407c99 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Wed Jun 20 02:34:27 UTC 2018
+# Sun Jul 8 01:05:15 UTC 2018
pkgbase = bcompare
pkgver = 4.2.5.23088
- pkgrel = 1
+ pkgrel = 2
url = http://www.scootersoftware.com
arch = i686
arch = x86_64
@@ -32,10 +32,16 @@ pkgname = bcompare
optdepends = bcompare-cinnamon: Cinnamon service menus for Beyond Compare 4
optdepends = bcompare-mate: MATE service menus for Beyond Compare 4
-pkgname = bcompare-kde
- pkgdesc = KDE service menus for Beyond Compare 4
+pkgname = bcompare-kde5
+ pkgdesc = KDE5 service menus for Beyond Compare 4
depends = bcompare
+pkgname = bcompare-kde4
+ pkgdesc = KDE4 service menus for Beyond Compare 4
+ depends = bcompare
+ conflicts = bcompare-kde
+ replaces = bcompare-kde
+
pkgname = bcompare-nautilus
pkgdesc = Gnome service menus for Beyond Compare 4
depends = bcompare
diff --git a/PKGBUILD b/PKGBUILD
index 07aab794b48..bd427387ffd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,9 +11,9 @@
# - http://www.scootersoftware.com/vbulletin/showpost.php?s=3c1f289bc76655230b49f440dbe17b53&p=26449&postcount=7
pkgbase=bcompare
-pkgname=('bcompare' 'bcompare-kde' 'bcompare-nautilus' 'bcompare-thunar' 'bcompare-cinnamon' 'bcompare-mate')
+pkgname=('bcompare' 'bcompare-kde5' 'bcompare-kde4' 'bcompare-nautilus' 'bcompare-thunar' 'bcompare-cinnamon' 'bcompare-mate')
pkgver=4.2.5.23088
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url='http://www.scootersoftware.com'
license=('custom')
@@ -34,7 +34,11 @@ options=('!strip') # Do not strip binaries because it breaks them down
mkdir -p "${_install_dir}/usr/share/mime/packages"
mkdir -p "${_install_dir}/usr/share/pixmaps"
- # Set up KDE service menus
+ # Set up KDE5 service menus
+ mkdir -p "${_install_dir}/usr/lib/x86_64-linux-gnu/qt5/plugins/"
+ mkdir -p "${_install_dir}/usr/share/kservices5/"
+
+ # Set up KDE4 service menus
mkdir -p "${_install_dir}/usr/lib/kde4"
mkdir -p "${_install_dir}/usr/share/kde4/services"
@@ -76,14 +80,16 @@ package_bcompare() {
cd "${pkgdir}"
if [ -d usr/lib ]; then
mv usr/lib/* lib
- fi
+ fi
mv bin lib usr/
# Fix wrong paths
sed -i "s|"${_install_dir}"|/usr|g" usr/bin/bcompare
# Remove KDE, Gnome and Xfce files
+ rm -rf "${pkgdir}/usr/share/kservices5"
rm -rf "${pkgdir}/usr/share/kde4"
+ rm -rf "${pkgdir}/usr/lib/x86_64-linux-gnu"
rm -rf "${pkgdir}/usr/lib/kde4"
rm -rf "${pkgdir}/usr/lib/nautilus"
rm -rf "${pkgdir}/usr/lib/thunarx-2"
@@ -107,11 +113,29 @@ package_bcompare() {
popd > /dev/null
}
-package_bcompare-kde() {
- pkgdesc="KDE service menus for Beyond Compare 4"
+package_bcompare-kde5() {
+ pkgdesc="KDE5 service menus for Beyond Compare 4"
+ depends=('bcompare')
+
+ msg2 "Packaging KDE5 service menus..."
+ _install_dir="${srcdir}/install"
+ # Set up service menus
+ mkdir -p "${pkgdir}/usr/lib"
+ mv "${_install_dir}/usr/lib/x86_64-linux-gnu" "${pkgdir}/usr/lib/"
+
+ find "${_install_dir}/usr/share/kservices5" -type f -exec chmod -x '{}' ';'
+ mkdir -p "${pkgdir}/usr/share"
+ mv "${_install_dir}/usr/share/kservices5" "${pkgdir}/usr/share"
+ msg2 "Done!"
+}
+
+package_bcompare-kde4() {
+ pkgdesc="KDE4 service menus for Beyond Compare 4"
depends=('bcompare')
+ replaces=('bcompare-kde')
+ conflicts=('bcompare-kde')
- msg2 "Packaging KDE service menus..."
+ msg2 "Packaging KDE4 service menus..."
_install_dir="${srcdir}/install"
# Set up service menus
mkdir -p "${pkgdir}/usr/lib"