LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File emacs-ess.spec of Package emacs-ess (Project devel:languages:R:supplement)

# This is an RPM spec file that specifies how to package
# ESS for Suse Linux, at least versions later than 10.0
# (older 9.x Version should work also!)
# Most of the work was done by Tom Moertel (tom-rpms@moertel.com),
# only distribution specific quirks were needed to get it to work on SuSE

Summary: Emacs Speaks Statistics add-on package for Emacs
Name: emacs-ess
Version: 13.09.1
Release: 1
License: GPL-2.0
Group: Development/Languages/Other
#Source: http://ESS.R-project.org/downloads/ess/ess-%{version}.tgz
SOURCE: ess-%{version}.tgz
URL: http://ess.r-project.org/
#Packager: Detlef Steuer steuer@hsu-hh.de
#BuildRoot: %{_tmppath}/%{name}-root
#Prefix: %{_prefix}
BuildArchitectures: noarch
PreReq: %install_info_prereq
BuildRequires: emacs-nox
BuildRequires: texinfo 
BuildRequires: fdupes
%if %suse_version <=1020
BuildRequires: tetex
%endif
%if %suse_version > 1020
%if %suse_version <= 1230
BuildRequires: texlive-bin-latex, texlive-bin
%endif
%if %suse_version > 1230
#BuildRequires: texlive-latex
BuildRequires: texlive-texinfo
#BuildRequires: makeinfo
%endif
%endif

Requires: emacs

%description
This package provides Emacs Speaks Statistics (ESS), which provides
Emacs-based front ends for popular statistics packages.

ESS provides an intelligent, consistent interface between the user and
the software.  ESS interfaces with R, julia, S-PLUS, SAS, BUGS and other
statistical analysis packages under the Unix, Microsoft Windows, and
Apple Mac OS operating systems.  ESS is a package for the GNU Emacs
and XEmacs text editors whose features ESS uses to streamline the
creation and use of statistical software.  ESS knows the syntax and
grammar of statistical analysis packages and provides consistent
display and editing features based on that knowledge.  ESS assists in
interactive and batch execution of statements written in these
statistical analysis languages.

%prep
%setup -n ess-%{version}
( cd doc && chmod u+w html info refcard) # fix perms to ensure builddir can be deleted

%build
make

#%{__rm} -r %{_datadir}/doc/packages/emacs-ess/doc

# create an init file that is loaded when a user starts up emacs to
# tell emacs to autoload our package's Emacs code when needed
cat > %{name}-init.el <<EOF
;;; Set up %{name} for Emacs.
;;;
;;; This file is automatically loaded by emacs's site-start.el
;;; when you start a new emacs session.

(require 'ess-site)

EOF
# SuSE hat einen anderen Mechanismus: alle Dateien in %emacspkgdir 
# mit suse-start-.*el werden ausgeführt

#mv %{name}-init.el suse-start-ess.el

# create a README.RPM file to document any quirks of this package
cat > README.RPM <<EOF
README for %{name}-%{version}-%{release} RPM package

Generally, there will be no need to modify your .emacs file in order
to use the features of this package -- they are enabled by default
when you start Emacs.

Thanks to Tom Moertel for the spec file included in the ess source distribution.
Only minor modifications were needed to get it to work on SuSE.

Cheers,
Detlef

--
Detlef Steuer <steuer@hsu-hh.de>
EOF



%install
INITDIR=${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp
PKGLISP=${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/%{name}-%{version}
INFODIR=${RPM_BUILD_ROOT}%{_infodir}
DOCDIR=${RPM_BUILD_ROOT}%{_datadir}/doc/packages/emacs-ess
%{__install} -m 755 -d $INITDIR
%{__install} -m 644 %{name}-init.el $INITDIR/suse-start-%{name}-init.el
%{__install} -m 755 -d $PKGLISP
%{__install} -m 755 -d $INFODIR
%{__install} -m 755 -d $DOCDIR



%{__make} install \
          PREFIX=${RPM_BUILD_ROOT}%{_prefix} \
          LISPDIR=$PKGLISP \
          INFODIR=$INFODIR \
          ETCDIR=$PKGLISP/etc \
          DOCDIR=$DOCDIR


%{__rm} -f $INFODIR/dir # don't package but instead update in pre and post
%{__cp} -a etc $PKGLISP # took ess's /etc into lisp dir for easy transport

#%fdupes %{buildroot}%{_prefix}

# Uncomment to print the README file after install.
#
# %post
# echo
# cat %{_defaultdocdir}/%{name}-%{version}/README.RPM
# echo

%clean
#%{__rm} -rf ${RPM_BUILD_ROOT}


%files
%defattr(-,root,root)
%doc README README.RPM ANNOUNCE COPYING VERSION ChangeLog
# doc
%dir %{_datadir}/emacs/site-lisp/%{name}-%{version}
%{_datadir}/emacs/site-lisp/%{name}-%{version}/*
%{_datadir}/emacs/site-lisp/suse-start-emacs-ess-init.el
%{_infodir}/*.gz

%post
%install_info --info-dir=%{_infodir} /usr/share/info/ess.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} /usr/share/info/ess.info.gz

%changelog
* Wed Jul 14 2010  Detlef Steuer <steuer@hsu-hh.de> 5.11
- Upstream releases 5.11

* Thu Jun 10 2010  Detlef Steuer <steuer@hsu-hh.de> 5.10
- Upstream releases 5.10

* Tue Jun 9 2009 Detlef Steuer <steuer@hsu-hh.de> 5.4
- Update for 5.4

* Wed Mar 11 2009 Detlef Steuer <steuer@hsu-hh.de> 5.3.11
- Update for 5.3.11 and Opensuse 11.1 
- Use Docdir ideas from Daniel Sabanes <daniel.sabanesbove@gmx.net>

* Fri Oct 17 2008 Detlef Steuer <steuer@hsu-hh.de> 5.3.8 
- Update for ESS 5.3.8

* Sat Dec 17 2005 Tom Moertel <thor@bifur.lab01.moertel.com> - 5.2.11-1.tgm
- Updated for ESS 5.2.11.

* Mon Sep 12 2005 Tom Moertel <thor@bifur.lab01.moertel.com> - 5.2.10-1.tgm
- Updated to ESS 5.2.10
- Changed Copyright tag to License
- Added texinfo to BuildRequires

* Thu May 12 2005 Tom Moertel <thor@bifur.lab01.moertel.com> - 5.2.8-1.tgm
- Updated to ESS 5.2.8

* Mon Apr 18 2005 Tom Moertel <thor@bifur.lab01.moertel.com> - 5.2.7-1.tgm
- Updated to 5.2.7

* Tue Feb  1 2005 Tom Moertel <thor@bifur.lab01.moertel.com> - 5.2.5-1.tgm
- Updated for ESS 5.2.5.

* Thu Jan 13 2005 Tom Moertel <thor@bifur.lab01.moertel.com> - 5.2.4-1.tgm
- Updated for ESS 5.2.4.

* Sat Nov 13 2004 Tom Moertel <thor@bifur.lab01.moertel.com> 5.2.3-2.tgm
- Fixed permissions on ...-init.el file

* Fri Oct 15 2004 Tom Moertel <thor@bifur.lab01.moertel.com> 5.2.3-1.tgm
- Updated to ESS 5.2.3.

* Fri Aug 27 2004 Tom Moertel <thor@bifur.lab01.moertel.com> 5.2.2-3.tgm
- Updated ESS URL.
- Fixed Summary.

* Fri Aug 27 2004 Tom Moertel <thor@bifur.lab01.moertel.com> 5.2.2-2.tgm
- Fixed bug: Forgot to include ESS's etc/ directory.

* Thu Aug 26 2004 Tom Moertel <thor@bifur.lab01.moertel.com> 5.2.2-1.tgm
- Initial build.