glib: add hook for glib-compile-schemas
Previously was in gtk2 package.
This commit is contained in:
parent
dc18ae5080
commit
368c09dac2
@ -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
Normal file
9
packages/glib/hooks/postinst.in
Normal file
@ -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
Normal file
3
packages/glib/hooks/postrm.in
Normal file
@ -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
Normal file
1
packages/glib/hooks/triggers.in
Normal file
@ -0,0 +1 @@
|
||||
interest-noawait @TERMUX_PREFIX@/share/glib-2.0/schemas
|
Loading…
Reference in New Issue
Block a user