PKGBUILDs/extra/xpdf-hebrew/xpdf-hebrew.install
2009-10-09 21:23:22 -05:00

44 lines
1.2 KiB
Text

# aim of this stuff is to add and remove just one line from /etc/xpdfrc
# that includes language specific nested files to xpdf's config
# instead of a whole bunch of lines as requested in the file add-to-xpdfrc
_pkgname=xpdf-hebrew
post_install() {
# we check if rc is already included in /etc/xpdfrc
echo "make $_pkgname config file known to global xpdf config ..."
cat etc/xpdfrc | grep -v /etc/xpdf/$_pkgname >/tmp/.pacxpdf
mv /tmp/.pacxpdf etc/xpdfrc
echo "include /etc/xpdf/$_pkgname" >> etc/xpdfrc
cat << EOM
*******************************************************************************
This package contains the encodings, which are necessary to convert character
tables and other things. There are no fonts included.
Many TrueType fonts contain glyphs for many encodings, but not for all. If your
pdfs are still displayed crappy, you likely will have to install some fonts
containing your prefered glyphs.
*******************************************************************************
EOM
}
post_upgrade() {
post_install $1
}
pre_remove() {
cat etc/xpdfrc | grep -v /etc/xpdf/$_pkgname >/tmp/.pacxpdf
mv /tmp/.pacxpdf etc/xpdfrc
chmod 644 etc/xpdfrc
}
post_remove() {
/bin/true
}
op=$1
shift
$op $*