Split package and add BPM hooks
This commit is contained in:
@@ -1,9 +1,16 @@
|
|||||||
name: gtk4
|
name: gtk4
|
||||||
description: GObject-based multi-platform GUI toolkit version 4
|
description: GObject-based multi-platform GUI toolkit version 4
|
||||||
version: 4.16.12
|
version: 4.16.12
|
||||||
|
revision: 2
|
||||||
url: https://www.gtk.org/
|
url: https://www.gtk.org/
|
||||||
license: LGPL2.1-or-later
|
license: LGPL2.1-or-later
|
||||||
architecture: any
|
architecture: any
|
||||||
depends: ["adwaita-icon-theme","at-spi2-core","cairo","cups","desktop-file-utils","fontconfig","fribidi","gcc","gdk-pixbuf","glib","glibc","graphene","gstreamer","gst-plugins-bad","gst-plugins-base","harfbuzz","iso-codes","libepoxy","libglvnd","libjpeg-turbo","libpng","librsvg","libtiff","libx11","libxcursor","libxdamage","libxext","libxfixes","libxi","libxinerama","libxkbcommon","libxrandr","libxrender","pango","shared-mime-info","vulkan-loader","wayland"]
|
depends: ["adwaita-icon-theme","at-spi2-core","cairo","cups","desktop-file-utils","fontconfig","fribidi","gcc","gdk-pixbuf","glib","glibc","graphene","gstreamer","gst-plugins-bad","gst-plugins-base","harfbuzz","iso-codes","libepoxy","libglvnd","libjpeg-turbo","libpng","librsvg","libtiff","libx11","libxcursor","libxdamage","libxext","libxfixes","libxi","libxinerama","libxkbcommon","libxrandr","libxrender","pango","shared-mime-info","vulkan-loader","wayland"]
|
||||||
make_depends: ["docbook-xsl-nons","gobject-introspection","hicolor-icon-theme","meson","python-pygobject","sassc","shaderc","vulkan-headers","wayland-protocols"]
|
make_depends: ["docbook-xsl-nons","gobject-introspection","hicolor-icon-theme","meson","python-pygobject","sassc","shaderc","vulkan-headers","wayland-protocols"]
|
||||||
type: source
|
type: source
|
||||||
|
split_packages:
|
||||||
|
- name: gtk4
|
||||||
|
depends: ["adwaita-icon-theme","at-spi2-core","cairo","cups","desktop-file-utils","fontconfig","fribidi","gcc","gdk-pixbuf","glib","glibc","graphene","gstreamer","gst-plugins-bad","gst-plugins-base","gtk-update-icon-cache","harfbuzz","iso-codes","libepoxy","libglvnd","libjpeg-turbo","libpng","librsvg","libtiff","libx11","libxcursor","libxdamage","libxext","libxfixes","libxi","libxinerama","libxkbcommon","libxrandr","libxrender","pango","shared-mime-info","vulkan-loader","wayland"]
|
||||||
|
- name: gtk-update-icon-cache
|
||||||
|
description: The gtk-update-icon-cache binary
|
||||||
|
depends: ["gdk-pixbuf","glib","glibc","hicolor-icon-theme","librsvg"]
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
trigger_operations: ["install", "upgrade"]
|
||||||
|
target_type: "path"
|
||||||
|
targets: ["usr/share/icons/*/"]
|
||||||
|
depends: ["gtk-update-icon-cache"]
|
||||||
|
run: "/var/lib/bpm/hook-scripts/gtk-update-icon-cache.sh"
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
for icons in /usr/share/icons/*; do
|
||||||
|
if [ -e "$icons"/index.theme ]; then
|
||||||
|
gtk-update-icon-cache -q -f "$icons"
|
||||||
|
fi
|
||||||
|
done
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
trigger_operations: ["install", "upgrade"]
|
||||||
|
target_type: "path"
|
||||||
|
targets: ["usr/lib/gtk-4.0/4.0.0/*/"]
|
||||||
|
depends: ["gtk4","glib"]
|
||||||
|
run: "/var/lib/bpm/hook-scripts/gtk4-querymodules.sh"
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
for dir in /usr/lib/gtk-4.0/4.0.0/*/; do
|
||||||
|
[ -d "$dir" ] || continue
|
||||||
|
gio-querymodules "$dir"
|
||||||
|
done
|
||||||
@@ -29,10 +29,35 @@ build() {
|
|||||||
|
|
||||||
# The package function is executed in the source directory
|
# The package function is executed in the source directory
|
||||||
# This function is used to move the compiled files into the output directory
|
# This function is used to move the compiled files into the output directory
|
||||||
package() {
|
package_gtk4() {
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
meson install --destdir="$BPM_OUTPUT"
|
meson install --destdir="$BPM_OUTPUT"
|
||||||
|
|
||||||
|
# Move gtk-update-icon-cache to temporary directory for gtk-update-icon-cache package
|
||||||
|
mkdir "$BPM_WORKDIR"/output-gtk-update-icon-cache
|
||||||
|
install -d "$BPM_WORKDIR"/output-gtk-update-icon-cache/usr/{bin,share/man/man1}
|
||||||
|
mv "$BPM_OUTPUT"/usr/bin/gtk4-update-icon-cache -t "$BPM_WORKDIR"/output-gtk-update-icon-cache/usr/bin/
|
||||||
|
|
||||||
|
# Install BPM hook and script
|
||||||
|
install -Dm644 "$BPM_WORKDIR"/gtk4-querymodules.bpmhook "$BPM_OUTPUT"/var/lib/bpm/hooks/gtk4-querymodules.bpmhook
|
||||||
|
install -Dm755 "$BPM_WORKDIR"/gtk4-querymodules.sh "$BPM_OUTPUT"/var/lib/bpm/hook-scripts/gtk4-querymodules.sh
|
||||||
|
|
||||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/gtk3/COPYING
|
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/gtk3/COPYING
|
||||||
}
|
}
|
||||||
|
|
||||||
|
package_gtk-update-icon-cache() {
|
||||||
|
# Replace 'output' directory with 'output-gtk-update-icon-cache'
|
||||||
|
rmdir "$BPM_OUTPUT"
|
||||||
|
mv "$BPM_WORKDIR"/output-gtk-update-icon-cache "$BPM_OUTPUT"
|
||||||
|
|
||||||
|
# Symlink 'gtk-update-icon-cache' to 'gtk4-update-icon-cache'
|
||||||
|
ln -s gtk4-update-icon-cache "$BPM_OUTPUT"/usr/bin/gtk-update-icon-cache
|
||||||
|
|
||||||
|
# Install BPM hook and script
|
||||||
|
install -Dm644 "$BPM_WORKDIR"/gtk-update-icon-cache.bpmhook "$BPM_OUTPUT"/var/lib/bpm/hooks/gtk-update-icon-cache.bpmhook
|
||||||
|
install -Dm755 "$BPM_WORKDIR"/gtk-update-icon-cache.sh "$BPM_OUTPUT"/var/lib/bpm/hook-scripts/gtk-update-icon-cache.sh
|
||||||
|
|
||||||
|
# Install package license
|
||||||
|
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/gtk-update-icon-cache/COPYING
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user