Browse Source

glib: add hook for glib-compile-schemas

Previously was in gtk2 package.
build-on-device
Leonid Plyushch 5 years ago
parent
commit
394a49d901
No known key found for this signature in database GPG Key ID: 45F2964132545795
  1. 13
      packages/glib/build.sh
  2. 9
      packages/glib/hooks/postinst.in
  3. 3
      packages/glib/hooks/postrm.in
  4. 1
      packages/glib/hooks/triggers.in

13
packages/glib/build.sh

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://developer.gnome.org/glib/
TERMUX_PKG_DESCRIPTION="Library providing core building blocks for libraries and applications written in C"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_VERSION=2.62.4
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://ftp.gnome.org/pub/gnome/sources/glib/${TERMUX_PKG_VERSION:0:4}/glib-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=4c84030d77fa9712135dfa8036ad663925655ae95b1d19399b6200e869925bbc
# libandroid-support to get langinfo.h in include path.
@ -20,3 +20,14 @@ termux_step_pre_configure() {
# glib checks for __BIONIC__ instead of __ANDROID__:
CFLAGS+=" -D__BIONIC__=1"
}
termux_step_create_debscripts() {
for i in postinst postrm triggers; do
sed \
"s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \
"${TERMUX_PKG_BUILDER_DIR}/hooks/${i}.in" > ./${i}
chmod 755 ./${i}
done
unset i
chmod 644 ./triggers
}

9
packages/glib/hooks/postinst.in

@ -0,0 +1,9 @@
#!@TERMUX_PREFIX@/bin/sh
# glib-compile-schemas is located in glib-bin package which
# may not be installed.
if [ -x "$(command -v glib-compile-schemas)" ]; then
glib-compile-schemas "@TERMUX_PREFIX@/share/glib-2.0/schemas" > /dev/null
fi
exit 0

3
packages/glib/hooks/postrm.in

@ -0,0 +1,3 @@
#!@TERMUX_PREFIX@/bin/sh
rm -f "@TERMUX_PREFIX@/share/glib-2.0/schemas/gschemas.compiled"
exit 0

1
packages/glib/hooks/triggers.in

@ -0,0 +1 @@
interest-noawait @TERMUX_PREFIX@/share/glib-2.0/schemas
Loading…
Cancel
Save