Add AUR package for cp210xmanufacturing library
PKGBUILD: - Builds 64-bit shared/static libraries from Silicon Labs source - Installs headers to /usr/include/cp210x/ - Includes udev rules for non-root device access To build: cd aur/cp210xmanufacturing && makepkg -si
This commit is contained in:
parent
a7f62e5d7e
commit
7c04e0cb6a
19
aur/cp210xmanufacturing/.SRCINFO
Normal file
19
aur/cp210xmanufacturing/.SRCINFO
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
pkgbase = cp210xmanufacturing
|
||||||
|
pkgdesc = Silicon Labs CP210x USB-UART bridge manufacturing/customization library
|
||||||
|
pkgver = 1.0
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://www.silabs.com/interface/usb-bridges/classic/device.cp2102
|
||||||
|
install = cp210xmanufacturing.install
|
||||||
|
arch = x86_64
|
||||||
|
license = custom:Silicon Labs
|
||||||
|
makedepends = gcc
|
||||||
|
makedepends = make
|
||||||
|
makedepends = unzip
|
||||||
|
depends = libusb
|
||||||
|
options = !strip
|
||||||
|
source = https://www.silabs.com/documents/public/example-code/AN721SW.zip
|
||||||
|
source = SiliconLabs.rules
|
||||||
|
sha256sums = 42cec8a75bf80120c02fa3a8a32ecfc1ba968ae32029efa3a7e5ca678b672fb1
|
||||||
|
sha256sums = bb046b9f9399cc7131bfee413c34f07c548df93dfbcc3fb58b64006bcd9c6f16
|
||||||
|
|
||||||
|
pkgname = cp210xmanufacturing
|
||||||
53
aur/cp210xmanufacturing/PKGBUILD
Normal file
53
aur/cp210xmanufacturing/PKGBUILD
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# Maintainer: Ryan Malloy <ryan@supported.systems>
|
||||||
|
pkgname=cp210xmanufacturing
|
||||||
|
pkgver=1.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Silicon Labs CP210x USB-UART bridge manufacturing/customization library"
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://www.silabs.com/interface/usb-bridges/classic/device.cp2102"
|
||||||
|
license=('custom:Silicon Labs')
|
||||||
|
depends=('libusb')
|
||||||
|
makedepends=('gcc' 'make' 'unzip')
|
||||||
|
install=cp210xmanufacturing.install
|
||||||
|
source=("https://www.silabs.com/documents/public/example-code/AN721SW.zip"
|
||||||
|
"SiliconLabs.rules")
|
||||||
|
sha256sums=('42cec8a75bf80120c02fa3a8a32ecfc1ba968ae32029efa3a7e5ca678b672fb1'
|
||||||
|
'bb046b9f9399cc7131bfee413c34f07c548df93dfbcc3fb58b64006bcd9c6f16')
|
||||||
|
options=('!strip')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$srcdir"
|
||||||
|
unzip -o AN721SW.zip
|
||||||
|
cd AN721SW/Linux/LibrarySourcePackages
|
||||||
|
tar -xzf cp210xmanufacturing_1.0.tar.gz
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$srcdir/AN721SW/Linux/LibrarySourcePackages/cp210xmanufacturing"
|
||||||
|
make LIB_ARCH=64
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$srcdir/AN721SW/Linux/LibrarySourcePackages/cp210xmanufacturing"
|
||||||
|
|
||||||
|
# Install shared library
|
||||||
|
install -Dm755 build/lib/x86_64/libcp210xmanufacturing.so.1.0 \
|
||||||
|
"$pkgdir/usr/lib/libcp210xmanufacturing.so.1.0"
|
||||||
|
ln -s libcp210xmanufacturing.so.1.0 "$pkgdir/usr/lib/libcp210xmanufacturing.so.1"
|
||||||
|
ln -s libcp210xmanufacturing.so.1 "$pkgdir/usr/lib/libcp210xmanufacturing.so"
|
||||||
|
|
||||||
|
# Install static library
|
||||||
|
install -Dm644 build/lib/x86_64/libcp210xmanufacturing.a \
|
||||||
|
"$pkgdir/usr/lib/libcp210xmanufacturing.a"
|
||||||
|
|
||||||
|
# Install headers
|
||||||
|
install -d "$pkgdir/usr/include/cp210x"
|
||||||
|
install -Dm644 cp210xmanufacturing/include/*.h "$pkgdir/usr/include/cp210x/"
|
||||||
|
|
||||||
|
# Install udev rules
|
||||||
|
install -Dm644 "$srcdir/SiliconLabs.rules" \
|
||||||
|
"$pkgdir/usr/lib/udev/rules.d/99-silabs-cp210x.rules"
|
||||||
|
|
||||||
|
# License
|
||||||
|
install -Dm644 doc/ReadMe.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
|
}
|
||||||
5
aur/cp210xmanufacturing/SiliconLabs.rules
Normal file
5
aur/cp210xmanufacturing/SiliconLabs.rules
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Silicon Labs CP210x USB-UART bridge - allow non-root access
|
||||||
|
# Add user to 'uucp' group: sudo usermod -aG uucp $USER
|
||||||
|
#
|
||||||
|
# For CP2102/CP2103/CP2104/CP2105/CP2108/CP2109 devices
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="10c4", MODE="0660", GROUP="uucp"
|
||||||
11
aur/cp210xmanufacturing/cp210xmanufacturing.install
Normal file
11
aur/cp210xmanufacturing/cp210xmanufacturing.install
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
post_install() {
|
||||||
|
echo ":: Add your user to the uucp group for non-root access:"
|
||||||
|
echo " sudo usermod -aG uucp \$USER"
|
||||||
|
echo ":: Reload udev rules:"
|
||||||
|
echo " sudo udevadm control --reload-rules"
|
||||||
|
echo ":: Re-plug your CP210x device for changes to take effect"
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
post_install
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user