summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuint Guvernator2020-10-30 19:22:39 +0100
committerQuint Guvernator2020-10-30 19:36:15 +0100
commitd6c1b30e173ebfcdb5df9cc5f0965ec48d0311f9 (patch)
tree58ed84e962041439670f0257d3ef2f75855c62ac
parente388095fd56455c7ab54666197f439e8a94cd75a (diff)
parent68d14da2959dc9a91895c6085f0878153b158746 (diff)
downloadaur-d6c1b30e173ebfcdb5df9cc5f0965ec48d0311f9.tar.gz
merge suggestions from saengowp
-rw-r--r--.SRCINFO10
-rw-r--r--01-hp15c-arch-docs.patch29
-rw-r--r--01-package-path.patch32
-rw-r--r--PKGBUILD29
-rw-r--r--hp15c.desktop10
-rw-r--r--hp15c_runner.sh2
6 files changed, 71 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 410a9ad57b8e..8cdea2ea45df 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,20 @@
pkgbase = hp15c
pkgdesc = A simulator for the HP-15C programmable scientific RPN calculator
pkgver = 4.0.0
- pkgrel = 1
+ pkgrel = 2
url = http://hp-15c.homepage.t-online.de/content_web.htm
arch = any
license = GPL3
depends = tcl
depends = tk
source = hp15c-4.0.0.zip::https://drive.google.com/uc?export=download&id=1ewFXi6PPRsiPJESUq5A2Gp83NYSYVYKr
- source = 01-hp15c-arch-docs.patch
+ source = 01-package-path.patch
source = hp15c_runner.sh
+ source = hp15c.desktop
md5sums = c90cc630d9e5bdf70912f8cd754cc2cc
- md5sums = cb4a8e759f94860744057c20f90244e4
- md5sums = bdf3ff02949e3c716b782e8cec9ee8a1
+ md5sums = 1cce408ad1c6c8458681690e96a02508
+ md5sums = 33588adff38833aa1a2957457d4701b3
+ md5sums = bab776009feb1db971b92649c839ff1f
pkgname = hp15c
diff --git a/01-hp15c-arch-docs.patch b/01-hp15c-arch-docs.patch
deleted file mode 100644
index 793f826109c2..000000000000
--- a/01-hp15c-arch-docs.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff --git a/src/HP-15C.tcl b/src/HP-15C.tcl
-index 50238bb89c4c..da2886209ac1 100644
---- a/HP-15C.tcl
-+++ b/HP-15C.tcl
-@@ -3250,22 +3250,7 @@ proc help { topic } {
-
- global APPDATA HP15 errorInfo
-
-- switch $topic {
-- simulator {
--# Differentiate between running from a starpack or from wish
-- if {[info exists ::starkit::topdir]} {
-- set helpdir [file dirname $::starkit::topdir]
-- } else {
-- set helpdir [file dirname $::argv0]
-- }
-- if {[string compare $helpdir "."] == 0} {set helpdir [pwd]}
-- set helpfile "$helpdir/doc/index.htm"
-- }
-- prgm {
-- set helpfile "$HP15(prgmdir)/$HP15(prgmname).htm"
-- }
-- }
-- catch {set helpfile [file nativename [lindex [glob "$helpfile*"] 0]]}
-+ set helpfile "/usr/share/doc/hp15c/index.htm"
-
- if {[string length $HP15(browser)] == 0} {
- set msg [mc help.nobrowser]
----
diff --git a/01-package-path.patch b/01-package-path.patch
new file mode 100644
index 000000000000..03e17e047070
--- /dev/null
+++ b/01-package-path.patch
@@ -0,0 +1,32 @@
+diff --git a/HP-15C.tcl b/HP-15C.tcl
+old mode 100644
+new mode 100755
+index 50238bb..209392b
+--- a/HP-15C.tcl
++++ b/HP-15C.tcl
+@@ -62,7 +62,7 @@ array set APPDATA {
+ }
+
+ set APPDATA(SerialNo) "$APPDATA(build)[string map {. {}} $APPDATA(version)]"
+-set APPDATA(basedir) [file dirname [info script]]
++set APPDATA(basedir) "/usr/lib/hp15c"
+ set APPDATA(locale) [mclocale]
+
+ # Load language according to current locale
+@@ -3252,14 +3253,7 @@ proc help { topic } {
+
+ switch $topic {
+ simulator {
+-# Differentiate between running from a starpack or from wish
+- if {[info exists ::starkit::topdir]} {
+- set helpdir [file dirname $::starkit::topdir]
+- } else {
+- set helpdir [file dirname $::argv0]
+- }
+- if {[string compare $helpdir "."] == 0} {set helpdir [pwd]}
+- set helpfile "$helpdir/doc/index.htm"
++ set helpfile "/usr/share/doc/hp15c/index.htm"
+ }
+ prgm {
+ set helpfile "$HP15(prgmdir)/$HP15(prgmname).htm"
+---
diff --git a/PKGBUILD b/PKGBUILD
index 34635612d5b4..f394c7883e65 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,9 @@
# Maintainer: Quint Guvernator <quint@guvernator.net>
+# Contributor: Pipat Saengow <pay2630@gmail.com>
pkgname=hp15c
pkgver=4.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="A simulator for the HP-15C programmable scientific RPN calculator"
url="http://hp-15c.homepage.t-online.de/content_web.htm"
arch=('any')
@@ -10,16 +11,22 @@ license=('GPL3')
depends=('tcl' 'tk')
source=(
"$pkgname-$pkgver.zip::https://drive.google.com/uc?export=download&id=1ewFXi6PPRsiPJESUq5A2Gp83NYSYVYKr"
- "01-hp15c-arch-docs.patch"
+ "01-package-path.patch"
"hp15c_runner.sh"
+ "hp15c.desktop"
)
md5sums=('c90cc630d9e5bdf70912f8cd754cc2cc'
- 'cb4a8e759f94860744057c20f90244e4'
- 'bdf3ff02949e3c716b782e8cec9ee8a1')
+ '1cce408ad1c6c8458681690e96a02508'
+ '33588adff38833aa1a2957457d4701b3'
+ 'bab776009feb1db971b92649c839ff1f')
prepare() {
- # patch location of help files to match Arch standards
- patch -p1 -i "$srcdir/01-hp15c-arch-docs.patch"
+
+ # patch location of files to match Arch standards
+ patch -p1 -i "$srcdir/01-package-path.patch"
+
+ # extract icons
+ unzip icons/HP-15C-logo.zip -d $srcdir/icon_extract
}
package() {
@@ -31,12 +38,20 @@ package() {
# dependencies of script
mkdir -p "$pkgdir/usr/lib/$pkgname/"
- cp -r css icons lib msgs -t "$pkgdir/usr/lib/$pkgname/"
+ cp -r css icons lib msgs images -t "$pkgdir/usr/lib/$pkgname/"
install -Dm644 HP-15C_Simulator_Font.ttf -t "$pkgdir/usr/share/fonts/"
# runs script in proper directory
cp HP-15C.tcl -t "$pkgdir/usr/lib/$pkgname/"
install -D "$srcdir/hp15c_runner.sh" "$pkgdir/usr/bin/hp15c"
+
+ # install desktop entry
+ install -D hp15c.desktop "$pkgdir/usr/share/applications/hp15c.desktop"
+
+ # install icon
+ for i in 22 32 48 256 512 ; do
+ install -D "icon_extract/HP-15C-logo-${i}x${i}.png" "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/hp15c.png"
+ done
}
# vim:set ts=4 sw=4 ft=sh et:
diff --git a/hp15c.desktop b/hp15c.desktop
new file mode 100644
index 000000000000..7ee6ce3c74c6
--- /dev/null
+++ b/hp15c.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+
+Type=Application
+Version=1.0
+Name=HP-15C
+Comment=HEWLETT-PACKARD 15C Simulator
+Exec=hp15c
+Icon=hp15c
+Terminal=false
+Categories=Utility;Calculator;
diff --git a/hp15c_runner.sh b/hp15c_runner.sh
index e3f320f7b6df..7d4500b66f49 100644
--- a/hp15c_runner.sh
+++ b/hp15c_runner.sh
@@ -1,4 +1,4 @@
#!/bin/sh
# runs HP-15C tcl script in proper directory
cd /usr/lib/hp15c
-/usr/bin/wish HP-15C.tcl
+/usr/bin/wish HP-15C.tcl "$@"