diff options
author | Darren Ng | 2021-03-27 22:25:17 +0800 |
---|---|---|
committer | Darren Ng | 2021-03-27 22:25:17 +0800 |
commit | abf6154750b2d6c5c260c8f695bb80ee813f1559 (patch) | |
tree | 3c4608bf166b2f49adc5f53695202bc00dbb9597 | |
parent | 9f3206f35f65adaf01a388a96afa7c8ff100607a (diff) | |
download | aur-abf6154750b2d6c5c260c8f695bb80ee813f1559.tar.gz |
+desktop +mime
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | i8086emu.xml | 13 | ||||
-rw-r--r-- | net.sourceforge.i8086emu.i8086gui.desktop | 47 | ||||
-rw-r--r-- | net.sourceforge.i8086emu.i8086text.desktop | 23 |
6 files changed, 126 insertions, 17 deletions
@@ -1,22 +1,31 @@ pkgbase = i8086emu-git pkgdesc = cross-platform emulator for the Intel 8086 microprocessor pkgver = 0.9.2.r35.1143f09 - pkgrel = 1 + pkgrel = 2 epoch = 1 url = http://i8086emu.sourceforge.net/ arch = x86_64 license = GPL2 + makedepends = cmake + makedepends = desktop-file-utils makedepends = git makedepends = nasm - makedepends = cmake depends = gtk2 depends = beep provides = i8086emu conflicts = i8086emu source = i8086emu::git+https://git.code.sf.net/p/i8086emu/git + source = http://i8086emu.sourceforge.net/dl/i8086.pdf source = extern.patch + source = i8086emu.xml + source = net.sourceforge.i8086emu.i8086gui.desktop + source = net.sourceforge.i8086emu.i8086text.desktop sha1sums = SKIP + sha1sums = 11d730bde4fc248fb2ae37785af564e884c62b66 sha1sums = a5c1091422a1f9454a6fa161107781854f387896 + sha1sums = d3667ed6dc769ba4d7054a5eb4736f118c02bcc2 + sha1sums = cb75fe18ded8ed3f86ef159d08309b62e8739a11 + sha1sums = 48d414d51f66852c70e37d3c69d9613bb88eacac pkgname = i8086emu-git diff --git a/.gitignore b/.gitignore index c869f14a08fb..b8032cb731a7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ !PKGBUILD !.SRCINFO -!extern.patch +!*.patch +!*.desktop +!*.xml @@ -1,24 +1,33 @@ # Maintainer: Darren Ng <$(base64 --decode <<<VW4xR2ZuQGdtYWlsLmNvbQo=)> pkgname=i8086emu-git pkgver=0.9.2.r35.1143f09 -pkgrel=1 +pkgrel=2 epoch=1 pkgdesc="cross-platform emulator for the Intel 8086 microprocessor" arch=($CARCH) -url=http://${pkgname%-git}.sourceforge.net/ +url=http://"${pkgname%-*}".sourceforge.net/ license=(GPL2) -depends=(gtk2 beep) -makedepends=(git nasm cmake) -provides=(${pkgname%-git}) -conflicts=(${pkgname%-git}) +depends=(gtk2 beep) # shared-mime-info # namcap: W: unneeded dependency on a package run when needed by hooks. +makedepends=(cmake desktop-file-utils git nasm) +provides=("${pkgname%-*}") +conflicts=("${pkgname%-*}") # (A) # source=(file:///dev/null) # md5sums=(SKIP) # (B) -source=(${pkgname%-git}::git+https://git.code.sf.net/p/i8086emu/git extern.patch) -sha1sums=(SKIP a5c1091422a1f9454a6fa161107781854f387896) +source=("${pkgname%-*}"::git+https://git.code.sf.net/p/i8086emu/git + http://"${pkgname%-*}".sourceforge.net/dl/i8086.pdf + extern.patch + "${pkgname%-*}".xml + net.sourceforge."${pkgname%-*}"."${pkgname%emu*}"{gui,text}.desktop) +sha1sums=(SKIP + 11d730bde4fc248fb2ae37785af564e884c62b66 + a5c1091422a1f9454a6fa161107781854f387896 + d3667ed6dc769ba4d7054a5eb4736f118c02bcc2 + cb75fe18ded8ed3f86ef159d08309b62e8739a11 + 48d414d51f66852c70e37d3c69d9613bb88eacac) prepare() { @@ -26,9 +35,9 @@ prepare() { # cp -a ~/i8086emu.git/ ./ # (B) - patch --directory=${pkgname%-git} --input=- --strip=1 --verbose <extern.patch # --dry-run + patch --directory="${pkgname%-*}" --input=- --strip=1 --verbose <extern.patch # --dry-run - cd ${pkgname%-git}/${pkgname%-git}/src + cd "${pkgname%-*}"/"${pkgname%-*}"/src # https://unix.stackexchange.com/a/450857 # Insert text blob w/ sed in case any whitespace get messed up @@ -45,14 +54,14 @@ prepare() { } pkgver() { - cd ${pkgname%-git} + cd "${pkgname%-*}" # cutting off 'v' prefix that presents in the git tag printf "%s" "$(git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')" } build() { - cd ${pkgname%-git}/${pkgname%-git}/ + cd "${pkgname%-*}/${pkgname%-*}" export CFLAGS="-fPIC $CFLAGS" # i8086text @@ -67,7 +76,7 @@ build() { --exec-prefix=/usr \ \ --sbindir=/usr/bin \ - --libexecdir=/usr/lib/${pkgname%-git} \ + --libexecdir=/usr/lib/"${pkgname%-*}" \ --sysconfdir=/etc \ --localstatedir=/var \ --infodir=/usr/share/doc \ @@ -93,7 +102,7 @@ build() { # makepkg --noextract --holdver --repackage package() { - cd ${pkgname%-git}/${pkgname%-git}/ + cd "${pkgname%-*}/${pkgname%-*}" # i8086text make DESTDIR="$pkgdir" install @@ -104,6 +113,7 @@ package() { "$pkgdir/usr/lib/i8086emu/i8086pit.so" rmdir -v "$pkgdir/usr/lib/i8086emu" + # only stub dirs remain [ -z "$(ls -A "$pkgdir/usr/bin")" ] [ -z "$(ls -A "$pkgdir/usr/lib")" ] @@ -112,4 +122,9 @@ package() { install -vDm755 cmake_build_gui/lib/*.so "$pkgdir/usr/lib/" install -vDm644 cmake_build_gui/lib/*.a "$pkgdir/usr/lib/" + cd "$srcdir" + [ -z "$(desktop-file-validate *.desktop 2>&1)" ] + install -vdm755 "$pkgdir/usr/share/applications/"; install -vDm644 *.desktop "$_/" + install -vDm644 {,"$pkgdir/usr/share/mime/packages/"}"${pkgname%-*}".xml + } diff --git a/i8086emu.xml b/i8086emu.xml new file mode 100644 index 000000000000..41f57ff05d37 --- /dev/null +++ b/i8086emu.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/usr/share/mime/text/vnd.abc.xml +/usr/share/mime/packages/kde5.xml +pacman -Qoq /usr/share/mime/ | grep -v shared-mime-info | pacman -Ql - | grep /usr/share/mime +--> +<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> + <mime-type type="text/vnd.i8086emu"> + <sub-class-of type="text/plain"/> + <comment>Intel 8086 assembly</comment> + <glob pattern="*.asm"/> + </mime-type> +</mime-info> diff --git a/net.sourceforge.i8086emu.i8086gui.desktop b/net.sourceforge.i8086emu.i8086gui.desktop new file mode 100644 index 000000000000..8ef5eb233b07 --- /dev/null +++ b/net.sourceforge.i8086emu.i8086gui.desktop @@ -0,0 +1,47 @@ +# https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html +# https://wiki.archlinux.org/index.php/Desktop_entries#File_example +# desktop-file-validate + +# desktop-file-install --dir="$pkgdir/usr/share/applications" i8086gui.desktop + +# /usr/share/libalpm/hooks/update-desktop-database.hook + +[Desktop Entry] + +Type=Application +Version=1.4 + +NoDisplay=false +Hidden=false +Name=i8086gui +GenericName=SBC86 Emulator - GTK2 +Comment=Cross-platform emulator for the Intel 8086 microprocessor (GTK2) + +# https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#value-types +# type "iconstring" +Icon=/usr/share/pixmaps/i8086icon.png + +# https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/ +# Path= +# PrefersNonDefaultGPU= +# StartupNotify= +# StartupWMClass= +Terminal=false +MimeType=text/plain; +TryExec=/usr/bin/i8086gui +Exec=/usr/bin/i8086gui + +# https://specifications.freedesktop.org/menu-spec/menu-spec-1.0.html#category-registry +Categories=Emulator;System; + +DBusActivatable=false +# Implements= + +Keywords=8086;asm;assembly;emulator;gtk;gtk2;x86; + +# OnlyShowIn= +# NotShowIn= + +# Actions=new-window;new-private-window; +# [Desktop Action new-window] +# [Desktop Action new-private-window] diff --git a/net.sourceforge.i8086emu.i8086text.desktop b/net.sourceforge.i8086emu.i8086text.desktop new file mode 100644 index 000000000000..891b2a3e8f18 --- /dev/null +++ b/net.sourceforge.i8086emu.i8086text.desktop @@ -0,0 +1,23 @@ +[Desktop Entry] + +Type=Application +Version=1.4 + +NoDisplay=false +Hidden=false +Name=i8086text +GenericName=SBC86 Emulator - Ncurses +Comment=Cross-platform emulator for the Intel 8086 microprocessor (Ncurses) + +MimeType=text/vnd.i8086emu; + +Terminal=true +TryExec=/usr/bin/i8086text +Exec=/usr/bin/i8086text + +# https://specifications.freedesktop.org/menu-spec/menu-spec-1.0.html#category-registry +Categories=Emulator;System; + +DBusActivatable=false + +Keywords=8086;asm;assembly;emulator;ncurses;x86; |