summaryrefslogtreecommitdiff
path: root/repo/shared-mime-info
diff options
context:
space:
mode:
Diffstat (limited to 'repo/shared-mime-info')
-rw-r--r--repo/shared-mime-info/shared-mime-info.post-deinstall10
-rw-r--r--repo/shared-mime-info/shared-mime-info.trigger7
-rw-r--r--repo/shared-mime-info/shared-mime-info.xibuild30
3 files changed, 27 insertions, 20 deletions
diff --git a/repo/shared-mime-info/shared-mime-info.post-deinstall b/repo/shared-mime-info/shared-mime-info.post-deinstall
new file mode 100644
index 0000000..6c31729
--- /dev/null
+++ b/repo/shared-mime-info/shared-mime-info.post-deinstall
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cd /usr/share/mime
+rm -rf globs globs2 icons treemagic generic-icons types magic XMLnamespaces \
+ subclasses aliases mime.cache \
+ application audio image inode message model multipart text video \
+ x-content x-epoc
+rmdir /usr/share/mime 2>/dev/null
+
+exit 0
diff --git a/repo/shared-mime-info/shared-mime-info.trigger b/repo/shared-mime-info/shared-mime-info.trigger
new file mode 100644
index 0000000..51a3e49
--- /dev/null
+++ b/repo/shared-mime-info/shared-mime-info.trigger
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for i in "$@"; do
+ if [ -d "$i" ]; then
+ update-mime-database "$i" > /dev/null 2>&1
+ fi
+done
diff --git a/repo/shared-mime-info/shared-mime-info.xibuild b/repo/shared-mime-info/shared-mime-info.xibuild
index a91f826..221067b 100644
--- a/repo/shared-mime-info/shared-mime-info.xibuild
+++ b/repo/shared-mime-info/shared-mime-info.xibuild
@@ -3,32 +3,22 @@
NAME="shared-mime-info"
DESC="Freedesktop.org Shared MIME Info"
-MAKEDEPS="meson ninja itstool xmlto libxml2 glib"
-DEPS="toybox glib libxml2 musl pkg-config "
+MAKEDEPS="meson itstool xmlto libxml2 glib"
PKG_VER=2.2
SOURCE="https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/$PKG_VER/shared-mime-info-$PKG_VER.tar.gz"
-ADDITIONAL="
- https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/shared-mime-info/trunk/MR_162.patch
-"
-prepare () {
- patch -Rp1 -i MR_162.patch
+build() {
+ meson --prefix=/usr \
+ -Dupdate-mimedb=false \
+ . output
+ meson compile ${JOBS:+-j ${JOBS}} -C output
}
-build () {
- mkdir build &&
- cd build &&
- meson --prefix=/usr \
- -Dupdate-mimedb=false \
- .. &&
- ninja
+check() {
+ meson test --no-rebuild --print-errorlogs -C output
}
-package () {
- DESTDIR=$PKG_DEST ninja install
-}
-
-postinstall () {
- update-mime-database /usr/share/mime
+package() {
+ DESTDIR="$PKG_DEST" meson install --no-rebuild -C output
}