[Frugalware-git] kdebump: fonts: update to use genscriptlet
James Buren
ryuo at frugalware.org
Sat May 12 22:01:38 CEST 2012
Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=kdebump.git;a=commitdiff;h=0025f668e17c7e9b9150697f9e61127953a5fc72
commit 0025f668e17c7e9b9150697f9e61127953a5fc72
Author: James Buren <ryuo at frugalware.org>
Date: Sat May 12 15:00:44 2012 -0500
fonts: update to use genscriptlet
diff --git a/source/include/fonts.install b/source/include/fonts.install
index 24cb06d..4768283 100644
--- a/source/include/fonts.install
+++ b/source/include/fonts.install
@@ -1,8 +1,8 @@
post_install() {
echo -n "Updating font cache... "
- mkfontscale '$_F_fonts_dir'
- mkfontdir '$_F_fonts_dir'
- fc-cache -f '$_F_fonts_dir'
+ mkfontscale '@_F_fonts_dir@'
+ mkfontdir '@_F_fonts_dir@'
+ fc-cache -f '@_F_fonts_dir@'
echo "done."
}
diff --git a/source/include/fonts.sh b/source/include/fonts.sh
index 99806fd..ee3f832 100644
--- a/source/include/fonts.sh
+++ b/source/include/fonts.sh
@@ -32,34 +32,43 @@
###
if [ -z "$_F_fonts_subdir" ]; then
error '$_F_fonts_subdir is not defined.'
- Fdie
+ Fdie
fi
_F_fonts_dir="/usr/share/fonts/X11/$_F_fonts_subdir"
###
# == OVERWRITTEN VARIABLES
-# * install
+# * _F_genscriptlet_install
# * _F_cd_path
###
-install="src/fonts.install"
+_F_genscriptlet_install="$Fincdir/fonts.install"
_F_cd_path='.'
###
# == APPENDED VARIABLES
# * makedepends
+# * depends
# * rodepends
-# * options
+# * _F_genscriptlet_hooks
###
makedepends=(${makedepends[@]} 'bdftopcf')
depends=(${depends[@]} 'mkfontdir')
rodepends=(${rodepends[@]} 'mkfontscale' 'fontconfig')
-options=(${options[@]} 'genscriptlet')
+_F_genscriptlet_hooks=(${_F_genscriptlet_hooks[@]} 'fonts_genscriptlet_hook')
+
+Finclude genscriptlet
###
# == PROVIDED FUNCTIONS
+# * fonts_genscriptlet_hook
# * Fbuild_fonts
###
+fonts_genscriptlet_hook()
+{
+ Freplace '_F_fonts_dir' "$1"
+}
+
Fbuild_fonts() {
# find and install all font extensions we support
@@ -80,10 +89,7 @@ Fbuild_fonts() {
gzip -9 "$i" || Fdie
done
- # generate the install script
- cp "$Fincdir/fonts.install" "$Fsrcdir" || Fdie
- Fsed '$_F_fonts_dir' "$_F_fonts_dir" "$Fsrcdir/fonts.install"
-
+ Fgenscriptlet
}
###
More information about the Frugalware-git
mailing list