summaryrefslogtreecommitdiff
path: root/libre/texlive-bin-libre/texlive.install
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2013-09-09 20:09:36 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2013-09-09 20:09:36 -0300
commit30ba6f072e12e816b3bf09369f925e6a8cb3f0c3 (patch)
tree5cff6f766c98c615b9b06dcbedcb7af70807497d /libre/texlive-bin-libre/texlive.install
parent150736a5f7a46fb31bbb50ca53ecda73a1095d20 (diff)
downloadabslibre-30ba6f072e12e816b3bf09369f925e6a8cb3f0c3.tar.gz
abslibre-30ba6f072e12e816b3bf09369f925e6a8cb3f0c3.tar.bz2
abslibre-30ba6f072e12e816b3bf09369f925e6a8cb3f0c3.zip
texlive-bin-libre: put -libre variant due that arch's guys put nonfree biber binaries again
Diffstat (limited to 'libre/texlive-bin-libre/texlive.install')
-rw-r--r--libre/texlive-bin-libre/texlive.install50
1 files changed, 50 insertions, 0 deletions
diff --git a/libre/texlive-bin-libre/texlive.install b/libre/texlive-bin-libre/texlive.install
new file mode 100644
index 000000000..96a41bcfc
--- /dev/null
+++ b/libre/texlive-bin-libre/texlive.install
@@ -0,0 +1,50 @@
+infodir=usr/share/info
+filelist=(dvipng.info dvips.info eplain.info epspdf.info fontname.info kpathsea.info latex2e-es.info latex2e.info latex2man.info mf2pt1.info tds.info texdraw.info web2c.info)
+
+post_install() {
+ if [[ -f usr/bin/mktexlsr ]]; then
+ echo ">>> texlive: updating the filename database..."
+ usr/bin/mktexlsr
+ fi
+ if [[ -f usr/bin/fmtutil-sys ]]; then
+ echo -n "creating all formats..."
+ usr/bin/fmtutil-sys --all 1>/dev/null
+ echo " done."
+ echo " (logs are under /var/lib/texmf/web2c/<engine>/<formatname>.log)"
+ fi
+ [[ -x usr/bin/install-info ]] || return 0
+ for file in "${filelist[@]}"; do
+ install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ local corename corever _pacout
+ if [[ -f usr/bin/mktexlsr ]]; then
+ echo ">>> texlive: updating the filename database..."
+ usr/bin/mktexlsr
+ fi
+ _pacout=$(pacman -Q texlive-core 2>/dev/null)
+ read corename corever <<< ${_pacout}
+ if [[ ${corever} == 2012* ]]; then
+ if [[ -f usr/bin/fmtutil-sys ]]; then
+ echo -n "recreating all formats..."
+ usr/bin/fmtutil-sys --all 1>/dev/null
+ echo " done."
+ echo " (logs are under /var/lib/texmf/web2c/<engine>/<formatname>.log)"
+ fi
+ else
+ echo "WARNING: not recreating formats since texlive-core has version '$corever'"
+ fi
+ [[ -x usr/bin/install-info ]] || return 0
+ for file in "${filelist[@]}"; do
+ install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
+ done
+}
+
+pre_remove() {
+ [[ -x usr/bin/install-info ]] || return 0
+ for file in "${filelist[@]}"; do
+ install-info --delete "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
+ done
+}