Split package and enable documentation
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user