packages feed

ats-pkg 3.2.5.18 → 3.2.6.0

raw patch · 7 files changed

+122/−86 lines, 7 filesdep +unix-compatdep ~dhall

Dependencies added: unix-compat

Dependency ranges changed: dhall

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # ats-pkg +## 3.2.6.0++  * Add `license` and `changelog` field to `Debian` type+  * `lintian` doesn't object to debianizations anymore+ ## 3.2.5.14    * Update for new Dhall library
ats-pkg.cabal view
@@ -1,56 +1,45 @@-cabal-version: 2.0-name: ats-pkg-version: 3.2.5.18-license: BSD3-license-file: LICENSE-copyright: Copyright: (c) 2018-2019 Vanessa McHale-maintainer: vamchale@gmail.com-author: Vanessa McHale-tested-with: ghc ==8.4.4 ghc ==8.2.2 ghc ==8.6.4-bug-reports: https://github.com/vmchale/atspkg/issues-synopsis: A build tool for ATS-description:-    A collection of scripts to simplify building ATS projects.-category: Development, ATS-build-type: Simple-data-files:-    man/atspkg.1+cabal-version:      2.0+name:               ats-pkg+version:            3.2.6.0+license:            BSD3+license-file:       LICENSE+copyright:          Copyright: (c) 2018-2019 Vanessa McHale+maintainer:         vamchale@gmail.com+author:             Vanessa McHale+tested-with:        ghc ==8.4.4 ghc ==8.6.5+bug-reports:        https://github.com/vmchale/atspkg/issues+synopsis:           A build tool for ATS+description:        A collection of scripts to simplify building ATS projects.+category:           Development, ATS+build-type:         Simple+data-files:         man/atspkg.1 extra-source-files:     dhall/config.dhall     dhall/atslib.dhall     dhall/atspkg-prelude.dhall-extra-doc-files: README.md-                 docs/manual.tex-                 CHANGELOG.md +extra-doc-files:+    README.md+    docs/manual.tex+    CHANGELOG.md+ source-repository head-    type: git+    type:     git     location: git@github.com:vmchale/atspkg.git--flag profile-    description:-        Enable profiling-    default: False-    manual: True--flag eventlog-    description:-        Enable event logging-    default: False-    manual: True+    subdir:   ats-pkg  flag development-    description:-        Enable `-Werror`-    default: False-    manual: True+    description: Enable `-Werror`+    default:     False+    manual:      True  library     exposed-modules:         Language.ATS.Package         Distribution.ATS+     build-tool-depends: cpphs:cpphs -any-    hs-source-dirs: src+    hs-source-dirs:     src     other-modules:         Paths_ats_pkg         Distribution.ATS.Build@@ -64,14 +53,17 @@         Language.ATS.Package.Type         Language.ATS.Package.Debian         Distribution.ATS.Version-    autogen-modules:-        Paths_ats_pkg-    default-language: Haskell2010-    other-extensions: OverloadedStrings GeneralizedNewtypeDeriving-                      DeriveAnyClass DeriveGeneric TemplateHaskell RecordWildCards-                      TupleSections StandaloneDeriving DerivingStrategies-    ghc-options: -Wall -Wincomplete-uni-patterns-                 -Wincomplete-record-updates++    autogen-modules:    Paths_ats_pkg+    default-language:   Haskell2010+    other-extensions:+        OverloadedStrings GeneralizedNewtypeDeriving DeriveAnyClass+        DeriveGeneric TemplateHaskell RecordWildCards TupleSections+        StandaloneDeriving DerivingStrategies++    ghc-options:+        -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates+     build-depends:         base >=4.10 && <5,         http-client -any,@@ -98,17 +90,16 @@         dependency >=1.2.0.0,         quaalude -any,         tar -any,-        filemanip -any+        filemanip -any,+        unix-compat -any      if flag(development)         ghc-options: -Werror  library quaalude-    exposed-modules:-        Quaalude-    hs-source-dirs: internal-    other-modules:-        System.Process.Ext+    exposed-modules:  Quaalude+    hs-source-dirs:   internal+    other-modules:    System.Process.Ext     default-language: Haskell2010     build-depends:         base -any,@@ -118,7 +109,6 @@         directory >=1.2.3.0,         filepath -any,         microlens -any,-        dhall >=1.23.0,         ansi-wl-pprint -any,         shake >=0.17,         bytestring -any,@@ -128,27 +118,33 @@         mtl -any,         containers >=0.6 +    if !impl(ghc >=8.4)+        build-depends: dhall >=1.23.0 && <1.25.0++    else+        build-depends: dhall >=1.23.0+     if flag(development)         cpp-options: -DDEBUG      if !os(windows)-        build-depends:-            unix -any+        build-depends: unix -any  executable atspkg-    main-is: Main.hs-    hs-source-dirs: app+    main-is:          Main.hs+    hs-source-dirs:   app     other-modules:         Paths_ats_pkg         Language.ATS.Package.Dhall         Language.ATS.Package.Upgrade-    autogen-modules:-        Paths_ats_pkg++    autogen-modules:  Paths_ats_pkg     default-language: Haskell2010     other-extensions: OverloadedStrings-    ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall-                 -with-rtsopts=-I0 -Wincomplete-uni-patterns-                 -Wincomplete-record-updates+    ghc-options:+        -threaded -rtsopts -with-rtsopts=-N -Wall -with-rtsopts=-I0+        -Wincomplete-uni-patterns -Wincomplete-record-updates+     build-depends:         base >=4.10,         ats-pkg -any,@@ -165,12 +161,6 @@         shake -any,         cli-setup -any,         quaalude -any--    if flag(eventlog)-        ghc-options: -eventlog -with-rtsopts=-l--    if flag(profile)-        ghc-options: -with-rtsopts=-h -with-rtsopts=-p      if flag(development)         ghc-options: -Werror
dhall/atspkg-prelude.dhall view
@@ -1,7 +1,7 @@ {- Dhall prelude functions -}-let concatMapSep = https://raw.githubusercontent.com/dhall-lang/dhall-lang/0a7f596d03b3ea760a96a8e03935f4baa64274e1/Prelude/Text/concatMapSep+let concatMapSep = https://raw.githubusercontent.com/dhall-lang/dhall-lang/9f259cd68870b912fbf2f2a08cd63dc3ccba9dc3/Prelude/Text/concatMapSep in-let map = https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/Prelude/List/map+let map = https://raw.githubusercontent.com/dhall-lang/dhall-lang/9f259cd68870b912fbf2f2a08cd63dc3ccba9dc3/Prelude/List/map in  {- Types for export and supporting functions -}@@ -69,6 +69,8 @@   , binaries : List Text   , libraries : List Text   , headers : List Text+  , license : Optional Text+  , changelog : Optional Text   } in @@ -226,6 +228,8 @@     : List Text   , headers = []     : List Text+  , license = None Text+  , changelog = None Text   } in 
internal/Quaalude.cpphs view
@@ -20,7 +20,6 @@                 , isPrefixOf                 , isSuffixOf                 , on-                , both                 , (***)                 , (&&&)                 , (<=<)@@ -153,7 +152,7 @@ import           Development.Shake            hiding (doesFileExist, getEnv) import           Development.Shake.FilePath import           Dhall                        hiding (Text, bool)-import           Lens.Micro                   hiding (both)+import           Lens.Micro import           Lens.Micro.Extras import           Network.HTTP.Client import           Network.HTTP.Client.TLS      (tlsManagerSettings)@@ -176,7 +175,7 @@ makeExecutable = pure mempty #else makeExecutable :: FilePath -> IO ()-makeExecutable = flip setFileMode ownerModes+makeExecutable = setFileMode -$ ownerModes #endif  nubSpecial :: (Ord a) => [[a]] -> [[a]]@@ -192,7 +191,7 @@     _           -> "make"  hex :: Int -> String-hex = flip showHex mempty+hex = showHex -$ mempty  -- | Same as "Text.PrettyPrint.ANSI.Leijen"'s @<$>@, but doesn't clash with the -- prelude.
man/atspkg.1 view
@@ -1,4 +1,4 @@-.\" Automatically generated by Pandoc 2.7.2+.\" Automatically generated by Pandoc 2.7.3 .\" .TH "atspkg (1)" "" "" "" "" .hy
src/Language/ATS/Package/Build.hs view
@@ -112,7 +112,7 @@     c <- getConfig mStr Nothing     b <- pandoc     case man c of-        Just _ -> bool (pure ()) manpages b+        Just _ -> when b manpages         _      -> pure ()  parens :: String -> String
src/Language/ATS/Package/Debian.hs view
@@ -10,12 +10,15 @@                                    , Debian (..)                                    ) where +import qualified Codec.Compression.GZip     as Gzip+import qualified Data.ByteString.Lazy       as BSL import           Data.Dependency            (Version (..)) import           Data.List                  (intercalate) import           Development.Shake          hiding ((*>)) import           Development.Shake.FilePath import           Dhall                      hiding (Text) import           Quaalude+import           System.PosixCompat.Files   (setFileMode)  data Debian = Debian { package     :: Text                      , version     :: Version@@ -26,7 +29,11 @@                      , binaries    :: [Text]                      , libraries   :: [Text]                      , headers     :: [Text]+                     , license     :: Maybe Text+                     , changelog   :: Maybe Text                      }+                     -- TODO: section https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections+                     -- TODO: priority https://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities                      deriving (Generic, Binary, Interpret)  deriving newtype instance Interpret Version@@ -41,11 +48,30 @@     , mempty     ] +debianCompress :: BSL.ByteString -> BSL.ByteString+debianCompress = Gzip.compressWith Gzip.defaultCompressParams { Gzip.compressLevel = Gzip.bestCompression }++gzipRules :: Rules ()+gzipRules =+    "//*.gz" %> \out -> do+        let orig = fromMaybe out $ stripExtension "gz" out+        need [orig]+        contents <- liftIO $ BSL.readFile orig+        let zipped = debianCompress contents+        liftIO $ BSL.writeFile out zipped++ -- look at hackage package for debian? debRules :: Debian -> Rules ()-debRules deb =+debRules deb = do++    gzipRules -- TODO: right place?+     unpack (target deb) %> \out -> do +        let binPerms = 0o755+            manPerms = 0o0644+         let binaries' = unpack <$> binaries deb             libraries' = unpack <$> libraries deb             headers' = unpack <$> headers deb@@ -58,19 +84,31 @@         let packDir = unpack (package deb)             makeRel = (("target" </> packDir) </>)             debianDir = makeRel "DEBIAN"-            binDir = makeRel "usr/local/bin"-            libDir = makeRel "usr/local/lib"-            manDir = makeRel "usr/local/share/man/man1"-            includeDir = makeRel "usr/local/include"+            binDir = makeRel "usr/bin"+            libDir = makeRel "usr/lib"+            manDir = makeRel "usr/share/man/man1"+            includeDir = makeRel "usr/include"+            docDir = makeRel ("usr/share/doc" </> packDir) -        traverse_ (liftIO . createDirectoryIfMissing True)-            [ binDir, debianDir, manDir, includeDir ]+        traverse_ (\fp -> liftIO $ setFileMode fp binPerms)+            binaries' +        let dirs = [ binDir, debianDir, manDir, includeDir, docDir ]++        traverse_ (liftIO . createDirectoryIfMissing True) dirs++        let parents = [ "usr", "usr/share/man", "usr/share", "usr/share/doc" ]++        traverse_ (\fp -> liftIO $ setFileMode fp binPerms)+            ((makeRel <$> parents) ++ dirs)+         fold $ do             mp <- manpage deb-            pure $-                need [unpack mp] *>-                copyFile' (unpack mp) (manDir ++ "/" ++ takeFileName (unpack mp))+            pure $ do+                let mp' = unpack mp <.> "gz"+                need [mp']+                liftIO (setFileMode mp' manPerms)+                copyFile' mp' (manDir ++ "/" ++ takeFileName mp')          let moveFiles files dir = zipWithM_ copyFile' files ((dir </>) . takeFileName <$> files)