diff --git a/ghc-yaml.spec b/ghc-yaml.spec index 45066cf..def778b 100644 --- a/ghc-yaml.spec +++ b/ghc-yaml.spec @@ -2,6 +2,7 @@ # https://fedoraproject.org/wiki/Packaging:Haskell %global pkg_name yaml +%global pkgver %{pkg_name}-%{version} %global subpkgver enclosed-exceptions-1.0.2 %bcond_with tests @@ -13,7 +14,7 @@ Summary: Support for parsing and rendering YAML documents License: BSD Url: https://hackage.haskell.org/package/%{pkg_name} -Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz +Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz Source1: http://hackage.haskell.org/package/%{subpkgver}/%{subpkgver}.tar.gz BuildRequires: ghc-Cabal-devel @@ -79,19 +80,19 @@ This package provides the Haskell %{pkg_name} library development files. %prep -%setup -q -c -n %{pkg_name}-%{version} -a1 -cd %{pkg_name}-%{version} +%setup -q -c -n %{pkgver} -a1 +cd %{pkgver} cabal-tweak-flag system-libyaml True # remove the bundled lib rm -r libyaml %build -%ghc_libs_build %{subpkgver} %{pkg_name}-%{version} +%ghc_libs_build %{subpkgver} %{pkgver} %install -%ghc_libs_install %{subpkgver} %{pkg_name}-%{version} +%ghc_libs_install %{subpkgver} %{pkgver} %ghc_fix_dynamic_rpath json2yaml yaml2json @@ -112,7 +113,7 @@ rm -r libyaml %files devel -f %{name}-devel.files -%doc ChangeLog.md README.md examples +%doc %{pkgver}/ChangeLog.md %{pkgver}/README.md %{pkgver}/examples %{_bindir}/json2yaml %{_bindir}/yaml2json