Split package and enable documentation

This commit is contained in:
2025-11-23 14:31:06 +02:00
parent 970cea042a
commit 247ffb0dd7
2 changed files with 37 additions and 5 deletions
+10 -3
View File
@@ -1,7 +1,7 @@
name: gtk3
description: GObject-based multi-platform GUI toolkit version 3
version: 3.24.51
revision: 1
revision: 2
url: https://www.gtk.org/
license: LGPL2.1-or-later
architecture: any
@@ -41,7 +41,14 @@ make_depends:
- sassc
- wayland-protocols
downloads:
- url: https://gitlab.gnome.org/GNOME/gtk/-/archive/${BPM_PKG_VERSION}/gtk-${BPM_PKG_VERSION}.tar.gz
- url: https://download.gnome.org/sources/gtk/${BPM_PKG_VERSION%.*}/gtk-${BPM_PKG_VERSION}.tar.xz
extract_to: ${BPM_SOURCE}
extract_strip_components: 1
checksum: f3c87a20b3380b69efa720f412a0fea6ab6edce021f8ffaf5c4531fe1321b24f
checksum: 0013877c6bd23c2dbe42ad7c70a053d0e449be66736574e37867c49c5f905a4f
split_packages:
- name: gtk3
- name: gtk3-demos
description: Demo applications for GTK3
depends:
- gtk3
- hicolor-icon-theme
+27 -2
View File
@@ -5,21 +5,46 @@
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
meson setup --prefix=/usr --libdir=/usr/lib --buildtype=release -Dman=false -Dgtk_doc=false -Dbroadway_backend=true build
meson setup --prefix=/usr --libdir=/usr/lib --buildtype=release -Dman=false -Dgtk_doc=true -Dman=true -Dbroadway_backend=true build
meson compile -C build
}
_pick() {
local p="$1" f d; shift
for f; do
[ -d "$BPM_WORKDIR"/output_"$p" ] || { echo "Split package $p not found"; exit 1; }
d="$BPM_WORKDIR"/output_"$p"/"${f#$BPM_OUTPUT}"
mkdir -p "$(dirname "$d")"
mv "$f" "$d"
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
done
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
package_gtk3() {
meson install -C build --destdir="$BPM_OUTPUT"
# Install BPM hooks
install -Dm644 "$BPM_WORKDIR"/*.bpmhook -t "$BPM_OUTPUT"/var/lib/bpm/hooks/
cd "$BPM_OUTPUT"
# Move demo files into split package
_pick gtk3-demos usr/bin/gtk3-{demo,demo-application,icon-browser,widget-factory}
_pick gtk3-demos usr/share/applications/gtk3-{demo,icon-browser,widget-factory}.desktop
_pick gtk3-demos usr/share/glib-2.0/schemas/org.gtk.{Demo,exampleapp}.gschema.xml
_pick gtk3-demos usr/share/icons/hicolor/*/apps/gtk3-{demo,widget-factory}[-.]*
_pick gtk3-demos usr/share/man/man1/gtk3-{demo,demo-application,icon-browser,widget-factory}.1
# Remove gtk-update-icon-cache binary
rm "$BPM_OUTPUT"/usr/bin/gtk-update-icon-cache
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/gtk3/COPYING
}
package_gtk3-demos() {
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/gtk3/COPYING
}