# For Haskell Packaging Guidelines see: # - https://fedoraproject.org/wiki/Packaging:Haskell # - https://fedoraproject.org/wiki/PackagingDrafts/Haskell %global pkg_name Agda # common part of summary for all the subpackages %global common_summary Agda dependently type programming language library # main description used for all the subpackages %global common_description Agda is a dependently typed functional programming language: it has\ inductive families, which are similar to Haskell's GADTs, but they can\ be indexed by values and not just types. It also has parameterized\ modules, mixfix operators, Unicode characters, and an interactive\ Emacs interface (the type checker can assist in the development of your code).\ \ Agda is also a proof assistant: It is an interactive system for writing and\ checking proofs. Agda is based on intuitionistic type theory,\ a foundational system for constructive mathematics developed by\ the Swedish logician Per Martin-Löf. It has many similarities with other\ proof assistants based on dependent types, such as Coq, Epigram and NuPRL.\ \ \ Name: ghc-%{pkg_name} Version: 2.2.10 Release: 2%{?dist} Summary: Dependently typed functional programming language Group: Development/Languages License: MIT URL: http://hackage.haskell.org/package/%{pkg_name} Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz Source1: agda-mode-init.el # fedora ghc archs: no QuickCheck on ppc64 ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9 BuildRequires: ghc-Cabal-devel # macros for building haskell packages BuildRequires: ghc-rpm-macros BuildRequires: hscolour BuildRequires: ghc-array-prof, ghc-base-prof, ghc-binary-prof, ghc-bytestring-prof, ghc-containers-prof, ghc-directory-prof, ghc-filepath-prof, ghc-haskeline-prof, ghc-haskell-src-exts-prof, ghc-mtl-prof, ghc-old-time-prof, ghc-pretty-prof, ghc-process-prof, ghc-QuickCheck-prof, ghc-syb-prof, ghc-xhtml-prof, ghc-zlib-prof BuildRequires: happy, alex BuildRequires: emacs-haskell-mode Patch1: Agda-2.2.10-deps-everythingBut.patch %description %{common_description} For Emacs mode install emacs-agda. If you want to use the command-line program (agda), then you should also install Agda-executable. %package -n emacs-agda Summary: Emacs mode for the Agda language Group: Applications/Editors Requires: ghc-%{pkg_name}-devel Requires: emacs-haskell-mode Requires: emacs(bin) >= %{_emacs_version} %description -n emacs-agda %{common_description} %package -n emacs-agda-el Summary: Elisp source files for Agda emacs mode Group: Applications/Editors Requires: emacs-agda = %{version}-%{release} %description -n emacs-agda-el %{common_description} %prep %setup -q -n %{pkg_name}-%{version} %patch1 -p1 -b .orig %build %ghc_lib_build %global elisp_files eri.el agda-input.el annotation.el agda2-highlight.el agda2-abbrevs.el agda2-mode.el agda2.el cd src/data/emacs-mode for i in %elisp_files; do %{_emacs_bytecompile} $i done cd - %install %ghc_lib_install mkdir -p %{buildroot}%{_emacs_sitelispdir}/agda for i in %elisp_files; do install -p -m 0644 src/data/emacs-mode/$i* %{buildroot}%{_emacs_sitelispdir}/agda done mkdir -p %{buildroot}%{_emacs_sitestartdir} install -p -m 0644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir} rm %{buildroot}%{_bindir}/agda-mode rm -r %{buildroot}%{_datadir}/%{pkg_name}-%{version}/EpicInclude rm -r %{buildroot}%{_datadir}/%{pkg_name}-%{version}/emacs-mode echo "%doc LICENSE doc/release-notes" >> ghc-%{pkg_name}.files echo %{_datadir}/%{pkg_name}-%{version}/Agda.css >> ghc-%{pkg_name}.files # define the shared, devel and prof subpkgs, devel scripts, # and filelists ghc-Agda{,-devel,-prof}.files %ghc_lib_package %files -n emacs-agda %defattr(-,root,root,-) %doc README %dir %{_emacs_sitelispdir}/agda %{_emacs_sitelispdir}/agda/*.elc %{_emacs_sitestartdir}/*.el %files -n emacs-agda-el %defattr(-,root,root,-) %{_emacs_sitelispdir}/agda/*.el %changelog * Fri Jun 3 2011 Jens Petersen - 2.2.10-2 - also BR alex, happy, and emacs-haskell-mode * Thu Jun 2 2011 Jens Petersen - 2.2.10-1 - MIT license - add deps and description - emacs mode subpackages * Thu Jun 2 2011 Fedora Haskell SIG - 2.2.10-0 - initial packaging for Fedora automatically generated by cabal2spec-0.23