# This is an RPM spec file that specifies how to package # haskell-mode for Red Hat Linux and, possibly, similar systems. # It has been tested on Fedora Core 3. # # If this file is part of a tarball, you can build RPMs directly from # the tarball by using the following command: # # rpm -ta haskell-mode-(VERSION).tar.gz # # The resulting package will be placed in the RPMS/noarch subdirectory # of your RPM build directory (usually /usr/src/redhat or ~/rpm), with # the name emacs-haskell-mode-(VERSION)-(RELEASE).noarch.rpm. A # corresponding source RPM package will be in the SRPMS subdirectory. # # NOTE TO HASKELL MODE MAINTAINERS: When you release a new version of # Haskell mode, update the version definition below to match the # version label of your release tarball. %define name emacs-haskell-mode %define version 2.3 %define release 1.tgm Summary: Haskell editing mode for Emacs Name: %{name} Version: %{version} Release: %{release} License: GPL (?) Group: Applications/Editors Source: http://www.haskell.org/haskell-mode/haskell-mode-%{version}.tar.gz URL: http://www.haskell.org/haskell-mode/ Packager: Tom Moertel BuildRoot: %{_tmppath}/%{name}-root Prefix: %{_prefix} BuildArchitectures: noarch BuildRequires: emacs Requires: emacs %description This package adds a Haskell major mode to Emacs. The Haskell mode supports font locking, declaration scanning, documentation, indentation, and interaction with Hugs and GHCi. The basic mode was written by Graeme E Moss, Tommy Thorn and Simon Marlow. The modules that provide additional features are maintained by their respective authors. %prep %setup -n haskell-mode-%{version} %build emacs --no-site-file --batch --eval '(progn (setq load-path (cons "." load-path)))' -f batch-byte-compile *.el # create an init file that is loaded when a user starts up emacs to # tell emacs to use Haskell mode for editing Haskell files cat > haskell-mode-init.el <<"EOF" ;;; Set up Haskell mode for Emacs. ;;; ;;; This file is automatically loaded by emacs's site-start.el ;;; when you start a new emacs session. (load "haskell-site-file") EOF # create a README.RPM file to document any quirks of this package cat > README.RPM < EOF %install rm -rf ${RPM_BUILD_ROOT} INSTDIR=${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/haskell-mode install -m 755 -d $INSTDIR install -m 644 *.el $INSTDIR install -m 644 *.elc $INSTDIR INITDIR=${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/site-start.d install -m 755 -d $INITDIR install -m 644 haskell-mode-init.el $INITDIR/haskell-mode-init.el %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root) %doc README.RPM NEWS ChangeLog README %dir %{_datadir}/emacs/site-lisp/haskell-mode %{_datadir}/emacs/site-lisp/haskell-mode/* %{_datadir}/emacs/site-lisp/site-start.d/* %changelog * Wed Feb 14 2007 - 2.3-1.tgm - Updated to haskell-mode 2.3 * Mon Feb 12 2007 - 2.2-2.tgm - Removed version suffix from package's site-lisp subdirectory - Switched to using the default site file from the haskell-mode tarball * Mon Feb 12 2007 - 2.2-1.tgm - Updated to haskell-mode 2.2 - Added NEWS, ChangeLog, and README to package docs * Wed Nov 9 2005 Tom Moertel - 2.1-1.tgm - Updated for haskell-mode 2.1 * Mon Apr 25 2005 Tom Moertel - 2.0-1.tgm - Updated for haskell-mode 2.0 * Sat Nov 13 2004 Tom Moertel 1.45-2.tgm - Merged changes from Carwyn Edwards : - Fixed permissions on installed files. - Install non bytecode compiled versions too. - Rewrote emacs byte compilation method. * Mon May 3 2004 1.45-1.tgm - Updated to 1.45 of haskell-mode. - Made GHCi the default for interactive mode (instead of Hugs) * Wed Nov 6 2002 - Removed prompt and alignment patches because they are now merged into the main distribution. * Mon Sep 2 2002 - Revised patch to handle ModuleA ModuleB ... > prompts * Sat Aug 31 2002 - Added patch to handle new *ModuleName> prompts * Tue Jul 23 2002 - Added support for aligning rhsides on a given column. * Fri Mar 22 2002 Tom Moertel - Created spec file - Added README.RPM - Added site-lisp/site-start.d init file for emacs-haskell-mode.