Last active
November 16, 2015 06:29
-
-
Save four0four/bc3c2c9df8524f375d77 to your computer and use it in GitHub Desktop.
ec2drv PKGBUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post_upgrade() { | |
getent group "silabs" &>/dev/null || groupadd -r silabs | |
} | |
post_remove() { | |
getent group "silabs" &>/dev/null && groupdel silabs 1>/dev/null | |
} | |
post_install() { | |
post_upgrade | |
echo "Don't forget to add yourself (and any other users) to the silabs group for non-root access" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Galen Schretlen <[email protected]> | |
pkgname=ec2drv-git | |
pkgdesc="ec2drv provides Linux support for the Silicon Laboritories EC2 serial debug adaptor." | |
_sourcename="ec2" | |
pkgrel=1 | |
pkgver=86ffac6 | |
arch=('i686' 'x86_64') | |
url="https://github.com/four0four/ec2" | |
license=('GPL') | |
depends=('python2' 'boost-libs' 'readline' 'libusb') | |
makedepends=('boost' 'cmake') | |
provides=('ec2drv') | |
install='ec2drv-git.install' | |
source=('git://github.com/four0four/ec2.git') | |
sha256sums=('SKIP') | |
pkgver() { | |
cd "$srcdir/$_sourcename" | |
git rev-parse --short HEAD | sed -r 's/([^-]*-g)/r\1/;s/-/./g' | |
} | |
build() { | |
cd "$srcdir/$_sourcename" | |
mkdir build | |
cd "$srcdir/$_sourcename/build" | |
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../src | |
make | |
} | |
package() { | |
cd "$srcdir/$_sourcename/build" | |
make DESTDIR="$pkgdir/" install | |
install -D -m644 "$srcdir/$_sourcename/doc/60-silabs.rules" "${pkgdir}/etc/udev/rules.d/60-silabs.rules" | |
install -D -m644 "$srcdir/$_sourcename/doc/silabs.conf" "${pkgdir}/etc/modprobe.d/silabs.conf" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment