From 8f30ddcd87286d5d676122696b28e908d00504a4 Mon Sep 17 00:00:00 2001 From: alexlan Date: Nov 19 2007 21:51:07 +0000 Subject: New package: Emacs Speaks Statistics --- diff --git a/.cvsignore b/.cvsignore index e69de29..7bc032b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +ess-5.3.6.tgz diff --git a/emacs-common-ess.spec b/emacs-common-ess.spec new file mode 100644 index 0000000..ae3d550 --- /dev/null +++ b/emacs-common-ess.spec @@ -0,0 +1,265 @@ +%define pkg ess +%define pkgname Emacs Speaks Statistics + +# 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: 5.3.6 +Release: 2%{?dist} +Summary: %{pkgname} add-on package for Emacs + +Group: Applications/Editors +License: GPLv2+ +URL: http://ESS.R-project.org/ +Source0: http://ESS.R-project.org/downloads/ess/ess-%{version}.tgz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch +BuildRequires: emacs emacs-el +BuildRequires: xemacs-devel xemacs-packages-extra +Requires(post): /sbin/install-info +Requires(preun): /sbin/install-info + +%description + +%{pkgname} (ESS) is an add-on package for GNU Emacs and XEmacs. +It provides Emacs-based front ends for popular statistics packages. + +ESS provides an intelligent, consistent interface between the user and +the software. ESS interfaces with S-PLUS, R, 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. + +This package contains the files common to both the GNU Emacs and +XEmacs %{pkgname} packages. + +%package -n emacs-%{pkg} +Summary: Compiled elisp files to run %{pkgname} under GNU Emacs +Group: Applications/Editors +Requires: emacs(bin) >= %{emacs_version} +Requires: emacs-common-%{pkg} = %{version}-%{release} + +%description -n emacs-%{pkg} +This package contains the byte compiled elisp packages to run +%{pkgname} with GNU Emacs. + + +%package -n emacs-%{pkg}-el +Summary: Elisp source files for %{pkgname} under GNU Emacs +Group: Applications/Editors +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: Applications/Editors +Requires: xemacs(bin) >= %{xemacs_version} +Requires: emacs-common-%{pkg} = %{version}-%{release} + +%description -n xemacs-%{pkg} +This package contains the byte compiled elisp packages to use +%{pkgname} with XEmacs. + + +%package -n xemacs-%{pkg}-el +Summary: Elisp source files for %{pkgname} under XEmacs +Group: Applications/Editors +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}-%{version} +( cd doc && chmod u+w html info ) # fix perms to ensure builddir can be deleted + +%build +## first build GNU Emacs +for D in lisp etc +do + cd $D + make + cd - +done + +## don't build PDF or PS +cd doc +make docs +cd - + + +# 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 + + +%install +rm -rf $RPM_BUILD_ROOT + +## now install GNU Emacs elisp + +INITDIR=${RPM_BUILD_ROOT}%{emacs_startdir} +PKGLISP=${RPM_BUILD_ROOT}%{emacs_lispdir}/%{pkg} +ETCDIR=${PKGLISP}/etc +INFODIR=${RPM_BUILD_ROOT}%{_infodir} + +%{__install} -m 755 -d $INITDIR +%{__install} -m 644 %{name}-init.el $INITDIR/%{pkg}-init.el +%{__install} -m 755 -d $PKGLISP +%{__install} -m 755 -d $INFODIR +%{__make} install \ + PREFIX=${RPM_BUILD_ROOT}%{_prefix} \ + LISPDIR=$PKGLISP \ + INFODIR=$INFODIR \ + ETCDIR=$ETCDIR \ + ETCFILES="backbug? *.S ess-sas-sh-command config.guess" +%{__rm} -f $INFODIR/dir # don't package but instead update in pre and post +%{__mv} $PKGLISP/ChangeLog ChangeLog.lisp + +## now build and XEmacs elisp + +make clean + +INITDIR=${RPM_BUILD_ROOT}%{xemacs_startdir} +PKGLISP=${RPM_BUILD_ROOT}%{xemacs_lispdir}/%{pkg} +ETCDIR=${PKGLISP}/etc +INFODIR=${RPM_BUILD_ROOT}%{_infodir} + +for D in lisp etc +do + cd $D + make EMACS=xemacs + cd - +done + + +%{__install} -m 755 -d $INITDIR +%{__install} -m 644 %{name}-init.el $INITDIR/%{pkg}-init.el +%{__install} -m 755 -d $PKGLISP +%{__install} -m 755 -d $INFODIR +%{__make} install \ + PREFIX=${RPM_BUILD_ROOT}%{_prefix} \ + LISPDIR=$PKGLISP \ + INFODIR=$INFODIR \ + ETCDIR=$ETCDIR \ + ETCFILES="backbug? *.S ess-sas-sh-command config.guess" +%{__rm} -f $INFODIR/dir # don't package but instead update in pre and post +## remove ChangeLog in lisp subdir completely here (already packaged in -common) +%{__rm} $PKGLISP/ChangeLog + +## now fix permissions on doc files that aren't UTF-8 +for i in ChangeLog ChangeLog.lisp doc/TODO +do + /usr/bin/iconv -f iso8859-1 -t utf-8 $i > $i.conv && /bin/mv -f $i.conv $i +done + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%post +/sbin/install-info %{_infodir}/ess.info.gz %{_infodir}/dir || : + + +%preun +if [ $1 = 0 ]; then + /sbin/install-info --delete %{_infodir}/ess.info.gz \ + %{_infodir}/dir || : +fi + + +%files +%defattr(-,root,root,-) +%doc README ANNOUNCE COPYING VERSION ChangeLog doc ChangeLog.lisp +%doc fontlock-test +%doc LDA +%doc etc/sas-keys.* +%doc etc/function-outline.S +%doc etc/R-ESS-bugs.R +%doc etc/other +%doc %{_infodir}/*.gz + +%files -n emacs-%{pkg} +%defattr(-,root,root,-) +%{emacs_lispdir}/%{pkg}/*.elc +%{emacs_lispdir}/%{pkg}/etc +%{emacs_startdir}/*.el +%dir %{emacs_lispdir}/%{pkg} + + +%files -n emacs-%{pkg}-el +%defattr(-,root,root,-) +%{emacs_lispdir}/%{pkg}/*.el + + +%files -n xemacs-%{pkg} +%defattr(-,root,root,-) +%{xemacs_lispdir}/%{pkg}/*.elc +%{xemacs_lispdir}/%{pkg}/etc +%{xemacs_startdir}/*.el +%dir %{xemacs_lispdir}/%{pkg} + + +%files -n xemacs-%{pkg}-el +%defattr(-,root,root,-) +%{xemacs_lispdir}/%{pkg}/*.el + + +%changelog +* Sun Nov 18 2007 - 5.3.6-2 +- Moved all non-code related files in etc/ to documentation directory +- Make sure all doc files are UTF-8 +- Fix post, preun scriptlets and add Requires for installing info + files + +* Tue Nov 13 2007 - 5.3.6-1 +- Initial packaging, borrowed some elements of package by Tom Moertel + \ No newline at end of file diff --git a/sources b/sources index e69de29..4844657 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +7c6d38cc359c35c4380997e07c1d4575 ess-5.3.6.tgz