Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > 766a6ed49e7a59a54bf7092e2fd3529b > files > 1

emacs-common-tuareg-1.45.6-9.fc12.src.rpm

%define pkg tuareg
%define pkgname Tuareg-mode

# 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 %{_datadir}/emacs/site-lisp/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

# If the xemacs-devel package has installed a pkgconfig file, use that
# to determine install locations and Emacs version at build time,
# otherwise set defaults.
%if %($(pkg-config xemacs) ; echo $?)
%define xemacs_version 21.5
%define xemacs_lispdir %{_datadir}/xemacs/site-lisp
%define xemacs_startdir %{_datadir}/xemacs/site-lisp/site-start.d
%else
%define xemacs_version %(pkg-config xemacs --modversion)
%define xemacs_lispdir %(pkg-config xemacs --variable sitepkglispdir)
%define xemacs_startdir %(pkg-config xemacs --variable sitestartdir)
%endif


Name:           emacs-common-%{pkg}
Version:        1.45.6
Release:        9%{?dist}
Summary:        Emacs and XEmacs mode for editing ocaml

Group:          Development/Libraries
License:        GPLv2+
URL:            http://www-rocq.inria.fr/~acohen/tuareg/index.html.en
Source0:        http://www-rocq.inria.fr/~acohen/tuareg/mode/tuareg-mode-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Patch0:         tuareg-mode-no-sym-lock.patch

BuildArch:      noarch
BuildRequires:  emacs, emacs-el
BuildRequires:  xemacs, xemacs-devel

# Needs caml-types.el in order to use *.annot files properly.
# In Debian this is merely a recommendation, to avoid pulling
# in all of OCaml just to edit an OCaml file.
Requires:       ocaml-emacs


%description
Tuareg is an OCaml mode for GNU Emacs and XEmacs.  It handles
automatic indentation of Objective Caml and Caml Light code.  Key
parts of the code are highlighted using Font-Lock.  Support to run an
interactive Caml toplevel and debbuger is provided.

This package contains the common files.  Install emacs-%{pkg} to get
the complete package.


%package -n emacs-%{pkg}
Summary:        Compiled elisp files to run %{pkgname} under GNU Emacs
Group:          Development/Libraries
Requires:       emacs(bin) >= %{emacs_version}
Requires:       emacs-common-%{pkg} = %{version}-%{release}

%description -n emacs-%{pkg}
Tuareg is an OCaml mode for GNU Emacs and XEmacs.  It handles
automatic indentation of Objective Caml and Caml Light code.  Key
parts of the code are highlighted using Font-Lock.  Support to run an
interactive Caml toplevel and debbuger is provided.

Install this package if you need to edit OCaml code in Emacs.


%package -n emacs-%{pkg}-el
Summary:        Elisp source files for %{pkgname} under GNU Emacs
Group:          Development/Libraries
Requires:       emacs-%{pkg} = %{version}-%{release}

%description -n emacs-%{pkg}-el
This package contains the elisp source files for %{pkgname} under GNU
Emacs. You do not need to install this package to run
%{pkgname}. Install the emacs-%{pkg} package to use %{pkgname} with
GNU Emacs.


%package -n xemacs-%{pkg}
Summary:        Compiled elisp files to run %{pkgname} under XEmacs
Group:          Development/Libraries
Requires:       xemacs(bin) >= %{xemacs_version}
Requires:       emacs-common-%{pkg} = %{version}-%{release}

%description -n xemacs-%{pkg}
Tuareg is an OCaml mode for GNU Emacs and XEmacs.  It handles
automatic indentation of Objective Caml and Caml Light code.  Key
parts of the code are highlighted using Font-Lock.  Support to run an
interactive Caml toplevel and debbuger is provided.

Install this package if you need to edit OCaml code in XEmacs.


%package -n xemacs-%{pkg}-el
Summary:        Elisp source files for %{pkgname} under XEmacs
Group:          Development/Libraries
Requires:       xemacs-%{pkg} = %{version}-%{release}

%description -n xemacs-%{pkg}-el
This package contains the elisp source files for %{pkgname} under
XEmacs. You do not need to install this package to run
%{pkgname}. Install the xemacs-%{pkg} package to use %{pkgname} with
XEmacs.


%prep
%setup -q -n %{pkg}-mode-%{version}
%patch0 -p1
for f in HISTORY README LISEZMOI; do
  mv $f $f.old; iconv -f iso-8859-1 -t utf-8 < $f.old > $f
done

%build
# 'append-tuareg.el' and 'custom-tuareg.el' are example config
# files, so they will end up in the documentation directory.
# 'sym-lock.el' is broken.
emacs --no-site-file -q -batch -L . -f batch-byte-compile \
  tuareg.el camldebug.el


%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/%{emacs_lispdir}/%{pkg}
#mkdir -p $RPM_BUILD_ROOT/%{emacs_startdir}
install -m 0644 tuareg.el camldebug.el tuareg.elc camldebug.elc \
  $RPM_BUILD_ROOT/%{emacs_lispdir}/%{pkg}/

mkdir -p $RPM_BUILD_ROOT/%{xemacs_lispdir}/%{pkg}
#mkdir -p $RPM_BUILD_ROOT/%{xemacs_startdir}
install -m 0644 tuareg.el camldebug.el tuareg.elc camldebug.elc \
  $RPM_BUILD_ROOT/%{xemacs_lispdir}/%{pkg}/


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc COPYING HISTORY LISEZMOI README append-tuareg.el custom-tuareg.el


%files -n emacs-%{pkg}
%defattr(-,root,root,-)
%doc COPYING
%{emacs_lispdir}/%{pkg}/*.elc
#%{emacs_startdir}/*.el
%dir %{emacs_lispdir}/%{pkg}


%files -n emacs-%{pkg}-el
%defattr(-,root,root,-)
%doc COPYING
%{emacs_lispdir}/%{pkg}/*.el


%files -n xemacs-%{pkg}
%defattr(-,root,root,-)
%doc COPYING
%{xemacs_lispdir}/%{pkg}/*.elc
#%{xemacs_startdir}/*.el
%dir %{xemacs_lispdir}/%{pkg}


%files -n xemacs-%{pkg}-el
%defattr(-,root,root,-)
%doc COPYING
%{xemacs_lispdir}/%{pkg}/*.el


%changelog
* Wed Aug 12 2009 Richard W.M. Jones <rjones@redhat.com> - 1.45.6-9
- Improve description (RHBZ#516997).

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.45.6-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.45.6-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Apr 30 2008 Richard W.M. Jones <rjones@redhat.com> - 1.45.6-6
- Add runtime requires ocaml-emacs, because tuareg mode uses the file
  caml-types.el in order to do type annotation (C-c C-t).

* Sat Apr 19 2008 Richard W.M. Jones <rjones@redhat.com> - 1.45.6-5
- Add commas in dependencies & rebuild.

* Thu Feb 21 2008 Richard W.M. Jones <rjones@redhat.com> - 1.45.6-4
- Disable sym-lock in xemacs - this fixes xemacs support.

* Wed Feb 20 2008 Richard W.M. Jones <rjones@redhat.com> - 1.45.6-3
- Reenable support for xemacs.

* Tue Feb 19 2008 Richard W.M. Jones <rjones@redhat.com> - 1.45.6-1
- Initial RPM release.