summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--.gitignore6
-rw-r--r--0001-include-format-specifier-in-printf.patch11
-rw-r--r--PKGBUILD45
-rw-r--r--tty-clock.LICENSE26
5 files changed, 83 insertions, 26 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 397a6d24e1b8..31c0e416769a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,18 @@
pkgbase = tty-clock
- pkgdesc = Analog clock in ncurses
- pkgver = 0.1
- pkgrel = 1
- url = http://github.com/xorg62/tty-clock
+ pkgdesc = Digital clock in ncurses
+ pkgver = 2.3
+ pkgrel = 2
+ url = https://github.com/xorg62/tty-clock
arch = i686
arch = x86_64
- license = unknown
- makedepends = git
+ license = BSD
+ depends = glibc
depends = ncurses
- source = git://github.com/xorg62/tty-clock.git#tag=v0.1
- md5sums = SKIP
+ source = tty-clock-2.3.tar.gz::https://github.com/xorg62/tty-clock/archive/v2.3.tar.gz
+ source = 0001-include-format-specifier-in-printf.patch
+ source = tty-clock.LICENSE
+ b2sums = 16e764c6321407ba1a4545de6f7aeb5b1b1f3e0d94d2e05ef9a95a20bc178b11962518a946aa292f35be0a293d12e3739353d2da80358e86d4bf9c29983a81d6
+ b2sums = 07f2c0ff6eb327ddc2dbf93378ce1c2e4b214f84596c8a0550e85d125d6f7cdf3a0daf52a6ea39b0f25f1f4e6995652babbcca39fb32acf22a7e2e9b46130757
+ b2sums = af8bab79f40f29e7020a9e977be72f71cf00a3864aa9461058343e662f8fa87fc0c6cc8421649d6ff4adbede47f9f2af28fb6958a60db8aa41d111e09481da47
pkgname = tty-clock
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..e1347e61ac9b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/*
+!/.gitignore
+!/.SRCINFO
+!/PKGBUILD
+!/0001-include-format-specifier-in-printf.patch
+!/tty-clock.LICENSE
diff --git a/0001-include-format-specifier-in-printf.patch b/0001-include-format-specifier-in-printf.patch
new file mode 100644
index 000000000000..f6ca84d950da
--- /dev/null
+++ b/0001-include-format-specifier-in-printf.patch
@@ -0,0 +1,11 @@
+--- a/ttyclock.c 2023-05-18 17:40:41.952705459 -0400
++++ b/ttyclock.c 2023-05-18 17:45:32.900566109 -0400
+@@ -275,7 +275,7 @@
+ if (ttyclock->option.date)
+ {
+ wbkgdset(ttyclock->datewin, (COLOR_PAIR(2)));
+- mvwprintw(ttyclock->datewin, (DATEWINH / 2), 1, ttyclock->date.datestr);
++ mvwprintw(ttyclock->datewin, (DATEWINH / 2), 1, "%s", ttyclock->date.datestr);
+ wrefresh(ttyclock->datewin);
+ }
+
diff --git a/PKGBUILD b/PKGBUILD
index 0507d6b5af99..ef944f26f78f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,35 @@
-# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
+# Maintainer: éclairevoyant
+# Contributor: Kyle Keen <keenerd at gmail dot com>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux dot us>
pkgname=tty-clock
-pkgver=0.1
-pkgrel=1
-pkgdesc="Analog clock in ncurses"
-arch=('i686' 'x86_64')
-url="http://github.com/xorg62/tty-clock"
-license=('unknown')
-depends=('ncurses')
-makedepends=('git')
-source=("git://github.com/xorg62/tty-clock.git#tag=v$pkgver")
-md5sums=("SKIP")
+pkgver=2.3
+pkgrel=2
+pkgdesc="Digital clock in ncurses"
+arch=(i686 x86_64)
+url="https://github.com/xorg62/$pkgname"
+license=(BSD)
+depends=(glibc ncurses)
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
+ 0001-include-format-specifier-in-printf.patch
+ $pkgname.LICENSE)
+b2sums=('16e764c6321407ba1a4545de6f7aeb5b1b1f3e0d94d2e05ef9a95a20bc178b11962518a946aa292f35be0a293d12e3739353d2da80358e86d4bf9c29983a81d6'
+ '07f2c0ff6eb327ddc2dbf93378ce1c2e4b214f84596c8a0550e85d125d6f7cdf3a0daf52a6ea39b0f25f1f4e6995652babbcca39fb32acf22a7e2e9b46130757'
+ 'af8bab79f40f29e7020a9e977be72f71cf00a3864aa9461058343e662f8fa87fc0c6cc8421649d6ff4adbede47f9f2af28fb6958a60db8aa41d111e09481da47')
+
+prepare() {
+ cd $pkgname-$pkgver
+ patch -Np1 -i ../0001-include-format-specifier-in-printf.patch
+}
build() {
- cd "$srcdir/$pkgname"
- make
+ make -C $pkgname-$pkgver
}
package() {
- cd "$srcdir/$pkgname"
- install -d "$pkgdir/usr/bin"
- install -m 755 $pkgname "$pkgdir/usr/bin/$pkgname"
-}
+ install -Dm644 $pkgname.LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ cd $pkgname-$pkgver
+ install -Dm755 $pkgname -t "$pkgdir/usr/bin/"
+ install -Dm655 $pkgname.1 -t "$pkgdir/usr/share/man/man1/"
+}
diff --git a/tty-clock.LICENSE b/tty-clock.LICENSE
new file mode 100644
index 000000000000..afda4731b142
--- /dev/null
+++ b/tty-clock.LICENSE
@@ -0,0 +1,26 @@
+Copyright (c) 2009-2018 tty-clock contributors
+Copyright (c) 2008-2009 Martin Duquesnoy <xorg62@gmail.com>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+* Neither the name of the nor the names of its
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.