diff options
author | taotieren | 2021-05-26 18:35:02 +0800 |
---|---|---|
committer | taotieren | 2021-05-26 18:35:02 +0800 |
commit | 4f94fecb98656122adacb301aaf7544d54147ba8 (patch) | |
tree | ce093d93208c6dc9cc520165deaaef4826a83373 | |
download | aur-4f94fecb98656122adacb301aaf7544d54147ba8.tar.gz |
Update sunxi-livesuite
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | .gitignore | 14 | ||||
-rw-r--r-- | PKGBUILD | 103 |
3 files changed, 143 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6d6c813e5b95 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = sunxi-livesuite-git + pkgver = 1a0b52a + pkgrel = 1 + url = https://github.com/linux-sunxi/sunxi-livesuite + arch = x86_64 + arch = i686 + groups = sunxi-livesuite-git + license = GPLv2 + makedepends = git + conflicts = sunxi-livesuite-git + conflicts = sunxi-livesuite + options = !strip + source = sunxi-livesuite::git+https://github.com/linux-sunxi/sunxi-livesuite.git + source = git+https://github.com/M0Rf30/sunxi-awusb.git + sha256sums = SKIP + sha256sums = SKIP + +pkgname = sunxi-livesuite-git + pkgdesc = LiveSuit is a tool to flash Images to the NAND of Allwinner devices. + depends = sunxi-livesuite-git-dkms + +pkgname = sunxi-livesuite-git-dkms + pkgdesc = DKMS module for Allwinner devices + depends = dkms + conflicts = sunxi-awusb-dkms + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..0419229454d2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +src +pkg +sunxi-livesuite +sunxi-awusb +*.deb +*.rpm +*.bz2 +*.gz +*.zip +*.tgz +*.pkg.tar.xz +*.pkg.tar.zst +*.log +*.png diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..43b2c1ff1a7b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,103 @@ +# Maintainer: taotieren <admin@taotieren.com> + +pkgbase=sunxi-livesuite-git +pkgname=($pkgbase{,-dkms}) +pkgver=1a0b52a +pkgrel=1 +arch=('x86_64' 'i686') +url="https://github.com/linux-sunxi/sunxi-livesuite" +license=('GPLv2') +provides=() +conflicts=(${pkgbase} ${pkgbase%-git}) +#replaces=(${pkgname}) +makedepends=('git') +backup=() +options=('!strip') +#install=${pkgname}.install +groups=($pkgbase) +source=("${pkgbase%-git}::git+${url}.git" + "git+https://github.com/M0Rf30/sunxi-awusb.git" +) +sha256sums=('SKIP' + 'SKIP') + +pkgver() { + cd "${srcdir}/${pkgbase%-git}" + git describe --always | sed 's|-|.|g' +} + +package_sunxi-livesuite-git() { + pkgdesc="LiveSuit is a tool to flash Images to the NAND of Allwinner devices." + depends=('sunxi-livesuite-git-dkms') + + install -dm0755 "${pkgdir}/opt/sunxi/${pkgbase%-git}" + cp -r "${srcdir}/${pkgbase%-git}/x86" "${pkgdir}/opt/sunxi/${pkgbase%-git}" + cp -r "${srcdir}/${pkgbase%-git}/x86-64" "${pkgdir}/opt/sunxi/${pkgbase%-git}" + cp -r "${srcdir}/${pkgbase%-git}/LiveSuit.sh" "${pkgdir}/opt/sunxi/${pkgbase%-git}" + + install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/${pkgbase%-git}" << EOF +#!/bin/env bash + +cd /opt/sunxi/${pkgbase%-git}/ +bash LiveSuit.sh +EOF + + install -Dm0644 /dev/stdin "$pkgdir/usr/share/applications/${pkgname}.desktop" <<EOF +[Desktop Entry] +Name=${pkgbase%-git} +Comment=${pkgbase%-git} +GenericName=${pkgbase%-git} +Exec=${pkgbase%-git} +Icon= +Path=/opt/sunxi/${pkgbase%-git} +Terminal=false +StartupNotify=true +Type=Application +Categories=Development +EOF + +} + +package_sunxi-livesuite-git-dkms() { + pkgdesc="DKMS module for Allwinner devices" + depends=('dkms') + conflicts=('sunxi-awusb-dkms') + cd "${srcdir}/sunxi-awusb/" + install -Dt "${pkgdir}/usr/src/${pkgname}" -m644 awusb.c Makefile dkms.conf + install -Dm0644 /dev/stdin "${pkgdir}/usr/lib/udev/rules.d/99-aw_usb.rules" << EOF +# Copy this file to /etc/udev/rules.d/ +# If rules fail to reload automatically, you can refresh udev rules +# with the command "udevadm control --reload" + +# This rules are based on the udev rules from the OpenOCD project, with unsupported probes removed. +# See http://openocd.org/ for more details. +# +# This file is available under the GNU General Public License v2.0 + +ACTION!="add|change", GOTO="aw_usb_rules_end" + +#SUBSYSTEM=="gpio", MODE="0660", GROUP="plugdev", TAG+="uaccess" + +SUBSYSTEM!="usb|tty|hidraw", GOTO="aw_usb_rules_end" + +# [GNU MCU Eclipse] ----------------------------------------------------------- +# To simplify access, the access rights were changed from: +# MODE="660", GROUP="plugdev", TAG+="uaccess" +# to: +# MODE="666" +# ----------------------------------------------------------------------------- + +# Please keep this list sorted by VID:PID + +# aw +# define USB_AW_VENDOR_ID 0x1f3a +# define USB_AW_PRODUCT_ID 0xefe8 +ATTR{idVendor}=="1F3A", ATTR{idProduct}=="EFE8", MODE="666" + +LABEL="aw_usb_rules_end" +EOF + + install -dm0755 "${pkgdir}/etc/udev/rules.d" + ln -sf "/usr/lib/udev/rules.d/99-aw_usb.rules" "${pkgdir}/etc/udev/rules.d/99-aw_usb.rules" + +} |