summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfelics2018-06-29 13:33:19 +0200
committerfelics2018-06-29 13:33:19 +0200
commitd70e4985ef515e59ab89554349110c291c9c7752 (patch)
tree6aef2c67b41e2936a3aa8935c8cb4223e2db9c6e
downloadaur-d70e4985ef515e59ab89554349110c291c9c7752.tar.gz
Initial Commit
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD105
2 files changed, 123 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..227c7c8c1c92
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = tapecalc
+ pkgdesc = Fixed-point calculator as a fullscreen editor. You may edit at any position in the expression list. Supports basic arithmetic, interest and sales tax computation. Designed for use as a checkbook or expense-account balancing tool. Formerly known as 'add'.
+ pkgver = t20180401
+ pkgrel = 1
+ url = http://invisible-island.net/add/add.html
+ arch = i686
+ arch = x86_64
+ arch = arm
+ arch = arm64
+ license = custom: free software
+ depends = ncurses
+ options = emptydirs
+ options = strip
+ source = ftp://ftp.invisible-island.net/add/add.tar.gz
+ sha256sums = 05996d853cfe7fdebfc3aac4458b3980f5548515599a745d6033743ee2cd3314
+
+pkgname = tapecalc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..688b76daf1b3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,105 @@
+#!/bin/bash
+
+_pkgname=tapecalc
+pkgname="${_pkgname}"
+pkgver=t20180401
+pkgrel=1
+
+pkgdesc="Fixed-point calculator as a fullscreen editor. You may edit at any position in the expression list. Supports basic arithmetic, interest and sales tax computation. Designed for use as a checkbook or expense-account balancing tool. Formerly known as 'add'."
+url="http://invisible-island.net/add/add.html"
+license=('custom: free software')
+
+arch=(
+ 'i686'
+ 'x86_64'
+ 'arm'
+ 'arm64'
+)
+
+depends=(
+ 'ncurses'
+)
+makedepends=()
+optdepends=()
+provides=()
+replaces=()
+conflicts=()
+
+options=('emptydirs' 'strip')
+
+source=(
+ "ftp://ftp.invisible-island.net/add/add.tar.gz"
+)
+
+sha256sums=(
+ '05996d853cfe7fdebfc3aac4458b3980f5548515599a745d6033743ee2cd3314'
+)
+
+# Since the downloaded file extracts to directories having the version in the name, we want to get the latest one, in case we have old source lying around.
+_latestdir() {
+ # Arguments: $1 (optional): Base directory where to search.
+ local _dir
+ if [ $# -ge 1 ]; then
+ _dir="$1/"
+ else
+ _dir=''
+ fi
+ find "${_dir}"add-* -maxdepth 0 -mindepth 0 -type d | sort --version-sort -r | head -n 1
+}
+
+prepare() {
+ cd "$(_latestdir "${srcdir}")"
+
+ # The make system's renaming does not change the executable name in 'x+', so we do it by hand here:
+ msg "Fixing executable name in 'x+' ..."
+ sed -E "s|([[:space:]])add([[:space:]])|\1${_pkgname}\2|" -i "xterm.sh"
+
+ # The way specifiyng a font size is a bit broken. Changing it ...
+ msg "Changing the way to specify fontsize in 'x+' ..."
+ sed -E "s|([[:space:]])\-fn[[:space:]]+[0-9]+x[0-9]+([[:space:]])|\1-xrm 'xterm*font:*-fixed-*-*-*-20-*'\2|" -i "xterm.sh"
+}
+
+pkgver() {
+ # # We can extract the version information from the extracted directory name, which is simpler:
+ # echo "t$(basename "$(_latestdir "${srcdir}")" | sed 's|^[^\-]*-||')"
+
+ # Or we can extract it from the makefile.in, which is consistent with what would end up in the executable:
+ cd "$(_latestdir "${srcdir}")"
+ grep -E '^[[:space:]]*RELEASE[[:space:]]*=.*[0-9]+' makefile.in | cut -d= -f2 | tr -d '[[:space:]]'
+}
+
+
+build() {
+ cd "$(_latestdir "${srcdir}")"
+ ./configure \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/bin \
+ --sysconfdir=/etc \
+ --sharedstatedir=/var/lib \
+ --includedir=/usr/include \
+ --oldincludedir=/usr/include \
+ --program-transform-name 's|add|tapecalc|' \
+ --with-ncurses \
+ --with-ncursesw \
+ --without-pdcurses \
+ --without-x \
+ --without-Xaw3d \
+ --without-Xaw3dxft \
+ --without-neXtaw \
+ --without-XawPlus
+ make
+}
+
+package() {
+ cd "$(_latestdir "${srcdir}")"
+
+ make DESTDIR="${pkgdir}" install
+ chmod 644 "${pkgdir}/usr/share"/*.hlp
+
+ for _docfile in CHANGES README; do
+ install -v -D -m644 "${_docfile}" "${pkgdir}/usr/share/doc/${_pkgname}/${_docfile}"
+ done
+
+ install -v -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}