diff options
author | Pipat Saengow | 2019-06-01 06:07:00 +0200 |
---|---|---|
committer | Quint Guvernator | 2020-10-30 19:00:20 +0100 |
commit | 68d14da2959dc9a91895c6085f0878153b158746 (patch) | |
tree | e4593b262fd32f717fbbb44b4a6b1ab6937745ae | |
parent | e388095fd56455c7ab54666197f439e8a94cd75a (diff) | |
download | aur-68d14da2959dc9a91895c6085f0878153b158746.tar.gz |
fixed about and preference page, and add desktop entry
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | 01-hp15c-arch-docs.patch | 29 | ||||
-rw-r--r-- | 01-package-path.patch | 46 | ||||
-rw-r--r-- | 02-executable.patch | 14 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | hp15c.desktop | 10 | ||||
-rw-r--r-- | hp15c_runner.sh | 4 |
7 files changed, 106 insertions, 49 deletions
@@ -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 = hp15c_runner.sh + source = 01-package-path.patch + source = 02-executable.patch + source = hp15c.desktop md5sums = c90cc630d9e5bdf70912f8cd754cc2cc - md5sums = cb4a8e759f94860744057c20f90244e4 - md5sums = bdf3ff02949e3c716b782e8cec9ee8a1 + md5sums = dc2c7e620a146bb718f05060393080ac + md5sums = d18b93bc1077430fed1e3563042a69ea + 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..9b7a4f554f58 --- /dev/null +++ b/01-package-path.patch @@ -0,0 +1,46 @@ +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 +@@ -487,6 +487,7 @@ if {![file exists $dnam]} { + set dnam "$APPDATA(basedir)/images" + } + ++ + foreach img {PrefIconSimulator.gif PrefIconSystem.gif PrefIconFiles.gif + PrefIconDM15CC.gif PrefIconFonts.gif PrefIconHelp.gif PrevIconDev.gif + dispframe.gif HP-15C-logo-256.png HP-15C-logo-512.png} { +@@ -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" +@@ -9507,4 +9501,4 @@ option add *tearOff 0 + # ------------------------------------------------------------------------------ + # And now let the window manager show the interface in all it's beauty... + wm deiconify . +-#set curdisp " XP-15C" +\ No newline at end of file ++#set curdisp " XP-15C" diff --git a/02-executable.patch b/02-executable.patch new file mode 100644 index 000000000000..bbdd36a4bf87 --- /dev/null +++ b/02-executable.patch @@ -0,0 +1,14 @@ +diff --git a/HP-15C.tcl b/HP-15C.tcl +index 209392b..2990af9 100755 +--- a/HP-15C.tcl ++++ b/HP-15C.tcl +@@ -1,3 +1,9 @@ ++#!/bin/sh ++# the next line restarts using wish \ ++TCLLIBPATH="/usr/lib/hp15c/lib" exec wish "$0" "$@" ++ ++# ----------------- Make script executable, see https://www.tcl.tk/man/tcl8.3/UserCmd/wish.htm ++ + # ------------------------------------------------------------------------------ + # + # H E W L E T T - P A C K A R D 15C @@ -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,23 @@ license=('GPL3') depends=('tcl' 'tk') source=( "$pkgname-$pkgver.zip::https://drive.google.com/uc?export=download&id=1ewFXi6PPRsiPJESUq5A2Gp83NYSYVYKr" - "01-hp15c-arch-docs.patch" - "hp15c_runner.sh" + "01-package-path.patch" + "02-executable.patch" + "hp15c.desktop" ) md5sums=('c90cc630d9e5bdf70912f8cd754cc2cc' - 'cb4a8e759f94860744057c20f90244e4' - 'bdf3ff02949e3c716b782e8cec9ee8a1') + 'dc2c7e620a146bb718f05060393080ac' + 'd18b93bc1077430fed1e3563042a69ea' + 'bab776009feb1db971b92649c839ff1f') prepare() { - # patch location of help files to match Arch standards - patch -p1 -i "$srcdir/01-hp15c-arch-docs.patch" + # patch + for file in $srcdir/*.patch; do + patch -p1 -i $file + done + + #Extract icons + unzip icons/HP-15C-logo.zip -d $srcdir/icon_extract } package() { @@ -31,12 +39,22 @@ 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" + # set up launch script + install -m 755 HP-15C.tcl -t "$pkgdir/usr/lib/$pkgname/" + mkdir -p "$pkgdir/usr/bin" + ln -s "/usr/lib/$pkgname/HP-15C.tcl" "$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 deleted file mode 100644 index e3f320f7b6df..000000000000 --- a/hp15c_runner.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# runs HP-15C tcl script in proper directory -cd /usr/lib/hp15c -/usr/bin/wish HP-15C.tcl |