[R/el4] Symlink LaTeX files, and rehash on package change when possible (# 630835)

Michel Alexandre Salim salimma at fedoraproject.org
Tue Aug 9 14:43:32 UTC 2011


commit db0fad4fe6f2dfd145f5e3b1b1443ffb358dc7b7
Author: Michel Alexandre Salim <salimma at fedoraproject.org>
Date:   Tue Aug 9 16:14:12 2011 +0200

    Symlink LaTeX files, and rehash on package change when possible (# 630835)

 R.spec |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/R.spec b/R.spec
index 3ee67d6..460402e 100644
--- a/R.spec
+++ b/R.spec
@@ -6,7 +6,7 @@
 
 Name: R
 Version: 2.13.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: A language for data analysis and graphics
 URL: http://www.r-project.org
 Source0: ftp://cran.r-project.org/pub/R/src/base/R-2/R-%{version}.tar.gz
@@ -268,10 +268,24 @@ chmod +x $RPM_BUILD_ROOT%{_datadir}/R/sh/echo.sh
 chmod -x $RPM_BUILD_ROOT%{_libdir}/R/library/mgcv/CITATION ${RPM_BUILD_ROOT}%{_docdir}/R-%{version}/CAPABILITIES
 
 # Symbolic link for convenience
-pushd %{buildroot}%{_libdir}/R
+pushd $RPM_BUILD_ROOT%{_libdir}/R
 ln -s ../../include/R include
 popd
 
+# Symbolic link for LaTeX
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/texmf/tex/latex
+pushd $RPM_BUILD_ROOT%{_datadir}/texmf/tex/latex
+ln -s ../../../R/texmf/tex/latex R
+popd
+
+%postun
+if [ $1 -eq 0 ] ; then
+    /usr/bin/mktexlsr %{_datadir}/texmf &>/dev/null || :
+fi
+
+%posttrans
+/usr/bin/mktexlsr %{_datadir}/texmf &>/dev/null || :
+
 %files
 # Metapackage
 
@@ -301,6 +315,7 @@ popd
 %{_datadir}/R/R/
 %{_datadir}/R/sh/
 %{_datadir}/R/texmf/
+%{_datadir}/texmf/
 %dir %{_libdir}/R
 %{_libdir}/R/bin
 %{_libdir}/R/etc
@@ -893,6 +908,9 @@ fi
 %postun -n libRmath -p /sbin/ldconfig
 
 %changelog
+* Tue Aug  9 2011 Michel Salim <salimma at fedoraproject.org> - 2.13.1-3
+- Symlink LaTeX files, and rehash on package change when possible (# 630835)
+
 * Mon Aug  8 2011 Tom Callaway <spot at fedoraproject.org> - 2.13.1-2
 - add BuildRequires: less
 


More information about the scm-commits mailing list