| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2004 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.6 2007/12/02 22:47:10 aballier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.7 2008/01/20 00:14:45 aballier Exp $ |
| 4 | |
4 | |
| 5 | # |
5 | # |
| 6 | # Original Author: Alexis Ballier <aballier@gentoo.org> |
6 | # Original Author: Alexis Ballier <aballier@gentoo.org> |
| 7 | # Purpose: Provide generic install functions so that modular texlive's texmf ebuilds will |
7 | # Purpose: Provide generic install functions so that modular texlive's texmf ebuilds will |
| 8 | # only have to inherit this eclass. |
8 | # only have to inherit this eclass. |
| … | |
… | |
| 112 | # pkg_postinst and pkg_postrm, exported functions: |
112 | # pkg_postinst and pkg_postrm, exported functions: |
| 113 | # run texmf-update to ensure the tex installation is consistent with the |
113 | # run texmf-update to ensure the tex installation is consistent with the |
| 114 | # installed texmf trees. |
114 | # installed texmf trees. |
| 115 | |
115 | |
| 116 | texlive-module_pkg_postinst() { |
116 | texlive-module_pkg_postinst() { |
| 117 | if [ "$ROOT" = "/" ] ; then |
117 | if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then |
| 118 | /usr/sbin/texmf-update |
118 | /usr/sbin/texmf-update |
|
|
119 | else |
|
|
120 | ewarn "Cannot run texmf-update for some reason." |
|
|
121 | ewarn "Your texmf tree might be inconsistent with your configuration" |
|
|
122 | ewarn "Please try to figure what has happened" |
| 119 | fi |
123 | fi |
| 120 | } |
124 | } |
| 121 | |
125 | |
| 122 | texlive-module_pkg_postrm() { |
126 | texlive-module_pkg_postrm() { |
| 123 | if [ "$ROOT" = "/" ] ; then |
127 | if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then |
| 124 | /usr/sbin/texmf-update |
128 | /usr/sbin/texmf-update |
|
|
129 | else |
|
|
130 | ewarn "Cannot run texmf-update for some reason." |
|
|
131 | ewarn "Your texmf tree might be inconsistent with your configuration" |
|
|
132 | ewarn "Please try to figure what has happened" |
| 125 | fi |
133 | fi |
| 126 | } |
134 | } |
| 127 | |
135 | |
| 128 | EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm |
136 | EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm |