summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Alff2019-06-02 21:46:03 -0400
committerTed Alff2019-06-02 21:46:03 -0400
commitf3f57d6a06cf5b96655e6e24abb37c7afb9bb5a7 (patch)
treee8cfaee92fd100a6077104080a763d445932202d
parent723c3703e2d572672f0f2665b870af73e975f459 (diff)
downloadaur-f3f57d6a06cf5b96655e6e24abb37c7afb9bb5a7.tar.gz
Move library incompatibility checks to a pacman hook
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD20
-rw-r--r--xfconf-warn.hook12
-rwxr-xr-xxfconf-warn.sh11
-rw-r--r--xfconf.install24
5 files changed, 42 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e9fe468532ac..7acfacd62dd8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,8 @@
pkgbase = xfconf-devel
pkgdesc = A simple client-server configuration storage and query system
pkgver = 4.13.7
- pkgrel = 2
+ pkgrel = 3
url = https://www.xfce.org/
- install = xfconf.install
arch = i686
arch = x86_64
groups = xfce4-devel
@@ -17,12 +16,15 @@ pkgbase = xfconf-devel
makedepends = python
depends = libxfce4util
depends = dbus
- optdepends = xfconf4.12: Legacy xfconf libraries
provides = xfconf=4.13.7
conflicts = xfconf
options = !emptydirs
source = https://archive.xfce.org/src/xfce/xfconf/4.13/xfconf-4.13.7.tar.bz2
+ source = xfconf-warn.sh
+ source = xfconf-warn.hook
sha256sums = 5deb13fc48a4116f5ebdee5c21d0fd3deb85bec2f69602beb3c3adb4f85e5bde
+ sha256sums = dffa297eb6ef0fbe56c37b7396186cb85e1dd6249d28e2fc0b8fc5254926bcb7
+ sha256sums = 0cfbfecb042dabe5a6e80ac96ce863db12e0c38a7cedb66e2bfbe9a5463469a7
pkgname = xfconf-devel
diff --git a/PKGBUILD b/PKGBUILD
index b72cedbadb2b..240066a64feb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_pkgname=xfconf
pkgname=${_pkgname}-devel
pkgver=4.13.7
-pkgrel=2
+pkgrel=3
pkgdesc="A simple client-server configuration storage and query system"
arch=('i686' 'x86_64')
url="https://www.xfce.org/"
@@ -12,13 +12,17 @@ groups=('xfce4-devel')
depends=('libxfce4util' 'dbus')
makedepends=('perl-extutils-depends' 'perl-extutils-pkgconfig' 'glib-perl'
'intltool' 'gtk-doc' 'chrpath' 'python') #for gdbus-codegen
-optdepends=('xfconf4.12: Legacy xfconf libraries')
+#optdepends=('xfconf4.12: Legacy xfconf libraries')
provides=("${_pkgname}=${pkgver}")
conflicts=("${_pkgname}")
options=('!emptydirs')
-source=(https://archive.xfce.org/src/xfce/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.bz2)
-sha256sums=('5deb13fc48a4116f5ebdee5c21d0fd3deb85bec2f69602beb3c3adb4f85e5bde')
-install='xfconf.install'
+source=("https://archive.xfce.org/src/xfce/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.bz2"
+ 'xfconf-warn.sh'
+ 'xfconf-warn.hook')
+sha256sums=('5deb13fc48a4116f5ebdee5c21d0fd3deb85bec2f69602beb3c3adb4f85e5bde'
+ 'dffa297eb6ef0fbe56c37b7396186cb85e1dd6249d28e2fc0b8fc5254926bcb7'
+ '0cfbfecb042dabe5a6e80ac96ce863db12e0c38a7cedb66e2bfbe9a5463469a7')
+#install='xfconf.install'
build() {
cd "$srcdir/$_pkgname-$pkgver"
@@ -42,6 +46,10 @@ package() {
make DESTDIR="$pkgdir" install
# fix insecure rpath, https://bugs.archlinux.org/task/19980
- find "$pkgdir" -name Xfconf.so -exec chrpath -d {} +
+ find "$pkgdir" -name Xfconf.so -exec chrpath -d {} \;
+
+ install -Dm755 "${srcdir}"/xfconf-warn.sh "${pkgdir}"/usr/bin/xfconf-warn
+
+ install -Dm644 "${srcdir}"/xfconf-warn.hook "${pkgdir}"/usr/share/libalpm/hooks/xfconf-warn.hook
}
diff --git a/xfconf-warn.hook b/xfconf-warn.hook
new file mode 100644
index 000000000000..7f2f025d5423
--- /dev/null
+++ b/xfconf-warn.hook
@@ -0,0 +1,12 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/xfce4/*
+Target = usr/include/xfce4/*
+
+[Action]
+Description = Warning on packages linked to xfconf 4.12.x...
+When = PostTransaction
+Exec = /usr/bin/xfconf-warn
diff --git a/xfconf-warn.sh b/xfconf-warn.sh
new file mode 100755
index 000000000000..07b5e597aae3
--- /dev/null
+++ b/xfconf-warn.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+printf "$(tput setaf 1)$(tput bold) ==> WARNING: $(tput sgr0)"
+echo "List of packages which are linked against legacy xfconf (4.12.x)"
+echo "Please rebuild manually."
+echo "pacman -Sb <package>"
+pkgs=( $( echo "`pacman -Qoq /usr/include/xfce4` `pacman -Qoq /usr/lib/xfce4`" | grep -v xfconf-devel | sort -u ) )
+for pkg in ${pkgs[@]} ; do
+ mapfile -t files < <(pacman -Qlq $pkg | grep -v /$)
+ grep -Fq 'libxfconf-0.so.2' "${files[@]}" <&- 2>/dev/null && echo " >> $pkg"
+done
diff --git a/xfconf.install b/xfconf.install
deleted file mode 100644
index 0517e71e3976..000000000000
--- a/xfconf.install
+++ /dev/null
@@ -1,24 +0,0 @@
-post_install() {
- printf "$(tput setaf 1)$(tput bold) ==> WARNING: $(tput sgr0)"
- echo "List of packages which are linked against legacy xfconf (4.12.x)"
- echo "Please rebuild manually."
- echo "pacman -Sb <package>"
- while read pkg; do
- mapfile -t files < <(pacman -Qlq $pkg | grep -v /$)
- grep -Fq 'libxfconf-0.so.2' "${files[@]}" <&- 2>/dev/null && echo " >> $pkg"
- done < <(pacman -Qq | grep -E '(^(xf|libxfce|garcon|tumbler|mousepad|orage|thunar)|xfce|xfwm)' )
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- printf "$(tput setaf 1)$(tput bold) ==> WARNING: $(tput sgr0)"
- echo "Packages linked against uninstalled version of xfconf:"
- echo "If you are reverting to xfconf 4.12.x reinstall or rebuild packages in this list"
- while read pkg; do
- mapfile -t files < <(pacman -Qlq $pkg | grep -v /$)
- grep -Fq 'libxfconf-0.so.3' "${files[@]}" <&- 2>/dev/null && echo " >> $pkg"
- done < <(pacman -Qq | grep -E '(^(xf|libxfce|garcon|tumbler|mousepad|orage|thunar)|xfce|xfwm)' )
-}