blob: 357a5eb4dd9d5eff83f578b8bced91028b5f5f25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# Maintainer: Margret Riegert <margret at eowyn net>
# Contributor: Filipe LaĆns (FFY00) <lains@archlinux.org>
pkgname=openfpgaloader-git
pkgver=nightly.r.0.gfab58d7
pkgrel=1
pkgdesc="Universal utility for programming FPGA"
arch=('x86_64')
url="https://github.com/trabucayre/openFPGALoader"
license=('APACHE')
depends=('libftdi' 'libftdi-compat' 'libhidapi-libusb.so' 'libudev.so')
makedepends=('cmake' 'libusb' 'systemd' 'git')
provides=('openfpgaloader')
conflicts=('openfpgaloader')
source=("$pkgname-$pkgver::git+$url")
md5sums=('SKIP')
pkgver() {
cd "$pkgname-$pkgver"
git describe --long --tags | sed -r 's/\.//;s/([^-]*-g)/r\.\1/;s/-/./g'
}
prepare() {
sed -i 's|MODE="664", GROUP="plugdev"|MODE="666"|g' "$pkgname-$pkgver"/99-openfpgaloader.rules
}
build() {
mkdir -p "$pkgname-$pkgver"/build
cd "$pkgname-$pkgver"/build
export CFLAGS+=" ${CPPFLAGS}"
export CXXFLAGS+=" ${CPPFLAGS}"
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=None \
-DENABLE_UDEV=True \
-DENABLE_CMSISDAP=True
make
}
package() {
cd "$pkgname-$pkgver"/build
make DESTDIR="$pkgdir" install
install -Dm 644 ../99-openfpgaloader.rules "$pkgdir"/usr/lib/udev/rules.d/99-openfpgaloader.rules
}
|