diff --git a/README.en.md b/README.en.md index 7bde71f5205ea7f8945e8db8e37fccaf0564f0e8..62a64fc6c88268ab4f1e0b904b2e33919e02d2f4 100644 --- a/README.en.md +++ b/README.en.md @@ -2,35 +2,3 @@ #### Description Concise Binary Object Representation (CBOR) - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index b4852493400eeec1fcb9ad01c055fc3f3c772891..f10d8692af64dd0dcf3095a64bcea63218851ac1 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,4 @@ # ghc-cborg #### 介绍 -Concise Binary Object Representation (CBOR) - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +Concise Binary Object Representation (CBOR) \ No newline at end of file diff --git a/cborg-0.2.10.0.tar.gz b/cborg-0.2.10.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ec48906a98b4ab03838fc064d6b731acb6548c96 Binary files /dev/null and b/cborg-0.2.10.0.tar.gz differ diff --git a/cborg.cabal b/cborg.cabal new file mode 100644 index 0000000000000000000000000000000000000000..847456226ae69dab68af3f54e2658fca24ccd9b8 --- /dev/null +++ b/cborg.cabal @@ -0,0 +1,173 @@ +name: cborg +version: 0.2.10.0 +x-revision: 2 +synopsis: Concise Binary Object Representation (CBOR) +license: BSD3 +license-file: LICENSE.txt +author: Duncan Coutts +maintainer: duncan@community.haskell.org, ben@smart-cactus.org +bug-reports: https://github.com/well-typed/cborg/issues +copyright: 2015-2019 Duncan Coutts, + 2015-2019 Well-Typed LLP, + 2015 IRIS Connect Ltd +category: Codec +build-type: Simple +cabal-version: >= 1.10 +tested-with: + GHC == 8.8.3, + GHC == 8.10.7, + GHC == 9.0.1, + GHC == 9.2.2, + GHC == 9.4.2, + GHC == 9.6.1, + GHC == 9.8.1, + GHC == 9.10.1, + GHC == 9.12.1 + +extra-source-files: + ChangeLog.md + +description: + This package provides an efficient implementation of the Concise + Binary Object Representation (CBOR), as specified by + [RFC 7049](https://tools.ietf.org/html/rfc7049). + . + If you are looking for a library for serialisation of Haskell values, + have a look at the [serialise](/package/serialise) package, which is + built upon this library. + . + An implementation of the standard bijection between CBOR and JSON is + provided by the [cborg-json](/package/cborg-json) package. Also see + [cbor-tool](/package/cbor-tool) for a convenient command-line utility + for working with CBOR data. + . + This package was formerly known as @binary-serialise-cbor@. + +extra-source-files: + src/cbits/cbor.h + tests/test-vectors/appendix_a.json + tests/test-vectors/README.md + +source-repository head + type: git + location: https://github.com/well-typed/cborg.git + +-------------------------------------------------------------------------------- +-- Flags + +flag optimize-gmp + default: True + manual: False + description: Use optimized code paths for integer-gmp + +-------------------------------------------------------------------------------- +-- Library + +library + default-language: Haskell2010 + ghc-options: -Wall + include-dirs: src/cbits + hs-source-dirs: src + + exposed-modules: + Codec.CBOR + Codec.CBOR.Decoding + Codec.CBOR.Encoding + Codec.CBOR.FlatTerm + Codec.CBOR.Magic + Codec.CBOR.Pretty + Codec.CBOR.Read + Codec.CBOR.Write + Codec.CBOR.Term + Codec.CBOR.ByteArray + Codec.CBOR.ByteArray.Sliced + + other-modules: + Codec.CBOR.ByteArray.Internal + + other-extensions: + CPP, ForeignFunctionInterface, MagicHash, + UnboxedTuples, BangPatterns, DeriveDataTypeable, + RankNTypes + + build-depends: + array >= 0.4 && < 0.6, + base >= 4.11 && < 4.22, + bytestring >= 0.10.4 && < 0.13, + containers >= 0.5 && < 0.8, + deepseq >= 1.0 && < 1.6, + ghc-prim >= 0.3.1.0 && < 0.14, + half >= 0.2.2.3 && < 0.4, + primitive >= 0.5 && < 0.10, + text >= 1.1 && < 1.3 || >= 2.0 && <2.2 + + if flag(optimize-gmp) + cpp-options: -DOPTIMIZE_GMP + if impl(ghc >= 9.0) + cpp-options: -DHAVE_GHC_BIGNUM + build-depends: ghc-bignum >= 1.0 && < 2.0 + else + build-depends: integer-gmp >= 1.0 && < 2.0 + + if impl(ghc >= 8.0) + ghc-options: -Wcompat -Wnoncanonical-monad-instances + else + build-depends: + -- provide/emulate `Control.Monad.Fail` and `Data.Semigroups` API for pre-GHC8 + fail == 4.9.*, + semigroups >= 0.18 && < 0.21, + -- the `PS` pattern synonym in bytestring 0.11 is unavailable with GHC < 8.0 + bytestring < 0.11 + +test-suite tests + type: exitcode-stdio-1.0 + hs-source-dirs: tests + main-is: Main.hs + + default-language: Haskell2010 + ghc-options: + -Wall -fno-warn-orphans + -threaded -rtsopts "-with-rtsopts=-N2" + + other-modules: + Tests.UnitTests + Tests.Properties + Tests.Boundary + Tests.ByteOffset + Tests.Canonical + Tests.PreEncoded + Tests.Regress + Tests.Regress.Issue160 + Tests.Regress.Issue162 + Tests.Regress.FlatTerm + Tests.Reference + Tests.Reference.Implementation + Tests.Reference.Generators + Tests.Reference.TestVectors + Tests.Term + Tests.UTF8 + Tests.Util + + build-depends: + array >= 0.4 && < 0.6, + base >= 4.11 && < 4.22, + base-orphans, + bytestring >= 0.10.4 && < 0.13, + text >= 1.1 && < 2.2, + primitive >= 0.5 && < 0.10, + cborg, + aeson >= 0.7 && < 2.3, + base64-bytestring >= 1.0 && < 1.3, + base16-bytestring >= 1.0 && < 1.1, + deepseq >= 1.0 && < 1.6, + half >= 0.2.2.3 && < 0.4, + QuickCheck >= 2.9 && < 2.16, + random, + scientific >= 0.3 && < 0.4, + tasty >= 0.11 && < 1.6, + tasty-hunit >= 0.9 && < 0.11, + tasty-quickcheck >= 0.8 && < 0.12, + vector >= 0.10 && < 0.14 + if !impl(ghc >= 8.0) + build-depends: + fail >= 4.9.0.0 && < 4.10 diff --git a/ghc-cborg.spec b/ghc-cborg.spec new file mode 100644 index 0000000000000000000000000000000000000000..a47a3ab2a0423b383800c16b1602c30f1f99236a --- /dev/null +++ b/ghc-cborg.spec @@ -0,0 +1,131 @@ +%lobal pkg_name cborg +%global pkgver %{pkg_name}-%{version} +%bcond_with tests + +Name: ghc-%{pkg_name} +Version: 0.2.10.0 +Release: 1 +Summary: Concise Binary Object Representation (CBOR) +License: BSD-3-Clause +URL: https://hackage.haskell.org/package/%{pkg_name} +Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz +Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/2.cabal#/%{pkg_name}.cabal +BuildRequires: ghc-Cabal-devel +BuildRequires: ghc-array-devel +BuildRequires: ghc-array-prof +BuildRequires: ghc-base-devel +BuildRequires: ghc-base-prof +BuildRequires: ghc-bytestring-devel +BuildRequires: ghc-bytestring-prof +BuildRequires: ghc-containers-devel +BuildRequires: ghc-containers-prof +BuildRequires: ghc-deepseq-devel +BuildRequires: ghc-deepseq-prof +BuildRequires: ghc-half-devel +BuildRequires: ghc-half-prof +BuildRequires: ghc-primitive-devel +BuildRequires: ghc-primitive-prof +BuildRequires: ghc-rpm-macros +BuildRequires: ghc-text-devel +BuildRequires: ghc-text-prof +ExcludeArch: %{ix86} +%if %{with tests} +BuildRequires: ghc-QuickCheck-devel +BuildRequires: ghc-QuickCheck-prof +BuildRequires: ghc-aeson-devel +BuildRequires: ghc-aeson-prof +BuildRequires: ghc-base-orphans-devel +BuildRequires: ghc-base-orphans-prof +BuildRequires: ghc-base16-bytestring-devel +BuildRequires: ghc-base16-bytestring-prof +BuildRequires: ghc-base64-bytestring-devel +BuildRequires: ghc-base64-bytestring-prof +BuildRequires: ghc-random-devel +BuildRequires: ghc-random-prof +BuildRequires: ghc-scientific-devel +BuildRequires: ghc-scientific-prof +BuildRequires: ghc-tasty-devel +BuildRequires: ghc-tasty-hunit-devel +BuildRequires: ghc-tasty-hunit-prof +BuildRequires: ghc-tasty-prof +BuildRequires: ghc-tasty-quickcheck-devel +BuildRequires: ghc-tasty-quickcheck-prof +BuildRequires: ghc-vector-devel +BuildRequires: ghc-vector-prof +%endif + +%description +This package provides an efficient implementation of the Concise Binary Object +Representation (CBOR), as specified by [RFC +7049](https://tools.ietf.org/html/rfc7049). + +If you are looking for a library for serialisation of Haskell values, have a +look at the [serialise](/package/serialise) package, which is built upon this +library. + +An implementation of the standard bijection between CBOR and JSON is provided +by the [cborg-json](/package/cborg-json) package. Also see +[cbor-tool](/package/cbor-tool) for a convenient command-line utility for +working with CBOR data. + +This package was formerly known as 'binary-serialise-cbor'. + +%package devel +Summary: Haskell %{pkg_name} library development files +Requires: %{name} = %{version}-%{release} +Requires: ghc-compiler = %{ghc_version} +Requires(post): ghc-compiler = %{ghc_version} +Requires(postun): ghc-compiler = %{ghc_version} + +%description devel +This package provides the Haskell %{pkg_name} library development files. + +%package -n ghc-%{pkg_name}-help +Summary: Haskell %{pkg_name} library documentation +Requires: ghc-filesystem +BuildArch: noarch + +%description -n ghc-%{pkg_name}-help +This package provides the Haskell %{pkg_name} library documentation. + +%package -n ghc-%{pkg_name}-prof +Summary: Haskell %{pkg_name} profiling library +Requires: ghc-%{pkg_name}-devel = %{version}-%{release} +Supplements: (ghc-%{pkg_name}-devel and ghc-prof) + +%description -n ghc-%{pkg_name}-prof +This package provides the Haskell %{pkg_name} profiling library. + +%prep +%autosetup -n %{pkg_name}-%{version} +cp -p %{SOURCE1} %{pkg_name}.cabal + +%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.txt + +%files devel -f %{name}-devel.files +%doc ChangeLog.md + +%files -n ghc-%{pkg_name}-help -f ghc-%{pkg_name}-help.files +%license LICENSE.txt + +%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files + +%changelog +* Fri Jun 13 2025 Lin Runze 0.2.10.0-1 +- Init cborg at version 0.2.10.0 revision 2.