Split package and enable documentation

This commit is contained in:
2025-11-23 15:07:47 +02:00
parent a8d5760e14
commit aafc387977
2 changed files with 35 additions and 3 deletions
+9 -1
View File
@@ -1,7 +1,7 @@
name: libadwaita name: libadwaita
description: Building blocks for modern adaptive GNOME applications description: Building blocks for modern adaptive GNOME applications
version: 1.8.2 version: 1.8.2
revision: 1 revision: 2
url: https://gnome.pages.gitlab.gnome.org/libadwaita/ url: https://gnome.pages.gitlab.gnome.org/libadwaita/
license: LGPL2.1-or-later license: LGPL2.1-or-later
architecture: any architecture: any
@@ -15,6 +15,7 @@ depends:
- gtk4 - gtk4
- pango - pango
make_depends: make_depends:
- gi-docgen
- gobject-introspection - gobject-introspection
- meson - meson
- sassc - sassc
@@ -24,3 +25,10 @@ downloads:
extract_to: ${BPM_SOURCE} extract_to: ${BPM_SOURCE}
extract_strip_components: 1 extract_strip_components: 1
checksum: 589a6e0f4191740e8690a7d3298e16fa0d4061341b551da7abb2f030b550adb1 checksum: 589a6e0f4191740e8690a7d3298e16fa0d4061341b551da7abb2f030b550adb1
split_packages:
- name: libadwaita
- name: libadwaita-demos
description: Demo applications for libadwaita
depends:
- hicolor-icon-theme
- libadwaita
+26 -2
View File
@@ -5,15 +5,39 @@
# The build function is executed in the source directory # The build function is executed in the source directory
# This function is used to compile the source code # This function is used to compile the source code
build() { build() {
meson setup --prefix=/usr -Dtests=false build meson setup --prefix=/usr -Ddocumentation=true -Dtests=false build
meson compile -C 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 # 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_libadwaita() {
meson install -C build --destdir="$BPM_OUTPUT" meson install -C build --destdir="$BPM_OUTPUT"
cd "$BPM_OUTPUT"
# Move demo files into split package
_pick libadwaita-demos usr/bin/adwaita-1-demo
_pick libadwaita-demos usr/share/applications/org.gnome.Adwaita1.Demo.desktop
_pick libadwaita-demos usr/share/icons/hicolor/*/apps/org.gnome.Adwaita1.Demo[-.]*
_pick libadwaita-demos usr/share/metainfo/org.gnome.Adwaita1.Demo.metainfo.xml
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/libadwaita/COPYING
}
package_libadwaita-demos() {
# Install package license # Install package license
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/libadwaita/COPYING install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/libadwaita/COPYING
} }