From 6d4004c11667fcd9f533607b6c291e8124b9c586 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 24 Feb 2019 23:03:24 +0800 Subject: [PATCH] subpackage core library --- .gitignore | 1 + ghc-skylighting.spec | 25 ++++++++++++++++++++++--- sources | 1 + 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3b5147c..d4d0bd8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /skylighting-0.5.0.1.tar.gz /skylighting-0.6.tar.gz /skylighting-0.7.5.tar.gz +/skylighting-core-0.7.5.tar.gz diff --git a/ghc-skylighting.spec b/ghc-skylighting.spec index 5d11ee7..155b988 100644 --- a/ghc-skylighting.spec +++ b/ghc-skylighting.spec @@ -4,8 +4,12 @@ %global pkg_name skylighting %global pkgver %{pkg_name}-%{version} +%global skylightingcore skylighting-core-0.7.5 +%global subpkgs %{skylightingcore} + Name: ghc-%{pkg_name} Version: 0.7.5 +# can only be reset when all subpkgs bumped Release: 1%{?dist} Summary: Syntax highlighting library @@ -13,11 +17,13 @@ License: GPLv2+ Url: https://hackage.haskell.org/package/%{pkg_name} # Begin cabal-rpm sources: Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz +Source1: https://hackage.haskell.org/package/%{skylightingcore}/%{skylightingcore}.tar.gz # End cabal-rpm sources # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel -BuildRequires: ghc-rpm-macros +BuildRequires: ghc-rpm-macros-extra +BuildRequires: chrpath BuildRequires: ghc-aeson-devel BuildRequires: ghc-ansi-terminal-devel BuildRequires: ghc-attoparsec-devel @@ -34,7 +40,7 @@ BuildRequires: ghc-hxt-devel BuildRequires: ghc-mtl-devel BuildRequires: ghc-regex-pcre-devel BuildRequires: ghc-safe-devel -BuildRequires: ghc-skylighting-core-devel +#BuildRequires: ghc-skylighting-core-devel BuildRequires: ghc-text-devel BuildRequires: ghc-utf8-string-devel # End cabal-rpm deps @@ -64,22 +70,34 @@ Requires: %{name}%{?_isa} = %{version}-%{release} This package provides the Haskell %{pkg_name} library development files. +%global main_version %{version} + +%if %{defined ghclibdir} +%ghc_lib_subpackage %{skylightingcore} +%endif + +%global version %{main_version} + + %prep # Begin cabal-rpm setup: -%setup -q -n %{pkgver} +%setup -q -n %{pkgver} -a1 # End cabal-rpm setup cabal-tweak-flag system-pcre True %build # Begin cabal-rpm build: +%ghc_libs_build %{subpkgs} %ghc_lib_build # End cabal-rpm build %install # Begin cabal-rpm install +%ghc_libs_install %{subpkgs} %ghc_lib_install +%ghc_fix_rpath %{pkgver} # End cabal-rpm install @@ -104,6 +122,7 @@ cabal-tweak-flag system-pcre True %changelog * Thu Feb 21 2019 Jens Petersen - 0.7.5-1 - update to 0.7.5 +- subpackage skylightlighting-core * Sun Feb 17 2019 Jens Petersen - 0.6-3 - refresh to cabal-rpm-0.13 diff --git a/sources b/sources index a2cb5f8..2017a52 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (skylighting-0.7.5.tar.gz) = 67b5b5fa4688d9d3f66a92d35c27bd394c3f63ea9033ee72491d7e34b8fc8526b0bf44d3c3956ac0d49dda00d9edc36458b8a07a4e7037e8629abb55b30aa8d0 +SHA512 (skylighting-core-0.7.5.tar.gz) = e86fae8b77426d960f2095d5d2e70f676ff085f0409a9306fe69ccdf1739a2b5aee844b8db070e6afc49a2a2e77b19018e78ea85e85a5e3ded9ee12161eefbb6