rpms/emacs-auctex/devel emacs-auctex.spec,1.24,1.25
Jonathan G. Underwood (jgu)
fedora-extras-commits at redhat.com
Sun Dec 16 01:01:15 UTC 2007
- Previous message (by thread): rpms/kdesdk/devel kdesdk-3.97.0-fix-kompare.patch, NONE, 1.1 kdesdk.spec, 1.83, 1.84 kdesdk-3.96.2-fix-kompare.patch, 1.3, NONE kdesdk-3.97.0-kompare-static-fPIC.patch, 1.3, NONE
- Next message (by thread): rpms/kdesdk/devel kdesdk-3.97.0-fix-kompare.patch, 1.1, 1.2 kdesdk.spec, 1.84, 1.85
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jgu
Update of /cvs/extras/rpms/emacs-auctex/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13772
Modified Files:
emacs-auctex.spec
Log Message:
* Sun Dec 16 2007 Jonathan G. Underwood <jonathan.underwood at gmail.com> - 11.84-4
- Add macros for automatic detection of Emacs version, site-lisp directory etc
- Make building of tex-preview subpackage optional, and disable for now
- Adjust Requires and BuildRequires for texlive
- Remove auctex-init.el since not needed
- Make RELEASE utf8
Index: emacs-auctex.spec
===================================================================
RCS file: /cvs/extras/rpms/emacs-auctex/devel/emacs-auctex.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- emacs-auctex.spec 4 Aug 2007 22:33:26 -0000 1.24
+++ emacs-auctex.spec 16 Dec 2007 01:00:38 -0000 1.25
@@ -1,20 +1,50 @@
+# If the emacs-el package has installed a pkgconfig file, use that to determine
+# install locations and Emacs version at build time, otherwise set defaults.
+%if %($(pkg-config emacs) ; echo $?)
+%define emacs_version 22.1
+%define emacs_lispdir %{_datadir}/emacs/site-lisp
+%define emacs_startdir %{emacs_lispdir}/site-start.d
+%else
+%define emacs_version %(pkg-config emacs --modversion)
+%define emacs_lispdir %(pkg-config emacs --variable sitepkglispdir)
+%define emacs_startdir %(pkg-config emacs --variable sitestartdir)
+%endif
+
+# AucTeX includes preview-latex which allows previeweing directly in the Emacs
+# buffer. This makes use of preview.sty, a LaTeX class, which is also included
+# with AucTex preview-latex can either use a privately installed copy of
+# preview.sty, or it can use one installed in the system texmf tree. If the
+# following is set to 1, an add-on LaTeX package will be created which installs
+# into the system texmf tree, and preview-latex will use that. However, TeXLive
+# already includes preview.sty and so this may not be desireable -- setting the
+# following value to 0 means that preview-latex/AucTeX will use a privately
+# installed copy of preview.sty.
+%define separate_preview 0
+
Summary: Enhanced TeX modes for Emacs
Name: emacs-auctex
Version: 11.84
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2+
Group: Applications/Editors
URL: http://www.gnu.org/software/auctex/
-Source0: ftp://ftp.gnu.org/pub/gnu/auctex/auctex-%{version}.tar.gz
-BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Obsoletes: auctex
Provides: auctex
Conflicts: emacspeak < 18
-Requires: emacs emacs-common ghostscript
-Requires: tetex-preview = %{version}-%{release}
-Requires: /sbin/install-info
-BuildRequires: emacs tetex-latex texinfo-tex ghostscript
+Requires: emacs(bin) >= %{emacs_version}
+Requires(pre): /sbin/install-info
+Requires(post): /sbin/install-info
+%if %{separate_preview}
+Requires: tex-preview = %{version}-%{release}
+%else
+Requires: texlive-latex
+Requires: ghostscript
+%endif
+
+Source0: ftp://ftp.gnu.org/pub/gnu/auctex/auctex-%{version}.tar.gz
+BuildArch: noarch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: emacs emacs-el texlive-latex texinfo-tex ghostscript
%description
AUCTeX is an extensible package that supports writing and formatting
@@ -50,12 +80,13 @@
Documentation for the AUCTeX package for emacs in various formats,
including HTML and PDF.
-%package -n tetex-preview
+%if %{separate_preview}
+%package -n tex-preview
Summary: Preview style files for LaTeX
Group: Applications/Publishing
-Requires: tetex-latex tetex-fonts ghostscript
+Requires: texlive-latex ghostscript
-%description -n tetex-preview
+%description -n tex-preview
The preview package for LaTeX allows for the processing of selected
parts of a LaTeX input file. This package extracts indicated pieces
from a source file (typically displayed equations, figures and
@@ -74,12 +105,18 @@
The tetex-preview package is generated from the AUCTeX package for
Emacs.
+%endif
%prep
%setup -q -n auctex-%{version}
%build
+%if %{separate_preview}
%configure --with-emacs
+%else
+%configure --with-emacs --without-texmf-dir
+%endif
+
make
# Build documentation in various formats
@@ -87,28 +124,13 @@
make extradist
popd
+# Fix some encodings
+/usr/bin/iconv -f iso8859-1 -t utf-8 RELEASE > RELEASE.conv && /bin/mv -f RELEASE.conv RELEASE
+
%install
rm -rf %{buildroot}
-
-%define startupdir %{_datadir}/emacs/site-lisp/site-start.d
-%define startupfile %{startupdir}/auctex-init.el
-
-mkdir -p %{buildroot}%{startupdir}
-
+mkdir -p %{buildroot}%{emacs_startdir}
make DESTDIR=%{buildroot} install
-
-# Startup file.
-cat <<EOF > %{buildroot}%{startupfile}
-;; This enables AUCTeX globally.
-;; See (info "(auctex)Introduction") on how to disable AUCTeX.
-;; Created for %{name}-%{version}-%{release}.noarch.rpm
-(load "auctex.el" nil t t)
-
-;; This enables preview-latex globally.
-;; Created for %{name}-%{version}-%{release}.noarch.rpm
-(load "preview-latex.el" nil t t)
-EOF
-
rm -rf %{buildroot}%{_var}
%clean
@@ -124,42 +146,57 @@
/sbin/install-info --delete %{_infodir}/preview-latex.info %{_infodir}/dir 2>/dev/null || :
fi
+%if %{separate_preview}
%post -n tetex-preview
/usr/bin/texhash > /dev/null 2>&1 || :
%postun -n tetex-preview
/usr/bin/texhash > /dev/null 2>&1 || :
+%endif
%files
%defattr(-,root,root,-)
%doc RELEASE COPYING README TODO FAQ CHANGES
%doc %{_infodir}/*.info*
%exclude %{_infodir}/dir
-%{startupdir}
-%dir %{_datadir}/emacs/site-lisp/auctex
-%dir %{_datadir}/emacs/site-lisp/auctex/style
-%{_datadir}/emacs/site-lisp/auctex/*.elc
-%{_datadir}/emacs/site-lisp/auctex/style/*.elc
-%{_datadir}/emacs/site-lisp/auctex/.nosearch
-%{_datadir}/emacs/site-lisp/auctex/style/.nosearch
-%{_datadir}/emacs/site-lisp/auctex/images
-%{_datadir}/emacs/site-lisp/tex-site.el
+%{emacs_startdir}/*
+%dir %{emacs_lispdir}/auctex
+%dir %{emacs_lispdir}/auctex/style
+%{emacs_lispdir}/auctex/*.elc
+%{emacs_lispdir}/auctex/style/*.elc
+%{emacs_lispdir}/auctex/.nosearch
+%{emacs_lispdir}/auctex/style/.nosearch
+%{emacs_lispdir}/auctex/images
+%{emacs_lispdir}/tex-site.el
+%if !%{separate_preview}
+%{emacs_lispdir}/auctex/latex
+%{emacs_lispdir}/auctex/doc
+%endif
-%files doc
-%doc doc/*.{dvi,ps,pdf}
-%doc doc/html
+%files el
+%defattr(-,root,root,-)
+%{emacs_lispdir}/auctex/*.el
+%{emacs_lispdir}/auctex/style/*.el
-%files -n tetex-preview
+%if %{separate_preview}
+%files -n tex-preview
%defattr(-,root,root,-)
%{_datadir}/texmf/tex/latex/preview
%{_datadir}/texmf/doc/latex/styles
+%endif
-%files el
-%defattr(-,root,root,-)
-%{_datadir}/emacs/site-lisp/auctex/*.el
-%{_datadir}/emacs/site-lisp/auctex/style/*.el
+%files doc
+%doc doc/*.{dvi,ps,pdf}
+%doc doc/html
%changelog
+* Sun Dec 16 2007 Jonathan G. Underwood <jonathan.underwood at gmail.com> - 11.84-4
+- Add macros for automatic detection of Emacs version, site-lisp directory etc
+- Make building of tex-preview subpackage optional, and disable for now
+- Adjust Requires and BuildRequires for texlive
+- Remove auctex-init.el since not needed
+- Make RELEASE utf8
+
* Sat Aug 4 2007 Jonathan G. Underwood <jonathan.underwood at gmail.com> - 11.84-3
- Clarify license version
- Correct version and release requirement for the el package
- Previous message (by thread): rpms/kdesdk/devel kdesdk-3.97.0-fix-kompare.patch, NONE, 1.1 kdesdk.spec, 1.83, 1.84 kdesdk-3.96.2-fix-kompare.patch, 1.3, NONE kdesdk-3.97.0-kompare-static-fPIC.patch, 1.3, NONE
- Next message (by thread): rpms/kdesdk/devel kdesdk-3.97.0-fix-kompare.patch, 1.1, 1.2 kdesdk.spec, 1.84, 1.85
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list