# generated by cabal-rpm-2.2.1 --stream hackage # https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/ Name: cabal-rpm Version: 2.2.1 Release: %autorelease Summary: RPM packaging tool for Haskell Cabal-based packages License: GPL-3.0-or-later Url: https://hackage.haskell.org/package/%{name} # Begin cabal-rpm sources: Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz # End cabal-rpm sources # Begin cabal-rpm deps: BuildRequires: ghc-rpm-macros BuildRequires: ghc-Cabal-devel BuildRequires: ghc-aeson-devel BuildRequires: ghc-base-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-cached-json-file-devel BuildRequires: ghc-directory-devel BuildRequires: ghc-extra-devel BuildRequires: ghc-filepath-devel BuildRequires: ghc-http-client-devel BuildRequires: ghc-http-client-tls-devel BuildRequires: ghc-http-query-devel BuildRequires: ghc-simple-cabal-devel BuildRequires: ghc-simple-cmd-devel BuildRequires: ghc-simple-cmd-args-devel BuildRequires: ghc-text-devel BuildRequires: ghc-time-devel BuildRequires: ghc-unix-devel BuildRequires: help2man # End cabal-rpm deps Provides: cblrpm = %{version}-%{release} Requires: cabal-install Requires: dos2unix Requires: ghc-rpm-macros Requires: rpm-build # for rpmdev-bumpspec and spectool Requires: rpmdevtools Requires: wget # for repoquery %if 0%{?fedora} || 0%{?rhel} > 7 Requires: dnf-plugins-core %else Requires: yum-utils %endif # for stack list Recommends: stack > 2.7 %description This package provides a RPM packaging tool for Haskell Cabal-based packages. cabal-rpm has commands to generate a RPM spec file and srpm for a package. It can rpmbuild packages, dnf/yum install their dependencies, prep packages, and install them. There are commands to list package dependencies and missing dependencies. The diff command compares the current spec file with a freshly generated one, the update command updates the spec file to latest version from Stackage or Hackage, and the refresh command updates the spec file to the current cabal-rpm packaging. It also handles Hackage revisions of packages. Standalone packages can also be made, built with cabal-install. %prep # Begin cabal-rpm setup: %setup -q # End cabal-rpm setup %build # Begin cabal-rpm build: %ghc_bin_build # End cabal-rpm build %install # Begin cabal-rpm install %ghc_bin_install mkdir -p %{buildroot}%{bash_completions_dir} %{buildroot}%{_bindir}/%{name} --bash-completion-script %{name} | sed s/filenames/default/ > %{buildroot}%{bash_completions_dir}/%{name} mkdir -p %{buildroot}%{_mandir}/man1/ help2man --no-info %{buildroot}%{_bindir}/%{name} > %{buildroot}%{_mandir}/man1/%{name}.1 # End cabal-rpm install ln -s %{name} %{buildroot}%{_bindir}/cblrpm sed -i -e "s/ _%{name} / _%{name} cblrpm /" %{buildroot}%{bash_completions_dir}/%{name} ln -s %{name} %{buildroot}%{_datadir}/bash-completion/completions/cblrpm ln -s %{name}.1 %{buildroot}%{_mandir}/man1/cblrpm.1 %files # Begin cabal-rpm files: %license COPYING %doc ChangeLog.md README.md TODO %{_bindir}/%{name} %{bash_completions_dir}/%{name} %{_mandir}/man1/%{name}.1* # End cabal-rpm files %{_bindir}/cblrpm %{_datadir}/bash-completion/completions/cblrpm %{_mandir}/man1/cblrpm.1* %changelog %autochangelog