diff mbox series

[bug#43975,1/1] gnu: Add ccal.

Message ID 20201013082216.25044-1-pengmeiyu@riseup.net
State Accepted
Headers show
Series gnu: Add ccal [And asking for help on license issue]. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Peng Mei Yu Oct. 13, 2020, 8:22 a.m. UTC
* gnu/packages/calendar.scm (ccal): New variable.
---
 gnu/packages/calendar.scm | 41 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

Comments

Marius Bakke Oct. 18, 2020, 9:51 p.m. UTC | #1
Peng Mei Yu <pengmeiyu@riseup.net> writes:

> * gnu/packages/calendar.scm (ccal): New variable.

Applied with minor tweaks to the description (@command markup), and
with a comment regarding the licenses.  Thank you!
diff mbox series

Patch

diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm
index 9987ae1bf8..0123f75c1b 100644
--- a/gnu/packages/calendar.scm
+++ b/gnu/packages/calendar.scm
@@ -9,6 +9,7 @@ 
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com
 ;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
+;;; Copyright © 2020 Peng Mei Yu <pengmeiyu@riseup.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -339,3 +340,43 @@  DebConf, FrOSCon, Grazer LinuxTage, and the CCC congresses.
 ConfClerk is targeted at mobile devices but works on any system running Qt.")
     (license (list license:gpl2+
                    license:lgpl3)))) ; or cc-by3.0 for src/icons/*
+
+(define-public ccal
+  (package
+    (name "ccal")
+    (version "2.5.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://ccal.chinesebay.com/ccal/ccal-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "15nza1d1lvk3dp0wcl53wsd32yhbgyzznha092mh5kh5z74vsk1x"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* "Makefile"
+                 (("/usr/local/bin")
+                  (string-append out "/bin"))
+                 (("/usr/local/man")
+                  (string-append out "/share/man"))))
+             #t))
+         (add-after 'install 'install-manuals
+           (lambda _
+             (invoke "make" "install-man"))))
+       ;; no tests
+       #:tests? #f))
+    (home-page "http://ccal.chinesebay.com/ccal/ccal.htm")
+    (synopsis "Command line program for Chinese calendar")
+    (description "@code{ccal} is a command line program which writes a
+Gregorian calendar together with Chinese calendar to standard output.  Its
+usage is similar to the cal program generally available on Unix platforms.  In
+addition to console output, it can also generate Encapsulated Postscript and
+HTML table outputs for use in do-it-yourself calendars and web pages.  It
+supports both simplified and traditional Chinese characters.")
+    (license (list license:gpl2+
+                   license:lgpl2.1+))))