There is a problem with Makefiles in auctex-11.81. Namely an attempt
to install to subdirectories of some target directory, and when doing
that as non-root or when /usr/share is mounter read-only, ends up with
a series messages like that:
/usr/bin/install -c -m 644 preview.sty /usr/share/texmf/tex/latex/preview
/usr/bin/install: cannot remove
`/usr/share/texmf/tex/latex/preview/preview.sty': Permission denied
which show that we are trying to do that in really wrong places.
Of course the whole installation fails.
Changing DESTDIR on the top level is not an answer as then in other
places DESTDIR gets prepended twice and results are messed up again.
This clearly gets into a way also when you are trying to build an rpm
package out of the whole thing.
I am not really sure where the problem really lies. After some
investigation I opted for a simple way out and used the following
patch:
--- auctex-11.81/preview/Makefile.in~ 2005-06-24 02:14:05.000000000 -0600
+++ auctex-11.81/preview/Makefile.in 2005-10-21 23:54:51.000000000 -0600
@@ -114,7 +114,7 @@
done
install-texmf:
- (cd latex ; $(MAKE) DESTDIR=$(DESTDIR) install)
+ (cd latex ; $(MAKE) DESTDIR=$(INSTDIR) install)
install-startup:
test $(packagedir) != no || $(MAKE) preview-latex.el
'make' converts environment variables into its own variables, unless
not assigned in some other way, so it is enough to set properly
INSTDIR before doing 'make install' and then everything works.
A spec file using that approach, and modified from the one for 11.55-1,
is attached. A patch listed there refers to the one above. In the
contex of an rpm building I could have clearly use RPM_BUILD_ROOT,
which is defined there anyway, instead of INSTDIR but that would make
change somewhat rpm specific.
This spec file obviously now obsoletes 'preview' packages as this is
currently a part of auctex.
Michal
%define FOR_SUSE %{?suse_version:1}%{!?suse_version:0}
%if %{FOR_SUSE}
%define distri .suse
%define commongroup Productivity/Editors/Emacs
%define xemacspkgdir %{_datadir}/xemacs/xemacs-packages
%define startupfile %{_datadir}/emacs/site-lisp/suse-start-%{name}.el
%else
%define distri .fedora
%define commongroup Applications/Editors
%define xemacspkgdir %{_datadir}/xemacs/site-packages
%define startupfile %{_datadir}/emacs/site-lisp/site-start.d/%{name}-init.el
%endif
Summary: Enhanced TeX modes for Emacsen
Name: auctex
Version: 11.81
Release: 1%{distri}
License: GPL
Group: %{commongroup}
URL: http://www.gnu.org/software/auctex/
Source0: ftp://ftp.gnu.org/pub/gnu/auctex/%{name}-%{version}.tar.gz
Patch0: auctex-11.81-makeltx.patch
BuildArchitectures: noarch
BuildRoot: %{_tmppath}/%{name}-root
%description
AUCTeX is an extensible package that supports writing and formatting TeX files
for most variants of Emacs.
AUCTeX supports many different TeX macro packages, including AMS-TeX, LaTeX,
Texinfo and basic support for ConTeXt. Documentation can be found under
/usr/share/doc, e.g. the reference card (tex-ref.pdf) and the FAQ. The AUCTeX
manual is available in Emacs info (C-h i d m AUCTeX RET). On the AUCTeX home
page, we provide manuals in various formats.
%package emacs
Summary: Enhanced TeX modes for GNU Emacs
Group: %{commongroup}
Requires: emacs >= 21
Obsoletes: ge_auc emacs-auctex auctex
Obsoletes: preview-latex-common preview-latex-emacs
Conflicts: emacspeak < 18
Provides: auctex
%description emacs
AUCTeX is an extensible package that supports writing and formatting TeX files
for most variants of Emacs.
AUCTeX supports many different TeX macro packages, including AMS-TeX, LaTeX,
Texinfo and basic support for ConTeXt. Documentation can be found under
/usr/share/doc, e.g. the reference card (tex-ref.pdf) and the FAQ. The AUCTeX
manual is available in Emacs info (C-h i d m AUCTeX RET). On the AUCTeX home
page, we provide manuals in various formats.
This package is for GNU Emacs. XEmacs users should use the package system for
installation.
The package enables AUCTeX system-wide. If you do not want this,
install/upgrade with 'rpm --nopre ...' (the activation is done in the
preinstall script).
This version incorporates preview as well
%prep
%setup
%patch0 -p1 -b .mkl
%build
# The below will make the package build from a tar straight from CVS
# NOT RECOMMENDED, but useful for testing!
test -f ./configure || ./autogen.sh
# --with-texmf-dir overrides local docstrip configurations.
%configure \
--with-emacs \
--with-auctex-startfile=auctex.el \
--with-preview-startfile=preview-latex.el \
--with-texmf-dir=%{_datadir}/texmf
make
pushd doc
make auctex.info tex-ref.pdf
popd
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/site-start.d
( export INSTDIR=%{buildroot} ; %makeinstall )
# Remove dir file that has been created by the makeinfo calls because this
# file will not been included in the rpm distribution (make RPM 4.1+ happy)
rm -f '%{buildroot}%{_infodir}/dir'
%post emacs
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/auctex.info
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/preview-latex.info
%preun emacs
# $1 is the number of versions of this package installed
# after this uninstallation
if [ $1 -eq 0 ]; then
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/auctex.info
/sbin/install-info --delete --info-dir=%{_infodir}
%{_infodir}/preview-latex.info
fi
%clean
rm -rf %{buildroot}
%files emacs
%defattr(-,root,root)
%doc RELEASE COPYING INSTALL README TODO FAQ CHANGES
%doc doc/tex-ref.pdf
%doc %{_infodir}/*
%{_datadir}/emacs/site-lisp/%{name}
%{_datadir}/emacs/site-lisp/preview
%{_datadir}/emacs/site-lisp/site-start.d/*
%doc %{_datadir}/texmf/doc/latex/styles/preview.dvi
%{_datadir}/texmf/tex/latex/preview
%{_localstatedir}/%{name}
%config %{_datadir}/emacs/site-lisp/tex-site.el
%changelog
* Fri Oct 21 2005 Michal Jaegermann <[EMAIL PROTECTED]> - 11.81-1
- updated to version 11.81 which includes preview as well
* Fri Jan 21 2005 David Kastrup <[EMAIL PROTECTED]>
- Conflict with outdated Emacspeak versions
* Fri Jan 14 2005 David Kastrup <[EMAIL PROTECTED]>
- Install and remove auctex.info, not auctex
* Thu Aug 19 2004 David Kastrup <[EMAIL PROTECTED]>
- Change tex-site.el to overwriting config file mode. New naming scheme.
* Mon Aug 16 2004 David Kastrup <[EMAIL PROTECTED]>
- Attempt a bit of SuSEism. Might work if we are lucky.
* Sat Dec 7 2002 David Kastrup <[EMAIL PROTECTED]>
- Change addresses to fit move to Savannah.
* Mon Apr 15 2002 Jan-Ake Larsson <[EMAIL PROTECTED]>
- Adjusted TeX-macro-global and put autoactivation in preinstall
script so that it can be chosen at install time.
* Tue Feb 19 2002 Jan-Ake Larsson <[EMAIL PROTECTED]>
- Added site-start.el support
* Sat Feb 16 2002 Jan-Ake Larsson <[EMAIL PROTECTED]>
- Prerelease 11.11
_______________________________________________
auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex