diff --git a/ghc-hjsmin.spec b/ghc-hjsmin.spec index f261b48..0f5472a 100644 --- a/ghc-hjsmin.spec +++ b/ghc-hjsmin.spec @@ -16,9 +16,11 @@ License: BSD 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/%{pkgver}/%{pkg_name}.cabal#/%{pkgver}.cabal # End cabal-rpm sources # Begin cabal-rpm deps: +BuildRequires: dos2unix BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-base-prof @@ -78,6 +80,7 @@ This package provides the Haskell %{pkg_name} profiling library. %prep # Begin cabal-rpm setup: %setup -q -n %{pkgver} +dos2unix -k -n %{SOURCE1} %{pkg_name}.cabal # End cabal-rpm setup diff --git a/hjsmin-0.2.0.4.cabal b/hjsmin-0.2.0.4.cabal new file mode 100644 index 0000000..a9c944d --- /dev/null +++ b/hjsmin-0.2.0.4.cabal @@ -0,0 +1,70 @@ +name: hjsmin +version: 0.2.0.4 +x-revision: 2 +license: BSD3 +license-file: LICENSE +author: Alan Zimmerman +maintainer: Erik de Castro Lopo +synopsis: Haskell implementation of a javascript minifier +description: + Reduces size of javascript files by stripping out extraneous whitespace and + other syntactic elements, without changing the semantics. +category: Web +stability: unstable +cabal-version: >= 1.10 +build-type: Simple +homepage: http://github.com/erikd/hjsmin +bug-reports: http://github.com/erikd/hjsmin/issues + +Extra-source-files: + Readme.md + test/cli/core/runner + test/cli/empty-input/run + test/cli/minimal-input/run + + +library + default-language: Haskell2010 + ghc-options: -Wall + hs-source-dirs: src + + exposed-modules: Text.Jasmine + + build-depends: base >= 4.8 && < 5 + , bytestring >= 0.10 && < 0.12 + , language-javascript >= 0.6 && < 0.8 + , text == 1.2.* + + +executable hjsmin + default-language: Haskell2010 + ghc-options: -Wall -threaded + hs-source-dirs: src main + main-is: hjsmin.hs + + -- Need this here because the library and the executable have the same name. + other-modules: Text.Jasmine + + build-depends: base >= 4.8 && < 5 + , bytestring + , language-javascript + , optparse-applicative >= 0.7 + , text + +test-suite test-cli + type: exitcode-stdio-1.0 + ghc-options: -Wall -fwarn-tabs + default-language: Haskell2010 + hs-source-dirs: test + main-is: test-cli.hs + + build-depends: base + , directory + , extra + , filepath + , process + , unix + +source-repository head + type: git + location: https://github.com/erikd/hjsmin.git