From Fedora Project Wiki
< PackagingDrafts | Haskell
(replaced it with X11) |
No edit summary |
||
Line 8: | Line 8: | ||
%define hsc_name ghc | %define hsc_name ghc | ||
%define hsc_version 6.8.2 | %define hsc_version 6.8.2 | ||
%define pkg_name xmonad-contrib | |||
%define | %define pkg_libdir %{_libdir}/%{hsc_name}-%{hsc_version}/%{pkg_name}-%{version} | ||
%define pkg_libdir %{_libdir}/%{hsc_name}-%{hsc_version}/%{ | |||
%define debug_package %{nil} | %define debug_package %{nil} | ||
#Haskell compilers do not traditionally emit DWARF data. | #Haskell compilers do not traditionally emit DWARF data. | ||
Name: %{hsc_name}-%{ | Name: %{hsc_name}-%{pkg_name} | ||
Version: | Version: 0.7 | ||
Release: | Release: 3%{?dist} | ||
License: BSD | License: BSD | ||
Group: | Group: User Interface/X | ||
URL: http:// | URL: http://xmonad.org/ | ||
Source: http://hackage.haskell.org/packages/archive/ | Source: http://hackage.haskell.org/packages/archive/xmonad-contrib/0.7/xmonad-contrib-0.7.tar.gz | ||
Summary: | Summary: Third party extensions for xmonad | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
Requires: ghc = %{hsc_version} | |||
Requires: xmonad = %{version}, ghc-xmonad = %{version} | |||
BuildRequires: ghc682-prof | BuildRequires: ghc = %{hsc_version}, ghc682-prof, haddock | ||
BuildRequires: ghc-x11 = 1.4.1, ghc-x11-prof = 1.4.1 | |||
BuildRequires: ghc-xmonad = %{version}, ghc-xmonad-prof = %{version} | |||
%description | %description | ||
Third party tiling algorithms, configurations and scripts to xmonad, | |||
a tiling window manager for X. | |||
For an introduction to building, configuring and using xmonad | |||
extensions, see "XMonad.Doc". In particular: | |||
"XMonad.Doc.Configuring", a guide to configuring xmonad | |||
"XMonad.Doc.Extending", using the contributed extensions library | |||
%package -n %{hsc_name}-%{ | "XMonad.Doc.Developing", introduction to xmonad internals and writing | ||
Summary: Profiling libraries for %{hsc_name}-%{ | your own extensions. | ||
%package -n %{hsc_name}-%{pkg_name}-prof | |||
Summary: Profiling libraries for %{hsc_name}-%{pkg_name} | |||
Group: Development/Libraries | Group: Development/Libraries | ||
Requires: %{hsc_name}-%{ | Requires: %{hsc_name}-%{pkg_name} = %{version} | ||
%description -n %{hsc_name}-%{pkg_name}-prof | |||
Third party tiling algorithms, configurations and scripts to xmonad, | |||
a tiling window manager for X. | |||
For an introduction to building, configuring and using xmonad | |||
extensions, see "XMonad.Doc". In particular: | |||
"XMonad.Doc.Configuring", a guide to configuring xmonad | |||
"XMonad.Doc.Extending", using the contributed extensions library | |||
"XMonad.Doc.Developing", introduction to xmonad internals and writing | |||
your own extensions. | |||
This package contains profiling libraries for %{hsc_name} %{hsc_version}. | This package contains profiling libraries for %{hsc_name} %{hsc_version}. | ||
Line 59: | Line 72: | ||
%prep | %prep | ||
%setup -q -n %{ | %setup -q -n %{pkg_name}-%{version} | ||
%build | %build | ||
%ghc_autotools -l -p enable | |||
%ghc_build | |||
%ghc_haddock | |||
%ghc_gen_scripts | |||
%install | %install | ||
rm -rf ${RPM_BUILD_ROOT} | rm -rf ${RPM_BUILD_ROOT} | ||
%ghc_install | |||
%ghc_install_scripts | |||
%ghc_gen_filelists %{name} | |||
cd ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{hsc_name}-%{ | cd ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{hsc_name}-%{pkg_name}-%{version} | ||
rm -rf doc LICENSE | rm -rf doc LICENSE README | ||
Line 96: | Line 97: | ||
%pre | %pre | ||
%ghc_preinst_script | |||
%post | %post | ||
% | %ghc_postinst_script | ||
%preun | %preun | ||
% | %ghc_preun_script | ||
%postun | %postun | ||
%ghc_postun_script | |||
%files -f %{name}-files | %files -f %{name}-files | ||
%doc dist/doc/html | %doc dist/doc/html | ||
%doc LICENSE | %doc LICENSE README | ||
%files -n %{hsc_name}-%{ | %files -n %{hsc_name}-%{pkg_name}-prof -f %{name}-files.prof | ||
%%doc LICENSE | %%doc LICENSE | ||
%changelog | %changelog | ||
* | * Wed Aug 13 2008 Yaakov M. Nemoy <yankee@koan> - 0.7-3 | ||
- | - added URL | ||
- changed Group from default | |||
- | |||
- | |||
- | * Wed Aug 13 2008 Yaakov M. Nemoy <yankee@koan> - 0.7-2 | ||
- adds requirements list | |||
* | * Wed Aug 13 2008 cabal-rpm <cabal-devel@haskell.org> - 0.7-1 | ||
- spec file autogenerated by cabal-rpm | - spec file autogenerated by cabal-rpm | ||
</pre> | </pre> |
Revision as of 14:33, 13 August 2008
Library Only Template
This is a sample spec file for a Haskell Cabal package. This sample demonstrates how to package a Haskell Cabal package that is only a library. It was generated automatically using cabal-rpm. It contains a few minor bugs, including missing dependency declarations. This is due to a limitation in cabal-rpm that needs to be fixed.
Consequently, it's been edited. The changes can be seen in the changelog below.
%define hsc_name ghc %define hsc_version 6.8.2 %define pkg_name xmonad-contrib %define pkg_libdir %{_libdir}/%{hsc_name}-%{hsc_version}/%{pkg_name}-%{version} %define debug_package %{nil} #Haskell compilers do not traditionally emit DWARF data. Name: %{hsc_name}-%{pkg_name} Version: 0.7 Release: 3%{?dist} License: BSD Group: User Interface/X URL: http://xmonad.org/ Source: http://hackage.haskell.org/packages/archive/xmonad-contrib/0.7/xmonad-contrib-0.7.tar.gz Summary: Third party extensions for xmonad BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: ghc = %{hsc_version} Requires: xmonad = %{version}, ghc-xmonad = %{version} BuildRequires: ghc = %{hsc_version}, ghc682-prof, haddock BuildRequires: ghc-x11 = 1.4.1, ghc-x11-prof = 1.4.1 BuildRequires: ghc-xmonad = %{version}, ghc-xmonad-prof = %{version} %description Third party tiling algorithms, configurations and scripts to xmonad, a tiling window manager for X. For an introduction to building, configuring and using xmonad extensions, see "XMonad.Doc". In particular: "XMonad.Doc.Configuring", a guide to configuring xmonad "XMonad.Doc.Extending", using the contributed extensions library "XMonad.Doc.Developing", introduction to xmonad internals and writing your own extensions. %package -n %{hsc_name}-%{pkg_name}-prof Summary: Profiling libraries for %{hsc_name}-%{pkg_name} Group: Development/Libraries Requires: %{hsc_name}-%{pkg_name} = %{version} %description -n %{hsc_name}-%{pkg_name}-prof Third party tiling algorithms, configurations and scripts to xmonad, a tiling window manager for X. For an introduction to building, configuring and using xmonad extensions, see "XMonad.Doc". In particular: "XMonad.Doc.Configuring", a guide to configuring xmonad "XMonad.Doc.Extending", using the contributed extensions library "XMonad.Doc.Developing", introduction to xmonad internals and writing your own extensions. This package contains profiling libraries for %{hsc_name} %{hsc_version}. %prep %setup -q -n %{pkg_name}-%{version} %build %ghc_autotools -l -p enable %ghc_build %ghc_haddock %ghc_gen_scripts %install rm -rf ${RPM_BUILD_ROOT} %ghc_install %ghc_install_scripts %ghc_gen_filelists %{name} cd ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{hsc_name}-%{pkg_name}-%{version} rm -rf doc LICENSE README %clean rm -rf ${RPM_BUILD_ROOT} %pre %ghc_preinst_script %post %ghc_postinst_script %preun %ghc_preun_script %postun %ghc_postun_script %files -f %{name}-files %doc dist/doc/html %doc LICENSE README %files -n %{hsc_name}-%{pkg_name}-prof -f %{name}-files.prof %%doc LICENSE %changelog * Wed Aug 13 2008 Yaakov M. Nemoy <yankee@koan> - 0.7-3 - added URL - changed Group from default * Wed Aug 13 2008 Yaakov M. Nemoy <yankee@koan> - 0.7-2 - adds requirements list * Wed Aug 13 2008 cabal-rpm <cabal-devel@haskell.org> - 0.7-1 - spec file autogenerated by cabal-rpm