diff --git a/alex.spec b/alex.spec index bed42fa..e584984 100644 --- a/alex.spec +++ b/alex.spec @@ -1,24 +1,33 @@ +# +# spec file for package ghc-X11 +# +# Copyright (c) 2005-2009 Herbert Graeber +# +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# + +# norootforbuild + +# ghc does not emit debug information +%global debug_package %{nil} + Name: alex -Summary: The lexer generator for Haskell Version: 2.3.1 Release: 0 -License: BSD3 +Summary: The lexer generator for Haskell Group: Development/Languages/Haskell -Packager: Herbert Graeber +License: BSD3 URL: http://www.haskell.org/alex/ -Source: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.bz2 -%if 0%suse_version >= 1030 +Source: %{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: licenses -%endif BuildRequires: ghc BuildRequires: libxslt BuildRequires: sgml-skel BuildRequires: docbook-xsl-stylesheets BuildRequires: docbook-utils -%if 0%suse_version >= 1030 BuildRequires: licenses -%endif -BuildRoot: %{_tmppath}/%{name}-%{version}-root Prefix: /usr %description @@ -26,61 +35,66 @@ Alex is a tool for generating lexical analysers in Haskell, given a description of the tokens to be recognised in the form of regular expressions. It is similar to the tool 'lex' or 'flex' for C/C++. -%description -l de -Alex ist ein Tool zum Erzeugen von lexkialischen Analysatoren. Er erzeugt -aus eine Beschreibung von Symbolen durch reguläre Ausdrücke ein -Haskell-Modul, das aus einem Text eine Folge von Symbolen erzeugt. Alex ist -ein vergleichbar mit 'lex' bzw. 'flex' für C und C++. %package doc Summary: Alex Documentation Group: Development/Languages/Haskell +Requires: %{name} = %{version} %description doc +Alex is a tool for generating lexical analysers in Haskell, given a +description of the tokens to be recognised in the form of regular +expressions. It is similar to the tool 'lex' or 'flex' for C/C++. + This is the documentation for Alex, a lexical analyser generator for Haskell. -%description doc -l de -Dieses ist Dokumentation für Alex. %prep %setup -q + %build -export CFLAGS="$RPM_OPT_FLAGS" -runhaskell Setup.lhs configure --prefix=%{_prefix} --libdir=%{_libdir} \ - --libexecdir=%{_libexecdir} --datadir=%{_datadir} --docdir=%{_docdir}/%{name} -runhaskell Setup.lhs build -cd doc -test -f configure || autoreconf -./configure +%cabal_configure --docdir=%{_docdir}/alex +%cabal build +pushd doc +autoreconf +./configure --prefix=%{_prefix} --libdir=%{_libdir} make html +popd %install -%if 0%suse_version >= 1030 +rm -rf $RPM_BUILD_ROOT +%cabal_install +mkdir -p %{buildroot}%{_datadir}/doc/ghc/%{name} +cp -r doc %{buildroot}%{_datadir}/doc/ghc/%{name} for FILE in LICENSE ; do - MD5SUM=$(md5sum $FILE | sed 's/ .*//') + MD5SUM=$(md5sum $FILE | sed 's/ .*//') if test -f /usr/share/doc/licenses/md5/$MD5SUM ; then ln -sf /usr/share/doc/licenses/md5/$MD5SUM $FILE fi done -%endif -runhaskell Setup.lhs copy --destdir=${RPM_BUILD_ROOT} + + +%clean +rm -rf $RPM_BUILD_ROOT + %files -%defattr (-,root,root) -%doc ANNOUNCE -%doc LICENSE -%doc README -%doc TODO -%{_bindir}/alex -%{_datadir}/alex-%{version} +%defattr(-,root,root) +%doc ANNOUNCE LICENSE README TODO examples +%{_bindir}/%{name} +%{_datadir}/%{name}-%{version} + %files doc %defattr (-,root, root) -%doc examples -%doc doc/alex +%{_datadir}/doc/ghc/%{name} + %changelog +* Sat Feb 28 2009 Herbert Graeber - 2.3.1 +- Changed to haskell packaging conventions + * Wed Dec 4 2008 Herbert Graeber 2.3.1 - Update to version 2.3.1