move libs and data files to common subpackage again

This commit is contained in:
Jens Petersen 2021-02-18 15:26:41 +08:00
parent 63734cebf1
commit 14d6c0b37e
1 changed files with 21 additions and 6 deletions

View File

@ -70,7 +70,7 @@ BuildRequires: ghc-uri-encode-prof
BuildRequires: ghc-zlib-prof
BuildRequires: alex
BuildRequires: happy
Obsoletes: %{name}-common < %{version}-%{release}
Requires: %{name}-common = %{version}-%{release}
# End cabal-rpm deps
BuildRequires: emacs(bin)
@ -92,8 +92,17 @@ 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.
%package common
Summary: %{name} common files
BuildArch: noarch
%description common
This package provides the %{name} core libraries and runtime related files.
%package -n ghc-%{name}
Summary: Haskell %{name} library
Requires: %{name}-common = %{version}-%{release}
%description -n ghc-%{name}
This package provides the Haskell %{name} shared library.
@ -189,6 +198,7 @@ done
%ghc_libs_install %{subpkgs}
%ghc_lib_install
%ghc_fix_rpath %{pkgver}
mv %{buildroot}%{_ghcdocdir}{,-common}
# End cabal-rpm install
for i in $(find %{buildroot}%{_datadir}/%{pkgver} -name "*.agda"); do
@ -208,19 +218,24 @@ rm -r %{buildroot}%{_datadir}/%{pkgver}/emacs-mode
%files
%license LICENSE
%doc CHANGELOG.md README.md
%{_bindir}/agda
%{_datadir}/%{pkgver}
# Begin cabal-rpm files:
%{_bindir}/agda
# End cabal-rpm files
%dir %{_emacs_sitelispdir}/agda
%{_emacs_sitelispdir}/agda/*.el
%{_emacs_sitelispdir}/agda/*.elc
%{_emacs_sitestartdir}/*.el
%files -n ghc-%{name} -f ghc-%{name}.files
%files common
# Begin cabal-rpm files:
%license LICENSE
%doc CHANGELOG.md README.md
%{_datadir}/%{pkgver}
# End cabal-rpm files
%files -n ghc-%{name} -f ghc-%{name}.files
%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files