Closed clumens closed 7 years ago
The line expands to mv <docdir>/%{name} <docdir>/ghc-%{name}
, which ends up trying to move something like %{_ghcdocdir}/ghc-hspec-discover to %{_ghcdocdir}/ghc-ghc-hspec-discover.
Is the conditional on this line (https://github.com/juhp/cabal-rpm/blob/master/src/Commands/Spec.hs#L357), selfdep
, supposed to be something else? The best I can figure is that the goal is to add the ghc- prefix back on to the docdir for packages that don't have ghc- in the name, but I'm not sure why that would be wanted.
Somewhat related, would it be possible to pass distinct arguments to mv instead of using brace expansion? That would be a lot more readable.
[thought I had already posted a comment, but apparently not]
Thanks for the report. Yes I think the generated path is incorrect and I need to use a new rpm macro to address that.
I pushed a small partial workaround for this.
It doesn't fix the path but avoids the mv for ghc-%{pkg_name}.spec packages: it should only happen for %{pkg_name}.spec packages.
@dashea I hope that indirectly answers your question: this was to move the license file from hspec-discover to ghc-hspec-discover. (But by default cabal-rpm does not make hspec-discover the base package, unless you pass --binary.)
This should be fixed fully now in git (at least for Fedora Rawhide where I added %_ghclicensedir
).
Should be fixed in cabal-rpm-0.11.2
The build process fails on this line of the generated spec file, because the file does not exist:
mv %{buildroot}%{_ghcdocdir}/{,ghc-}%{name}
Simply removing this line makes it succeed. It's easy to see where it gets emitted, but I don't see how to fix it in such a way as to not break other things. Otherwise I'd attach a PR. Sorry.
I'll add the build log, or at least the part at the end where if fails.