summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2020-02-08 00:47:43 +0000
committerDaniel Bermond2020-02-08 00:47:43 +0000
commitb58e472af5033aff3625eb5af592008b5bf1481c (patch)
treed4381dde9ab9101e37f6d48a87bb52f524bf76e5
downloadaur-b58e472af5033aff3625eb5af592008b5bf1481c.tar.gz
Initial commit of cargo-c-git
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD38
2 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..32693f01bbc3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = cargo-c-git
+ pkgdesc = A cargo subcommand to build and install C-ABI compatibile dynamic and static libraries (git version)
+ pkgver = 0.5.1.r2.gc232ef5
+ pkgrel = 1
+ url = https://github.com/lu-zero/cargo-c/
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = rust
+ depends = gcc-libs
+ provides = cargo-c
+ conflicts = cargo-c
+ source = git+https://github.com/lu-zero/cargo-c.git
+ sha256sums = SKIP
+
+pkgname = cargo-c-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8c0e647c7c1e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer : Daniel Bermond <dbermond@archlinux.org>
+
+pkgname=cargo-c-git
+pkgver=0.5.1.r2.gc232ef5
+pkgrel=1
+pkgdesc='A cargo subcommand to build and install C-ABI compatibile dynamic and static libraries (git version)'
+arch=('x86_64')
+url='https://github.com/lu-zero/cargo-c/'
+license=('MIT')
+depends=('gcc-libs')
+makedepends=('git' 'rust')
+provides=('cargo-c')
+conflicts=('cargo-c')
+source=('git+https://github.com/lu-zero/cargo-c.git')
+sha256sums=('SKIP')
+
+prepare() {
+ cargo fetch --manifest-path cargo-c/Cargo.toml
+}
+
+pkgver() {
+ cd cargo-c
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
+}
+
+build() {
+ cargo build --release --frozen --manifest-path cargo-c/Cargo.toml
+}
+
+check() {
+ cargo test --release --frozen --manifest-path cargo-c/Cargo.toml
+}
+
+package() {
+ install -D -m755 cargo-c/target/release/cargo-cbuild -t "${pkgdir}/usr/bin"
+ install -D -m755 cargo-c/target/release/cargo-cinstall -t "${pkgdir}/usr/bin"
+ install -D -m644 cargo-c/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}