xbps-base-files: some changes to all triggers.
--HG-- extra : convert_revision : 2f3a39a7d1853268b84c5087cbbf5e74044c20f0
This commit is contained in:
parent
38e6679ff5
commit
5b3489c9ea
13 changed files with 56 additions and 85 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'xbps-base-files'
|
# Template file for 'xbps-base-files'
|
||||||
pkgname=xbps-base-files
|
pkgname=xbps-base-files
|
||||||
version=0.16
|
version=0.17
|
||||||
build_style=custom-install
|
build_style=custom-install
|
||||||
short_desc="xbps base system files"
|
short_desc="xbps base system files"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
|
|
|
@ -7,23 +7,16 @@
|
||||||
# $3 = pkgname
|
# $3 = pkgname
|
||||||
# $4 = version
|
# $4 = version
|
||||||
#
|
#
|
||||||
trigger="gtk-icon-cache"
|
iconcache_bin=usr/bin/gtk-update-icon-cache
|
||||||
iconcache_bin=./usr/bin/gtk-update-icon-cache
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
targets)
|
targets)
|
||||||
echo "post-install post-remove"
|
echo "post-install post-remove"
|
||||||
;;
|
;;
|
||||||
run)
|
run)
|
||||||
echo "Running $trigger trigger..."
|
|
||||||
|
|
||||||
case "$2" in
|
case "$2" in
|
||||||
post-*)
|
post-install)
|
||||||
for dir in ${gtk_iconcache_dirs}; do
|
for dir in ${gtk_iconcache_dirs}; do
|
||||||
if [ -f ${dir}/icon-theme.cache ]; then
|
|
||||||
rm -f ${dir}/icon-theme.cache
|
|
||||||
echo "Removed GTK+ icon theme cache for ${dir}."
|
|
||||||
fi
|
|
||||||
if [ -x ${iconcache_bin} ]; then
|
if [ -x ${iconcache_bin} ]; then
|
||||||
echo -n "Updating GTK+ icon cache for "
|
echo -n "Updating GTK+ icon cache for "
|
||||||
echo -n "${dir}... "
|
echo -n "${dir}... "
|
||||||
|
@ -32,6 +25,14 @@ run)
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
post-remove)
|
||||||
|
for dir in ${gtk_iconcache_dirs}; do
|
||||||
|
if [ -f ${dir}/icon-theme.cache ]; then
|
||||||
|
rm -f ${dir}/icon-theme.cache
|
||||||
|
echo "Removed GTK+ icon theme cache for ${dir}."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -7,21 +7,19 @@
|
||||||
# $3 = pkgname
|
# $3 = pkgname
|
||||||
# $4 = version
|
# $4 = version
|
||||||
#
|
#
|
||||||
trigger="gtk-immodules"
|
immodules_bin=usr/bin/gtk-query-immodules-2.0
|
||||||
immodules_bin=./usr/bin/gtk-query-immodules-2.0
|
immodules_db=etc/gtk-2.0/gtk.immodules
|
||||||
immodules_db=./etc/gtk-2.0/gtk.immodules
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
targets)
|
targets)
|
||||||
echo "post-install post-remove"
|
echo "post-install post-remove"
|
||||||
;;
|
;;
|
||||||
run)
|
run)
|
||||||
echo "Running $trigger trigger..."
|
|
||||||
|
|
||||||
case "$2" in
|
case "$2" in
|
||||||
post-*)
|
post-*)
|
||||||
if [ -f ${immodules_db} ]; then
|
if [ "${PKGNAME}" = "gtk+" ]; then
|
||||||
rm -f ${immodules_db}
|
[ -f ${immodules_db} ] rm -f ${immodules_db}
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
if [ -x ${immodules_bin} ]; then
|
if [ -x ${immodules_bin} ]; then
|
||||||
echo "Updating GTK's immodules database..."
|
echo "Updating GTK's immodules database..."
|
||||||
|
|
|
@ -7,21 +7,19 @@
|
||||||
# $3 = pkgname
|
# $3 = pkgname
|
||||||
# $4 = version
|
# $4 = version
|
||||||
#
|
#
|
||||||
trigger="gtk-pixbuf-loaders"
|
pixbuf_bin=usr/bin/gdk-pixbuf-query-loaders
|
||||||
pixbuf_bin=./usr/bin/gdk-pixbuf-query-loaders
|
pixbuf_loaders=etc/gtk-2.0/gdk-pixbuf.loaders
|
||||||
pixbuf_loaders=./etc/gtk-2.0/gdk-pixbuf.loaders
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
targets)
|
targets)
|
||||||
echo "post-install post-remove"
|
echo "post-install post-remove"
|
||||||
;;
|
;;
|
||||||
run)
|
run)
|
||||||
echo "Running $trigger trigger..."
|
|
||||||
|
|
||||||
case "$2" in
|
case "$2" in
|
||||||
post-*)
|
post-*)
|
||||||
if [ -f ${pixbuf_loaders} ]; then
|
if [ "${PKGNAME}" = "gtk+" ]; then
|
||||||
rm -f ${pixbuf_loaders}
|
[ -f ${pixbuf_loaders} ] && rm -f ${pixbuf_loaders}
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
if [ -x ${pixbuf_bin} ]; then
|
if [ -x ${pixbuf_bin} ]; then
|
||||||
echo "Updating GTK's pixbuf modules file..."
|
echo "Updating GTK's pixbuf modules file..."
|
||||||
|
|
|
@ -6,12 +6,10 @@
|
||||||
# $2 = target [post-install/pre-remove]
|
# $2 = target [post-install/pre-remove]
|
||||||
# $3 = pkgname
|
# $3 = pkgname
|
||||||
#
|
#
|
||||||
trigger="info-files"
|
xbps_metadir=var/db/xbps/metadata
|
||||||
|
finfometa=$xbps_metadir/$3/info-files
|
||||||
xbps_metadir="./var/db/xbps/metadata"
|
installinfo=usr/bin/install-info
|
||||||
finfometa="$xbps_metadir/$3/$trigger"
|
infodir=usr/share/info
|
||||||
installinfo="./usr/bin/install-info"
|
|
||||||
infodir="./usr/share/info"
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
targets)
|
targets)
|
||||||
|
@ -25,8 +23,6 @@ run)
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Running $trigger trigger..."
|
|
||||||
|
|
||||||
cat $finfometa | while read line; do
|
cat $finfometa | while read line; do
|
||||||
[ ! -f ./$line ] && continue
|
[ ! -f ./$line ] && continue
|
||||||
[ "$line" = "/usr/share/info/dir" ] && continue
|
[ "$line" = "/usr/share/info/dir" ] && continue
|
||||||
|
|
|
@ -9,19 +9,14 @@
|
||||||
# $3 = pkgname
|
# $3 = pkgname
|
||||||
# $4 = version
|
# $4 = version
|
||||||
#
|
#
|
||||||
trigger="initramfs-tools"
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
targets)
|
targets)
|
||||||
echo "post-install"
|
echo "post-install"
|
||||||
;;
|
;;
|
||||||
run)
|
run)
|
||||||
[ ! -x usr/sbin/update-initramfs ] && exit 0
|
[ ! -x usr/sbin/update-initramfs ] && exit 0
|
||||||
[ ! -x lib/rc/bin/mountinfo ] && exit 0
|
|
||||||
[ "$2" != "post-install" ] && exit 1
|
[ "$2" != "post-install" ] && exit 1
|
||||||
|
|
||||||
echo "Running $trigger trigger..."
|
|
||||||
|
|
||||||
initramfs_cmd="update-initramfs"
|
initramfs_cmd="update-initramfs"
|
||||||
|
|
||||||
if [ "$3" = "kernel" -a ! -f ./var/lib/initramfs-tools/$4 ]; then
|
if [ "$3" = "kernel" -a ! -f ./var/lib/initramfs-tools/$4 ]; then
|
||||||
|
|
|
@ -7,21 +7,18 @@
|
||||||
# $3 = pkgname
|
# $3 = pkgname
|
||||||
# $4 = version
|
# $4 = version
|
||||||
#
|
#
|
||||||
trigger="mimedb"
|
mimedb_bin=usr/bin/update-mime-database
|
||||||
mimedb_bin=./usr/bin/update-mime-database
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
targets)
|
targets)
|
||||||
echo "post-install post-remove"
|
echo "post-install post-remove"
|
||||||
;;
|
;;
|
||||||
run)
|
run)
|
||||||
echo "Running $trigger trigger..."
|
|
||||||
|
|
||||||
case "$2" in
|
case "$2" in
|
||||||
post-*)
|
post-*)
|
||||||
if [ -x ${mimedb_bin} ]; then
|
if [ -x ${mimedb_bin} ]; then
|
||||||
echo "Updating shared-mime-info database..."
|
echo "Updating shared-mime-info database..."
|
||||||
${mimedb_bin} ./usr/share/mime > /dev/null
|
${mimedb_bin} usr/share/mime > /dev/null
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# $2 = target [post-install/pre-remove]
|
# $2 = target [post-install/pre-remove]
|
||||||
# $3 = pkgname
|
# $3 = pkgname
|
||||||
#
|
#
|
||||||
trigger="openrc-service"
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
targets)
|
targets)
|
||||||
echo "post-install pre-remove"
|
echo "post-install pre-remove"
|
||||||
|
@ -28,8 +26,6 @@ run)
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Running trigger ${trigger}..."
|
|
||||||
|
|
||||||
[ ! -f etc/fstab ] && touch etc/fstab
|
[ ! -f etc/fstab ] && touch etc/fstab
|
||||||
|
|
||||||
set -- ${openrc_services}
|
set -- ${openrc_services}
|
||||||
|
|
|
@ -7,25 +7,25 @@
|
||||||
# $3 = pkgname
|
# $3 = pkgname
|
||||||
# $4 = version
|
# $4 = version
|
||||||
#
|
#
|
||||||
trigger="pango-modules"
|
pango_bin=usr/bin/pango-querymodules
|
||||||
pango_bin=./usr/bin/pango-querymodules
|
pango_modules=etc/pango/pango.modules
|
||||||
pango_modules=./etc/pango/pango.modules
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
targets)
|
targets)
|
||||||
echo "post-install post-remove"
|
echo "post-install post-remove"
|
||||||
;;
|
;;
|
||||||
run)
|
run)
|
||||||
echo "Running $trigger trigger..."
|
|
||||||
|
|
||||||
case "$2" in
|
case "$2" in
|
||||||
post-*)
|
post-*)
|
||||||
if [ -f ${pango_modules} ]; then
|
if [ "${PKGNAME}" = "pango" ]; then
|
||||||
echo "Removing $trigger list file..."
|
if [ -f ${pango_modules} ]; then
|
||||||
rm -f ${pango_modules}
|
echo "Removing pango modules file..."
|
||||||
|
rm -f ${pango_modules}
|
||||||
|
fi
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
if [ -x ${pango_bin} ]; then
|
if [ -x ${pango_bin} ]; then
|
||||||
echo "Creating $trigger list file..."
|
echo "Updating pango modules file..."
|
||||||
${pango_bin} > ${pango_modules}
|
${pango_bin} > ${pango_modules}
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
# $3 = pkgname
|
# $3 = pkgname
|
||||||
# $4 = version
|
# $4 = version
|
||||||
#
|
#
|
||||||
trigger="register-shell"
|
shells_file=var/db/xbps/metadata/$3/shells
|
||||||
shells_file="./var/db/xbps/metadata/$3/shells"
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
targets)
|
targets)
|
||||||
|
@ -18,20 +17,18 @@ run)
|
||||||
[ "$2" != "post-install" -a "$2" != "post-remove" ] && exit 1
|
[ "$2" != "post-install" -a "$2" != "post-remove" ] && exit 1
|
||||||
[ ! -f ${shells_file} ] && exit 1
|
[ ! -f ${shells_file} ] && exit 1
|
||||||
|
|
||||||
echo "Running $trigger trigger..."
|
|
||||||
|
|
||||||
case "$2" in
|
case "$2" in
|
||||||
post-install)
|
post-install)
|
||||||
if [ ! -f ./etc/shells ]; then
|
if [ ! -f etc/shells ]; then
|
||||||
cat ${shells_file} | while read line; do
|
cat ${shells_file} | while read line; do
|
||||||
echo $line >> ./etc/shells
|
echo $line >> etc/shells
|
||||||
echo "Registered $line into /etc/shells."
|
echo "Registered $line into /etc/shells."
|
||||||
done
|
done
|
||||||
chmod 644 ./etc/shells
|
chmod 644 etc/shells
|
||||||
else
|
else
|
||||||
cat ${shells_file} | while read line; do
|
cat ${shells_file} | while read line; do
|
||||||
if ! grep -q $line ./etc/shells; then
|
if ! grep -q $line etc/shells; then
|
||||||
echo $line >> ./etc/shells
|
echo $line >> etc/shells
|
||||||
echo -n "Registered $line into "
|
echo -n "Registered $line into "
|
||||||
echo "/etc/shells."
|
echo "/etc/shells."
|
||||||
fi
|
fi
|
||||||
|
@ -39,11 +36,11 @@ run)
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
post-remove)
|
post-remove)
|
||||||
if [ -f ./etc/shells ]; then
|
if [ -f etc/shells ]; then
|
||||||
cat ${shells_file} | while read line; do
|
cat ${shells_file} | while read line; do
|
||||||
if grep -q $line ./etc/shells; then
|
if grep -q $line etc/shells; then
|
||||||
shell=$(echo $line|sed "s|\\/|\\\/|g")
|
shell=$(echo $line|sed "s|\\/|\\\/|g")
|
||||||
sed -i -e "/$shell/d" ./etc/shells
|
sed -i -e "/$shell/d" etc/shells
|
||||||
echo -n "Unregistered $line from "
|
echo -n "Unregistered $line from "
|
||||||
echo "/etc/shells."
|
echo "/etc/shells."
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -8,9 +8,8 @@
|
||||||
# $3 = pkgname
|
# $3 = pkgname
|
||||||
# $4 = version
|
# $4 = version
|
||||||
#
|
#
|
||||||
trigger="update-desktopdb"
|
desktopdb_bin=usr/bin/update-desktop-database
|
||||||
desktopdb_bin=./usr/bin/update-desktop-database
|
desktopdb_dir=usr/share/applications
|
||||||
desktopdb_dir=./usr/share/applications
|
|
||||||
desktopdb_cache=${desktopdb_dir}/mimeinfo.cache
|
desktopdb_cache=${desktopdb_dir}/mimeinfo.cache
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -18,15 +17,14 @@ targets)
|
||||||
echo "post-install post-remove"
|
echo "post-install post-remove"
|
||||||
;;
|
;;
|
||||||
run)
|
run)
|
||||||
echo "Running $trigger trigger..."
|
|
||||||
|
|
||||||
case "$2" in
|
case "$2" in
|
||||||
post-*)
|
post-*)
|
||||||
if [ -f ${desktopdb_cache} ]; then
|
if [ "${PKGNAME}" = "desktop-file-utils" ]; then
|
||||||
rm -f ${desktopdb_cache}
|
[ -f ${desktopdb_cache} ] && rm -f ${desktopdb_cache}
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
if [ -x ${desktopdb_bin} ]; then
|
if [ -x ${desktopdb_bin} ]; then
|
||||||
echo "Updating MIME database for ${desktopdb_dir}..."
|
echo "Updating MIME database..."
|
||||||
${desktopdb_bin} ${desktopdb_dir}
|
${desktopdb_bin} ${desktopdb_dir}
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -8,11 +8,9 @@
|
||||||
# $2 = target [post-install/pre-remove]
|
# $2 = target [post-install/pre-remove]
|
||||||
# $3 = pkgname
|
# $3 = pkgname
|
||||||
#
|
#
|
||||||
trigger="x11-fonts"
|
mkfontdir=usr/bin/mkfontdir
|
||||||
|
mkfontscale=usr/bin/mkfontscale
|
||||||
mkfontdir=./usr/bin/mkfontdir
|
fccache=usr/bin/fc-cache
|
||||||
mkfontscale=./usr/bin/mkfontscale
|
|
||||||
fccache=./usr/bin/fc-cache
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
targets)
|
targets)
|
||||||
|
@ -25,8 +23,6 @@ run)
|
||||||
|
|
||||||
[ -z "${font_dirs}" ] && exit 0
|
[ -z "${font_dirs}" ] && exit 0
|
||||||
|
|
||||||
echo "Running $trigger trigger..."
|
|
||||||
|
|
||||||
case "$2" in
|
case "$2" in
|
||||||
post-install)
|
post-install)
|
||||||
for dir in ${font_dirs}; do
|
for dir in ${font_dirs}; do
|
||||||
|
|
|
@ -8,9 +8,8 @@
|
||||||
# $3 = pkgname
|
# $3 = pkgname
|
||||||
# $4 = version
|
# $4 = version
|
||||||
#
|
#
|
||||||
trigger="xml-catalog"
|
sgml_catalog=usr/share/sgml/catalog
|
||||||
sgml_catalog="./usr/share/sgml/catalog"
|
xml_catalog=usr/share/xml/catalog
|
||||||
xml_catalog="./usr/share/xml/catalog"
|
|
||||||
|
|
||||||
register_entries()
|
register_entries()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue