shared-mime-info 2.4-1
This commit is contained in:
commit
956719897a
45
PKGBUILD
Normal file
45
PKGBUILD
Normal file
@ -0,0 +1,45 @@
|
||||
# This is an example PKGBUILD file. Use this as a start to creating your own,
|
||||
# and remove these comments. For more information, see 'man PKGBUILD'.
|
||||
# NOTE: Please fill out the license field for your package! If it is unknown,
|
||||
# then please put 'unknown'.
|
||||
|
||||
# Maintainer: Future Linux Team <future_linux@163.com>
|
||||
pkgname=shared-mime-info
|
||||
pkgver=2.4
|
||||
pkgrel=1
|
||||
pkgdesc="Freedesktop.org Shared MIME Info"
|
||||
arch=('x86_64')
|
||||
url="https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/"
|
||||
license=('GPL2')
|
||||
depends=('libxml2' 'glib2' 'glibc' 'gcc-libs')
|
||||
makedepends=('gettext' 'xmlto' 'docbook-xsl' 'meson')
|
||||
options=('!makeflags')
|
||||
install=${pkgname}.install
|
||||
source=(https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
|
||||
https://anduin.linuxfromscratch.org/BLFS/xdgmime/xdgmime.tar.xz
|
||||
update-mime-database.hook)
|
||||
sha256sums=(531291d0387eb94e16e775d7e73788d06d2b2fdd8cd2ac6b6b15287593b6a2de
|
||||
9020f04a0bb841e3cd9c6c5f60a75087eb21def5b17a651ee53f99524873cb18
|
||||
f08efbcbac9d2bd18a805b8dcf3ed06d7763b97eca5935aa64d65593774b6501)
|
||||
|
||||
build() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
CFLAGS= make -C ${srcdir}/xdgmime
|
||||
|
||||
meson setup build \
|
||||
--prefix=/usr \
|
||||
--buildtype=release \
|
||||
-Dupdate-mimedb=false \
|
||||
-Dxdgmime-path=${srcdir}/xdgmime
|
||||
|
||||
meson compile -C build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
meson install -C build --destdir ${pkgdir}
|
||||
|
||||
install -Dm644 ${srcdir}/update-mime-database.hook ${pkgdir}/usr/share/libalpm/hooks/30-update-mime-database.hook
|
||||
}
|
7
shared-mime-info.install
Normal file
7
shared-mime-info.install
Normal file
@ -0,0 +1,7 @@
|
||||
post_remove() {
|
||||
if [ -d usr/share/mime ]; then
|
||||
rm -f usr/share/mime/{globs,globs2,icons,treemagic,generic-icons,types,magic,XMLnamespaces,subclasses,aliases,mime.cache}
|
||||
rm -rf usr/share/mime/{application,audio,image,inode,message,model,multipart,text,video,x-content,x-epoc}
|
||||
rmdir --ignore-fail-on-non-empty usr/share/mime
|
||||
fi
|
||||
}
|
11
update-mime-database.hook
Normal file
11
update-mime-database.hook
Normal file
@ -0,0 +1,11 @@
|
||||
[Trigger]
|
||||
Type = Path
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Operation = Remove
|
||||
Target = usr/share/mime/packages/*.xml
|
||||
|
||||
[Action]
|
||||
Description = Updating the MIME type database...
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/env PKGSYSTEM_ENABLE_FSYNC=0 /usr/bin/update-mime-database /usr/share/mime
|
Loading…
Reference in New Issue
Block a user