diff options
-rw-r--r-- | .SRCINFO | 38 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | PKGBUILD | 73 | ||||
-rw-r--r-- | install.sh | 65 | ||||
-rw-r--r-- | layout-evdev-install.hook | 9 | ||||
-rw-r--r-- | layout-evdev-remove.hook | 9 | ||||
-rw-r--r-- | level3_np | 8 | ||||
-rw-r--r-- | np | 69 | ||||
-rw-r--r-- | uninstall.sh | 38 |
9 files changed, 267 insertions, 46 deletions
@@ -1,20 +1,24 @@ pkgbase = pkgbase - pkgdesc = Virtual Satania Desktop Assistant - pkgver = r68.ade3a6f + pkgdesc = नेपाली कुन्जीपेटि विन्यास A better layout for Nepali Keyboards based for xkb system + pkgver = 0.1 pkgrel = 1 - url = https://git.cianig.ga/monkeyballs/sataniabuddy - arch = x86_64 - arch = i686 - license = AGPL - makedepends = git - makedepends = make - makedepends = gcc - depends = openmotif - depends = cairo - depends = xorg-server - provides = satania-buddy - conflicts = satania-buddy - source = git+https://git.cianig.ga/monkeyballs/sataniabuddy - md5sums = SKIP + url = https://gitlab.com/ayys/nekuvi + arch = any + license = GPL + depends = xkeyboard-config + source = install.sh + source = uninstall.sh + source = Makefile + source = level3_np + source = np + source = layout-evdev-install.hook + source = layout-evdev-remove.hook + sha256sums = 27bd5a76ef85a97a95248a5530446c3362064aab2146f8d7ceefdf8969a7a7c7 + sha256sums = 0614ff1b4abd4fe0fb07cf95ebb60dee90180dadf19232b8e5fc94d75d67e555 + sha256sums = aa67ed7c7c2bfdbce0b98789628f24efc5876708026a3e3c3e74125164a661ee + sha256sums = d5965a2ad14b8d9f6bed0bfdd37282dc1a67938577fa7fbe53d56be305583688 + sha256sums = 819c86fecd6ec4a9ec57308fb00b13ffb040b238b29cf9564934d23692d4a917 + sha256sums = 978abf768110916b04c10c3fd7690370b3e55d98090a5a411faf586ca8e48756 + sha256sums = 3ec3ebb0324103f747b0e1ef7828664596b5db87ab82202a8213ed743025115b -pkgname = satania-buddy-git +pkgname = nekuvi diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..1c6ff6c13c95 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +install: + cp level3_np $(DESTDIR)/usr/share/X11/xkb/symbols/ + cp np $(DESTDIR)/usr/share/X11/xkb/symbols/np_prog + bash install.sh @@ -1,33 +1,48 @@ -# Maintainer: monkeyballs <mydick@cunny.com> - -pkgname="satania-buddy-git" -_pkgname="sataniabuddy" -pkgver=r68.ade3a6f +# Maintainer: Ayush Jha <ayushjha@pm.me> +pkgname=nekuvi +pkgver=0.1 pkgrel=1 -pkgdesc="Virtual Satania Desktop Assistant" -arch=("x86_64" "i686") -url="https://git.cianig.ga/monkeyballs/sataniabuddy" -license=('AGPL') -depends=("openmotif" "cairo" "xorg-server") -makedepends=("git" "make" "gcc") -provides=("satania-buddy") -conflicts=("satania-buddy") +epoch= +pkgdesc="नेपाली कुन्जीपेटि विन्यास A better layout for Nepali Keyboards based for xkb system" +arch=("any") +url="https://gitlab.com/ayys/nekuvi" +license=('GPL') +groups=() +depends=("xkeyboard-config") +makedepends=() +checkdepends=() +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() options=() -source=(git+https://git.cianig.ga/monkeyballs/sataniabuddy) -md5sums=('SKIP') -prepare() { - cd "$srcdir"/"$_pkgname" - sed -i "s/AssetDirectory = \"\/usr\/local\/share\/satania\/assets\"/AssetDirectory = \"\/usr\/share\/satania\/assets\"/" main.c -} -build() { - cd "$srcdir"/"$_pkgname" - make -} -pkgver() { - cd "$srcdir"/"$_pkgname" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} +install= +changelog= +source=("install.sh" "uninstall.sh" "level3_np" "np" "layout-evdev-install.hook" "layout-evdev-remove.hook") +sha256sums=('27bd5a76ef85a97a95248a5530446c3362064aab2146f8d7ceefdf8969a7a7c7' + '0614ff1b4abd4fe0fb07cf95ebb60dee90180dadf19232b8e5fc94d75d67e555' + 'd5965a2ad14b8d9f6bed0bfdd37282dc1a67938577fa7fbe53d56be305583688' + '819c86fecd6ec4a9ec57308fb00b13ffb040b238b29cf9564934d23692d4a917' + '978abf768110916b04c10c3fd7690370b3e55d98090a5a411faf586ca8e48756' + '3ec3ebb0324103f747b0e1ef7828664596b5db87ab82202a8213ed743025115b') + + +noextract=() +validpgpkeys=() + package() { - cd "$srcdir"/"$_pkgname" - make PREFIX="$pkgdir/usr" install + set -euxo pipefail + cd "$pkgname-master" + echo $pkgdir + + mkdir -p "$pkgdir"/usr/share/X11/xkb/symbols/ + mkdir -p "$pkgdir"/usr/share/X11/xkb/rules/ + cp level3_np "$pkgdir"/usr/share/X11/xkb/symbols/ + cp np "$pkgdir"/usr/share/X11/xkb/symbols/np_prog + + install -Dm 755 "${srcdir}"/install.sh "${pkgdir}/usr/share/libalpm/scripts/install-nekuvi-layout" + install -Dm 755 "${srcdir}"/uninstall.sh "${pkgdir}/usr/share/libalpm/scripts/uninstall-nekuvi-layout" + install -Dm 644 "${srcdir}"/layout-evdev-install.hook "${pkgdir}"/usr/share/libalpm/hooks/nekuvi-layout-evdev-install.hook + install -Dm 644 "${srcdir}"/layout-evdev-remove.hook "${pkgdir}"/usr/share/libalpm/hooks/nekuvi-layout-evdev-remove.hook } diff --git a/install.sh b/install.sh new file mode 100644 index 000000000000..4491f489c700 --- /dev/null +++ b/install.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +TMP_DIR=/tmp/nekuvi/ + +copy_files() { + mkdir -p "$TMP_DIR" + cp /usr/share/X11/xkb/rules/evdev.lst "$TMP_DIR" + cp /usr/share/X11/xkb/rules/evdev.xml "$TMP_DIR" +} + +append_evdev_lst() { + pushd "$TMP_DIR" + + if grep -q "np_prog" evdev.lst; then + echo "WARNING: evdev.lst already updated. This could mean that you may have tried to install this package previously. Continuing installation." + else + sed -i '/! layout/a \ \ np_prog \t Nepali for programmers' evdev.lst + fi + popd +} + +append_evdev_xml() { + pushd "$TMP_DIR" + read -r -d '' np_prog_layout <<EOF || true +<!-- BEGIN np_prog --> + <layout> + <configItem> + <name>np_prog</name> + + <shortDescription>np_prog</shortDescription> + <description>Nepali for programmers</description> + <languageList> + <iso639Id>nep</iso639Id> + </languageList> + </configItem> + </layout> +<!-- END np_prog --> +EOF + + if grep -q "np_prog" evdev.xml; then + echo "WARNING: evdev.lst already updated. This could mean that you may have tried to install this package previously. Continuing installation." + else + awk -v layout="$np_prog_layout" '{ print } /<layoutList>/ { print layout }' evdev.xml > temp.xml + cp temp.xml evdev.xml + fi + popd +} + +install_evdev() { + pushd "$TMP_DIR" + cp evdev.* /usr/share/X11/xkb/rules/ + popd +} + +process() { + copy_files # copies the necessary files to a temp dir for us + append_evdev_lst # modify evdev.lst with np_prog + append_evdev_xml # add np_prog to evdev.xml + install_evdev +} + + +process diff --git a/layout-evdev-install.hook b/layout-evdev-install.hook new file mode 100644 index 000000000000..3e58409c802c --- /dev/null +++ b/layout-evdev-install.hook @@ -0,0 +1,9 @@ +[Trigger] +Type = Package +Operation = Install +Operation = Upgrade +Target = nekuvi +[Action] +When = PostTransaction +Description = Adding evdev rules for np_prog... +Exec = /usr/share/libalpm/scripts/install-nekuvi-layout diff --git a/layout-evdev-remove.hook b/layout-evdev-remove.hook new file mode 100644 index 000000000000..d730190bf8ea --- /dev/null +++ b/layout-evdev-remove.hook @@ -0,0 +1,9 @@ +[Trigger] +Type = Package +Operation = Remove +Target = nekuvi + +[Action] +Description = Removing evdev rules for np_prog... +When = PreTransaction +Exec = /usr/share/libalpm/scripts/uninstall-nekuvi-layout diff --git a/level3_np b/level3_np new file mode 100644 index 000000000000..6e7416deabd2 --- /dev/null +++ b/level3_np @@ -0,0 +1,8 @@ +partial modifier_keys +xkb_symbols "caps_switch_latch" { + key <CAPS> { + type[Group1]="THREE_LEVEL", + symbols[Group1] = [ ISO_Level3_Latch, ISO_Level3_Shift, ISO_Level3_Latch ] + }; + include "level3(modifier_mapping)" +}; @@ -0,0 +1,69 @@ +// based on a keyboard map from an 'xkb/symbols/dev' file + +default partial alphanumeric_keys xkb_symbols "phenotic" { + name[Group1]= "Nepali (Phenotic)"; + + key.type="FOUR_LEVEL"; + +// `,1,2,3,4,5,6,7,8,9,0,-,= + + key <TLDE> { [ 0x100093D, 0x100097D, grave, asciitilde ] }; + key <AE01> { [ 0x1000967, exclam, 1, exclam ] }; + key <AE02> { [ 0x1000968, at, 2, at ] }; + key <AE03> { [ 0x1000969, numbersign, 3, numbersign ] }; + key <AE04> { [ 0x100096A, 0x10020A8, 4, dollar ] }; + key <AE05> { [ 0x100096B, percent, 5, percent ] }; + key <AE06> { [ 0x100096C, asciicircum, 6, asciicircum ] }; + key <AE07> { [ 0x100096D, ampersand, 7, ampersand ] }; + key <AE08> { [ 0x100096e, asterisk, 8, asterisk ] }; + key <AE09> { [ 0x100096F, parenleft, 9, parenleft ] }; + key <AE10> { [ 0x1000966, parenright, 0, parenright ] }; + key <AE11> { [ minus, underscore ] }; + key <AE12> { [ equal, plus ] }; + +// q,w,e,r,t,y,u,i,o,p,[,] + + key <AD01> { [ 0x100091F, 0x1000920, q, Q ] }; + key <AD02> { [ 0x100094C, 0x1000914, w, W ] }; + key <AD03> { [ 0x1000947, 0x1000948, e, E ] }; + key <AD04> { [ 0x1000930, 0x1000943, r, R ] }; + key <AD05> { [ 0x1000924, 0x1000925, t, T ] }; + key <AD06> { [ 0x100092F, 0x100091E, y, Y ] }; + key <AD07> { [ 0x1000941, 0x1000942, u, U ] }; + key <AD08> { [ 0x100093F, 0x1000940, i, I ] }; + key <AD09> { [ 0x100094B, 0x1000913, o, O ] }; + key <AD10> { [ 0x100092A, 0x100092B, p, P ] }; + key <AD11> { [ 0x1000907, 0x1000908, bracketleft, braceleft ] }; + key <AD12> { [ 0x100090F, 0x1000910, bracketright, braceright] }; + +// a,s,d,f,g,h,j,k,l,;,',Backslash + key <AC01> { [ 0x100093E, 0x1000906, a, A ] }; + key <AC02> { [ 0x1000938, 0x1000936, s, S ] }; + key <AC03> { [ 0x1000926, 0x1000927, d, D ] }; + key <AC04> { [ 0x1000909, 0x100090A, f, F ] }; + key <AC05> { [ 0x1000917, 0x1000918, g, G ] }; + key <AC06> { [ 0x1000905, 0x1000939, h, H ] }; + key <AC07> { [ 0x100091C, 0x100091D, j, J ] }; + key <AC08> { [ 0x1000915, 0x1000916, k, K ] }; + key <AC09> { [ 0x1000932, 0x1000933, l, L ] }; + key <AC10> { [ semicolon, colon, semicolon, colon ] }; + key <AC11> { [ apostrophe, quotedbl, apostrophe, quotedbl ] }; + key <BKSL> { [ 0x1000950, 0x1000903, backslash, bar ] }; + + +// z,x,c,v,b,n,m,,,.,/ + key <AB01> { [ 0x1000937, 0x100090B, z, Z ] }; + key <AB02> { [ 0x1000921, 0x1000922, x, X ] }; + key <AB03> { [ 0x100091A, 0x100091B, c, C ] }; + key <AB04> { [ 0x1000935, 0x1000901, v, V ] }; + key <AB05> { [ 0x100092C, 0x100092D, b, B ] }; + key <AB06> { [ 0x1000928, 0x1000923, n, N ] }; + key <AB07> { [ 0x100092E, 0x1000902, m, M ] }; + key <AB08> { [ comma, 0x1000919, comma, less ] }; + key <AB09> { [ 0x1000964, 0x1000965, period, greater ] }; + key <AB10> { [ 0x100094D, question, slash, question ] }; + + include "level3(caps_switch)" + include "level3(caps_switch_latch)" + +}; diff --git a/uninstall.sh b/uninstall.sh new file mode 100644 index 000000000000..623a51bae924 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +TMP_DIR=/tmp/nekuvi/ + +copy_files() { + mkdir -p "$TMP_DIR" + cp /usr/share/X11/xkb/rules/evdev.lst "$TMP_DIR" + cp /usr/share/X11/xkb/rules/evdev.xml "$TMP_DIR" +} + +remove_evdev_lst() { + pushd "$TMP_DIR" + sed -i '/np_prog/d' evdev.lst +} + +remove_evdev_xml() { + pushd "$TMP_DIR" + sed -i '/BEGIN np_prog/,/END np_prog/d' evdev.xml + popd +} + +uninstall_evdev() { + pushd "$TMP_DIR" + cp evdev.* /usr/share/X11/xkb/rules/ + popd +} + +process() { + copy_files # copies the necessary files to a temp dir for us + remove_evdev_lst # modify evdev.lst with np_prog + remove_evdev_xml # add np_prog to evdev.xml + uninstall_evdev +} + + +process |