# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT # The build function is executed in the source directory # This function is used to compile the source code build() { meson setup build --prefix=/usr --buildtype=release -Ddocumentation=false meson compile -C build } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package_gnome-online-accounts() { meson install -C build --destdir="$BPM_OUTPUT" # Move libgoa files into split package install -d "$BPM_WORKDIR"/output_libgoa/usr/{include/goa-1.0,lib/girepository-1.0,lib/goa-1.0,lib/pkgconfig,share/gir-1.0,share/vala/vapi} mv "$BPM_OUTPUT"/usr/include/goa-1.0/goa "$BPM_WORKDIR"/output_libgoa/usr/include/goa-1.0/goa mv "$BPM_OUTPUT"/usr/lib/libgoa-1.0.so* -t "$BPM_WORKDIR"/output_libgoa/usr/lib/ mv "$BPM_OUTPUT"/usr/lib/girepository-1.0/Goa-1.0.typelib "$BPM_WORKDIR"/output_libgoa/usr/lib/girepository-1.0/Goa-1.0.typelib mv "$BPM_OUTPUT"/usr/lib/goa-1.0/include "$BPM_WORKDIR"/output_libgoa/usr/lib/goa-1.0/include mv "$BPM_OUTPUT"/usr/lib/pkgconfig/goa-1.0.pc "$BPM_WORKDIR"/output_libgoa/usr/lib/pkgconfig/goa-1.0.pc mv "$BPM_OUTPUT"/usr/share/gir-1.0/Goa-1.0.gir "$BPM_WORKDIR"/output_libgoa/usr/share/gir-1.0/Goa-1.0.gir mv "$BPM_OUTPUT"/usr/share/vala/vapi/goa-1.0.* -t "$BPM_WORKDIR"/output_libgoa/usr/share/vala/vapi/ # Install package license install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/gnome-online-accounts/COPYING } package_libgoa() { # Install package license install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/gnome-online-accounts/COPYING }