Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=1868a47480e45b63bf34dcbcc32f8313e3490ff4
commit 1868a47480e45b63bf34dcbcc32f8313e3490ff4 Author: James Buren <r...@frugalware.org> Date: Fri Nov 6 03:12:25 2009 -0600 fonts.sh * initial draft diff --git a/source/include/fonts.sh b/source/include/fonts.sh new file mode 100644 index 0000000..ed26148 --- /dev/null +++ b/source/include/fonts.sh @@ -0,0 +1,80 @@ +#!/bin/sh + +### +# = fonts.sh(3) +# James Buren <r...@frugalware.org> +# +# == NAME +# fonts.sh - for Frugalware +# +# == SYNOPSIS +# Common schema for font packages. +# +# == EXAMPLE +# -------------------------------------------------- +# pkgname=artwiz-fonts +# pkgver=1.3 +# pkgrel=3 +# pkgdesc="A set of fonts known as artwiz." +# _F_sourceforge_name=artwiz-aleczapka-en +# _F_sourceforge_dirname=artwizaleczapka +# _F_sourceforge_ext=.tar.bz2 +# _F_sourceforge_realname=iso-8859-1 +# _F_fonts_dir="/usr/lib/X11/fonts/TTF" +# Finclude sourceforge fonts +# groups=('xlib-extra') +# archs=('i686' 'x86_64') +# sha1sums=('81e711b5f00816c57e205c9e60f69237c709679d') +# -------------------------------------------------- +# +# == OPTIONS +# * _F_fonts_dir (required): specifies the directory to install fonts to +### +if [ -z "$_F_fonts_dir" ]; then + error '$_F_fonts_dir is not defined.' + Fdie +fi + +### +# == OVERWRITTEN VARIABLES +# * install +### +install="src/fonts.install" + +### +# == APPENDED VARIABLES +# * rodepends +# * options +### +rodepends=(${rodepen...@]} 'mkfontscale' 'mkfontdir' 'fontconfig') +options=(${optio...@]} 'genscriptlet') + +### +# == PROVIDED FUNCTIONS +# * Fbuild_fonts +### +Fbuild_fonts() { + + # find and install all font extensions we support + for i in `find -iregex '.*\.\(ttf\|otf\|pcf\|pcf.gz\)'`; do + Ffile "$i" "$_F_fonts_dir/`basename $i`" + done + + # find any uncompressed PCF fonts and compress them + for i in `find "$Fdestdir" -name "*.pcf"`; do + Fmessage "Compressing PCF font: $i" + 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" + +} + +### +# * build() just calls Fbuild_fonts +### +build() { + Fbuild_fonts +} _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git