summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD30
2 files changed, 50 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..7dba4cee50a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+# Generated by mksrcinfo v8
+# Mon Aug 21 03:05:10 UTC 2017
+pkgbase = svd2rust-git
+ pkgdesc = Generate Rust register maps (structs) from SVD files
+ pkgver = 0.11.3.204
+ pkgrel = 1
+ url = https://github.com/japaric/svd2rust
+ arch = i686
+ arch = x86_64
+ license = Apache
+ license = MIT
+ makedepends = rust
+ makedepends = cargo
+ provides = svd2rust
+ conflicts = svd2rust
+ source = svd2rust::git+https://github.com/japaric/svd2rust
+ sha256sums = SKIP
+
+pkgname = svd2rust-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..50c97da7ea9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,30 @@
+pkgname=svd2rust-git
+_pkgname=svd2rust
+pkgdesc="Generate Rust register maps (structs) from SVD files"
+pkgrel=1
+pkgver=0.11.3.204
+arch=('i686' 'x86_64')
+conflicts=("svd2rust")
+provides=("svd2rust")
+url="https://github.com/japaric/svd2rust"
+license=('Apache' 'MIT')
+depends=()
+makedepends=('rust' 'cargo')
+optdepends=()
+source=("$_pkgname::git+https://github.com/japaric/svd2rust")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd $_pkgname
+ echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2).$(git rev-list --count HEAD)"
+}
+
+build() {
+ cd $_pkgname
+ env CARGO_INCREMENTAL=0 cargo build --release
+}
+
+package() {
+ cd $_pkgname
+ install -D -m755 "$srcdir/$_pkgname/target/release/svd2rust" "$pkgdir/usr/bin/svd2rust"
+}