diff --git a/js-jquery-3.3.1-use-system.patch b/js-jquery-3.3.1-use-system.patch new file mode 100644 index 0000000..4e1816f --- /dev/null +++ b/js-jquery-3.3.1-use-system.patch @@ -0,0 +1,24 @@ +--- js-jquery-3.3.1/src/Language/Javascript/JQuery.hs~ 2018-01-22 01:32:58.000000000 +0800 ++++ js-jquery-3.3.1/src/Language/Javascript/JQuery.hs 2020-02-21 16:19:52.308435191 +0800 +@@ -34,7 +34,7 @@ + + -- | A local file containing the minified jQuery code for 'version'. + file :: IO FilePath +-file = Paths.getDataFileName name ++file = return $ "/usr/share/javascript/jquery/3/jquery.min.js" + + -- | A remote URL of the jQuery sources for 'version'. + -- The URL /does not/ have a protocol prefix, so users may need to prepend +--- js-jquery-3.3.1/js-jquery.cabal~ 2018-01-22 01:32:58.000000000 +0800 ++++ js-jquery-3.3.1/js-jquery.cabal 2020-02-21 16:36:45.313154906 +0800 +@@ -23,10 +23,6 @@ + CHANGES.txt + README.md + +-data-dir: javascript +-data-files: +- jquery-3.3.1.min.js +- + source-repository head + type: git + location: https://github.com/ndmitchell/js-jquery.git diff --git a/shake.spec b/shake.spec index 2a29c3a..542088d 100644 --- a/shake.spec +++ b/shake.spec @@ -30,6 +30,7 @@ Source3: https://hackage.haskell.org/package/%{filepattern}/%{filepattern Source4: https://hackage.haskell.org/package/%{heaps}/%{heaps}.tar.gz Source5: https://hackage.haskell.org/package/%{jsdgtable}/%{jsdgtable}.tar.gz # End cabal-rpm sources +Patch1: js-jquery-3.3.1-use-system.patch # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel @@ -64,6 +65,8 @@ Requires: %{name}-common = %{version}-%{release} # End cabal-rpm deps # for js-flot BuildRequires: ghc-HTTP-prof +# for js-jquery +BuildRequires: js-jquery %description Shake is a Haskell library for writing build systems - designed as a @@ -138,7 +141,7 @@ This package provides the Haskell %{name} profiling library. %if %{defined ghclibdir} %ghc_lib_subpackage %{jsflot} -%ghc_lib_subpackage %{jsjquery} +%ghc_lib_subpackage -c js-query %{jsjquery} %ghc_lib_subpackage %{filepattern} %ghc_lib_subpackage %{heaps} %ghc_lib_subpackage %{jsdgtable} @@ -151,6 +154,7 @@ This package provides the Haskell %{name} profiling library. # Begin cabal-rpm setup: %setup -q -a1 -a2 -a3 -a4 -a5 # End cabal-rpm setup +%patch1 -b0 -b .orig %build @@ -169,7 +173,6 @@ mv %{buildroot}%{_ghcdocdir}{,-common} # End cabal-rpm install echo "%{_datadir}/%{jsflot}/" >> %{jsflot}/ghc-js-flot.files -echo "%{_datadir}/%{jsjquery}/" >> %{jsjquery}/ghc-js-jquery.files echo "%{_datadir}/%{jsdgtable}/" >> %{jsdgtable}/ghc-js-dgtable.files rm %{buildroot}%{_datadir}/%{pkgver}/docs/manual/*