From: Michael Orlitzky Date: Sun, 28 Aug 2022 15:31:58 +0000 (-0400) Subject: mailbox-count.cabal: update for newer cabal and ghc-9.x. X-Git-Tag: 0.0.6~3 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=423950680d078d163311e53818ca0d37f6a627e8;p=mailbox-count.git mailbox-count.cabal: update for newer cabal and ghc-9.x. --- diff --git a/mailbox-count.cabal b/mailbox-count.cabal index f43282b..fb2e6b2 100644 --- a/mailbox-count.cabal +++ b/mailbox-count.cabal @@ -1,9 +1,9 @@ +cabal-version: 3.0 name: mailbox-count version: 0.0.5 -cabal-version: >= 1.8 author: Michael Orlitzky maintainer: Michael Orlitzky -license: AGPL-3 +license: AGPL-3.0-only license-file: doc/LICENSE bug-reports: mailto:michael@orlitzky.com category: Mail, Utils @@ -16,107 +16,107 @@ synopsis: Count mailboxes in a SQL database. description: /Usage/: - . + @ mailbox-count [OPTIONS] @ - . + Mailbox-count produces a simple count of mailboxes that exist per-domain in some SQL database. The default queries are compatible with the schema used by PostfixAdmin , but it is possible to supply your own queries via the @--summary-query@ and @--detail-query@ options. - . + The summary report lists each domain, along with the number of mailboxes owned by that domain. The order is determined by the summary query, which lists the domains alphabetically by default. - . + The default detail report shows the same, but also contains a list of each individual mailbox (again in alphabetical order) belonging to the domains. - . + /Input/: - . + None. - . + /Output/: - . + Either a summary, or detailed report (with @--detail@) of the number of mailboxes per-domain contained in the database. - . + /Options/: - . + @ \--database @ - . + The name of the database (or file, if SQLite) to which we should connect. - . + Default: The name of the current user (Postgres only). - . + @ \--detail @ - . + Produce a detailed report listing all mailboxes by domain. - . + @ \--detail-query @ - . + SQL query used to produce the detail report. This should return the set of all (domain, username) pairs. See the default value for an example. - . + Default: \"SELECT domain,username FROM mailbox ORDER BY domain;\" - . + @ \--host @ - . + Hostname where the database is located (Postgres-only). - . + Default: None, a UNIX domain socket connection is attempted (Postgres only) - . + @ \--password @ - . + Password used to connect to the database (Postgres-only). - . + Default: None (assumes passwordless authentication) - . + @ \--port @ Port number used to connect to the database (Postgres-only). - . + Default: None, a UNIX domain socket connection is attempted (Postgres only) - . + @ \--summary-query @ - . + SQL query used to produce the summary report. This should return (domain, user count) pairs. See the default value for an example. - . + Default: \"SELECT domain,COUNT(username) FROM mailbox GROUP BY domain ORDER BY domain;\" - . + @ \--username @ - . + Username used to connect to the database (Postgres-only). - . + Default: The current user - . + /Examples/: - . + The default summary report: - . + @ $ mailbox-count --database=postfixadmin.sqlite3 Summary (number of mailboxes per domain) @@ -126,9 +126,9 @@ description: example.net: 2 example.org: 1 @ - . + The more detailed report: - . + @ $ mailbox-count --detail --database=postfixadmin.sqlite3 Detail (list of all mailboxes by domain) @@ -153,7 +153,7 @@ description: executable mailbox-count build-depends: - base >= 4.9 && < 5, + base >= 4.15 && < 5, cmdargs >= 0.10, configurator >= 0.2, containers >= 0.5, @@ -166,6 +166,9 @@ executable mailbox-count tasty >= 0.8, tasty-hunit >= 0.8 + default-language: + Haskell2010 + main-is: Main.hs @@ -176,31 +179,29 @@ executable mailbox-count Configuration CommandLine OptionalConfiguration - -- WARNING: the Paths_mailbox_count module is automatically generated by - -- Cabal itself. We don't want it included in the release tarballs, - -- since we typically want the paths that the user has configured. - -- Nevertheless, Cabal will complain if we don't include it here. Paths_mailbox_count Report + autogen-modules: + Paths_mailbox_count test-suite testsuite type: exitcode-stdio-1.0 hs-source-dirs: src test + default-language: Haskell2010 main-is: TestSuite.hs other-modules: Configuration OptionalConfiguration - -- WARNING: the Paths_mailbox_count module is automatically generated by - -- Cabal itself. We don't want it included in the release tarballs, - -- since we typically want the paths that the user has configured. - -- Nevertheless, Cabal will complain if we don't include it here. Paths_mailbox_count Report + autogen-modules: + Paths_mailbox_count + build-depends: - base >= 4.9 && < 5, + base >= 4.15 && < 5, cmdargs >= 0.10, configurator >= 0.2, containers >= 0.5, @@ -217,9 +218,10 @@ test-suite testsuite test-suite doctests type: exitcode-stdio-1.0 hs-source-dirs: test + default-language: Haskell2010 main-is: Doctests.hs build-depends: - base >= 4.9 && < 5, + base >= 4.15 && < 5, -- Additional test dependencies. doctest >= 0.9, filemanip >= 0.3.6