summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas stig124 FORMICHELLA2021-09-02 22:11:29 +0200
committerNicolas stig124 FORMICHELLA2021-09-02 22:11:29 +0200
commit3968c9ea61711c13a1b8a6c856372a81fe809f6b (patch)
treeb542b321bdc05ccd39251ccfa75390375914b06b
downloadaur-3968c9ea61711c13a1b8a6c856372a81fe809f6b.tar.gz
Initial Commit
-rw-r--r--.SRCINFO23
-rw-r--r--69-n-link.rules4
-rw-r--r--PKGBUILD51
-rw-r--r--n-link.install3
-rw-r--r--only-build-deb.patch26
5 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7b9e8d3cb5d1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = n-link-git
+ pkgdesc = Free, cross-platform, CX-II compatible computer linking program for the TI-Nspire.
+ pkgver = 0.1.6.r3.g5ce4d8a
+ pkgrel = 1
+ url = https://lights0123.com/n-link/
+ install = n-link.install
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = rust
+ depends = nodejs-lts-fermium
+ depends = webkit2gtk
+ depends = squashfs-tools
+ provides = n-link
+ conflicts = n-link
+ source = git+https://github.com/lights0123/n-link.git
+ source = 69-n-link.rules
+ source = only-build-deb.patch
+ md5sums = SKIP
+ md5sums = 2c9e778637586091f4d5cfd74b5ee6a5
+ md5sums = 1a69d6a98b8d9e8de295750fec0b6475
+
+pkgname = n-link-git
diff --git a/69-n-link.rules b/69-n-link.rules
new file mode 100644
index 000000000000..351a9b115b89
--- /dev/null
+++ b/69-n-link.rules
@@ -0,0 +1,4 @@
+# TI-Nspire
+SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e012", ENV{ID_PDA}="1"
+# TI-Nspire CX II
+SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e022", ENV{ID_PDA}="1"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0442249aadf8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Nicolas FORMICHELLA <stigpro@outlook.fr>
+pkgname=n-link-git
+_pkgname=n-link
+pkgver=0.1.6.r3.g5ce4d8a
+pkgrel=1
+pkgdesc="Free, cross-platform, CX-II compatible computer linking program for the TI-Nspire."
+arch=("x86_64")
+url="https://lights0123.com/n-link/"
+license=('GPL3')
+groups=()
+depends=("nodejs-lts-fermium" "webkit2gtk" "squashfs-tools")
+makedepends=('git' 'rust')
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+replaces=()
+backup=()
+options=()
+install="${_pkgname}.install"
+source=(git+"https://github.com/lights0123/${_pkgname}.git"
+ "69-${_pkgname}.rules"
+ "only-build-deb.patch")
+noextract=()
+md5sums=('SKIP'
+ '2c9e778637586091f4d5cfd74b5ee6a5'
+ '1a69d6a98b8d9e8de295750fec0b6475')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "$srcdir/${pkgname%-git}/desktop/src-tauri"
+ patch -uN tauri.conf.json < ${srcdir}/only-build-deb.patch
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+ cd ..
+ yarn install
+}
+
+build() {
+ cd "$srcdir/${pkgname%-git}/desktop"
+ yarn tauri:build
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}/desktop/src-tauri/target/release/bundle/deb/"
+ find . -type f -name *.deb -print0 | xargs -0 -I '{}' ar p {} data.tar.gz | bsdtar -C "${pkgdir}" -xf -
+ find "${pkgdir}" -type d -exec chmod 755 {} \;
+ mkdir -p "${pkgdir}/etc/udev/rules.d/"
+ install -Dm644 "${srcdir}/69-${_pkgname}.rules" "${pkgdir}/etc/udev/rules.d/69-${pkgname}.rules"
+}
diff --git a/n-link.install b/n-link.install
new file mode 100644
index 000000000000..0d5d587529e4
--- /dev/null
+++ b/n-link.install
@@ -0,0 +1,3 @@
+post_install() {
+ udevadm control --reload-rules && udevadm trigger
+}
diff --git a/only-build-deb.patch b/only-build-deb.patch
new file mode 100644
index 000000000000..55513d3cae2b
--- /dev/null
+++ b/only-build-deb.patch
@@ -0,0 +1,26 @@
+--- tauri.conf.json 2021-09-02 21:27:12.054544100 +0200
++++ tauri.conf.json.l 2021-09-02 21:29:25.839898693 +0200
+@@ -2,7 +2,7 @@
+ "tauri": {
+ "bundle": {
+ "active": true,
+- "targets": ["deb", "msi", "appimage", "dmg"],
++ "targets": ["deb"],
+ "identifier": "com.lights0123.n-link",
+ "icon": [
+ "icons/32x32.png",
+@@ -17,14 +17,6 @@
+ "category": "Utility",
+ "shortDescription": "Free, cross-platform, CX-II compatible computer linking program for the TI-Nspire",
+ "longDescription": "Free, cross-platform, CX-II compatible computer linking program for the TI-Nspire",
+- "macOS": {
+- "frameworks": [],
+- "minimumSystemVersion": "",
+- "useBootstrapper": false,
+- "exceptionDomain": "",
+- "signingIdentity": null,
+- "entitlements": null
+- },
+ "windows": {
+ "certificateThumbprint": null,
+ "digestAlgorithm": "sha256",