From d81427a34592ee98b4eb8a1005d9898af5ff9285 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Nov 16 2017 05:58:27 +0000 Subject: import (#1511911) --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eb934dc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/skylighting-0.1.1.5.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 3eb3f34..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# ghc-skylighting - -The ghc-skylighting package \ No newline at end of file diff --git a/ghc-skylighting.spec b/ghc-skylighting.spec new file mode 100644 index 0000000..db925c8 --- /dev/null +++ b/ghc-skylighting.spec @@ -0,0 +1,115 @@ +# generated by cabal-rpm-0.11.2 +# https://fedoraproject.org/wiki/Packaging:Haskell + +%global pkg_name skylighting +%global pkgver %{pkg_name}-%{version} + +%bcond_with tests + +# prof fails on armv7hl and s390x +# prof takes 9-10 hours on aarch64 +%ifarch aarch64 armv7hl s390x +%global without_prof 1 +%endif + +Name: ghc-%{pkg_name} +Version: 0.1.1.5 +Release: 3%{?dist} +Summary: Syntax highlighting library + +License: GPLv2+ +Url: https://hackage.haskell.org/package/%{pkg_name} +Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz +# use regex-pcre instead of regex-pcre-builtin +Patch0: skylighting-regex-pcre.patch + +BuildRequires: ghc-Cabal-devel +BuildRequires: ghc-rpm-macros +# Begin cabal-rpm deps: +BuildRequires: ghc-aeson-devel +BuildRequires: ghc-blaze-html-devel +BuildRequires: ghc-bytestring-devel +BuildRequires: ghc-case-insensitive-devel +BuildRequires: ghc-containers-devel +BuildRequires: ghc-directory-devel +BuildRequires: ghc-filepath-devel +BuildRequires: ghc-hxt-devel +BuildRequires: ghc-mtl-devel +BuildRequires: ghc-regex-pcre-devel +BuildRequires: ghc-safe-devel +BuildRequires: ghc-text-devel +BuildRequires: ghc-utf8-string-devel +%if %{with tests} +BuildRequires: ghc-Diff-devel +BuildRequires: ghc-HUnit-devel +BuildRequires: ghc-pretty-show-devel +BuildRequires: ghc-random-devel +BuildRequires: ghc-tasty-devel +BuildRequires: ghc-tasty-golden-devel +BuildRequires: ghc-tasty-hunit-devel +%endif +# End cabal-rpm deps + +%description +Skylighting is a syntax highlighting library with support for over one hundred +languages. It derives its tokenizers from XML syntax definitions used by KDE's +KSyntaxHighlighting framework, so any syntax supported by that framework can be +added. An optional command-line program is provided. Skylighting is intended to +be the successor to highlighting-kate. + + +%package devel +Summary: Haskell %{pkg_name} library development files +Provides: %{name}-static = %{version}-%{release} +Requires: ghc-compiler = %{ghc_version} +Requires(post): ghc-compiler = %{ghc_version} +Requires(postun): ghc-compiler = %{ghc_version} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package provides the Haskell %{pkg_name} library development files. + + +%prep +%setup -q -n %{pkgver} +%patch0 -p1 -b .orig + + +%build +%ghc_lib_build + + +%install +%ghc_lib_install + + +%check +%cabal_test + + +%post devel +%ghc_pkg_recache + + +%postun devel +%ghc_pkg_recache + + +%files -f %{name}.files +%license LICENSE + + +%files devel -f %{name}-devel.files +%doc README.md changelog.md + + +%changelog +* Mon Nov 13 2017 Jens Petersen - 0.1.1.5-3 +- add comment for the regex-pcre patch + +* Fri Nov 10 2017 Jens Petersen - 0.1.1.5-2 +- disable prof on aarch64, armv7hl, and s390 +- build with regex-pcre + +* Tue Nov 7 2017 Fedora Haskell SIG - 0.1.1.5-1 +- spec file generated by cabal-rpm-0.11.2 diff --git a/skylighting-regex-pcre.patch b/skylighting-regex-pcre.patch new file mode 100644 index 0000000..d2d4804 --- /dev/null +++ b/skylighting-regex-pcre.patch @@ -0,0 +1,20 @@ +--- skylighting-0.1.1.5/skylighting.cabal~ 2017-02-03 22:33:39.000000000 +0900 ++++ skylighting-0.1.1.5/skylighting.cabal 2017-11-08 18:31:58.633939694 +0900 +@@ -228,7 +228,7 @@ + mtl, + text, + bytestring, +- regex-pcre-builtin, ++ regex-pcre, + directory, + filepath, + aeson, +@@ -260,7 +260,7 @@ + filepath, + bytestring, + text, +- regex-pcre-builtin, ++ regex-pcre, + safe, + hxt, + utf8-string, diff --git a/sources b/sources new file mode 100644 index 0000000..337a1cc --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (skylighting-0.1.1.5.tar.gz) = 2d430d2067d7694978620af0c63ce47240074055bf5179b968ac2a430b9968f445307347c8975e550823f509c05ab600f07c3d1cdc7f8909bf19506e0153e3ef