Package Details: swift-protobuf-git 1.0.2-1

Git Clone URL: https://aur.archlinux.org/swift-protobuf-git.git (read-only, click to copy)
Package Base: swift-protobuf-git
Description: Plugin and runtime library for using protobuf with Swift.
Upstream URL: https://github.com/apple/swift-protobuf
Licenses: Apache-2.0
Provides: swift-protobuf
Submitter: daskol
Maintainer: None
Last Packager: daskol
Votes: 0
Popularity: 0.000000
First Submitted: 2018-01-31 12:57 (UTC)
Last Updated: 2018-02-01 21:19 (UTC)

Latest Comments

akeller commented on 2022-01-20 07:41 (UTC)

Fixed with the following patch:

From a8d7e799ea4d550bae0af4d9474a61893fe06ee1 Mon Sep 17 00:00:00 2001
From: Austin Keller <austin474@gmail.com>
Date: Wed, 19 Jan 2022 23:38:31 -0800
Subject: [PATCH] Fix building and installation

---
 .SRCINFO |  5 ++---
 PKGBUILD | 24 ++++++++++--------------
 2 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 7a7c46c..adfe1a2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
 pkgbase = swift-protobuf-git
    pkgdesc = Plugin and runtime library for using protobuf with Swift.
-   pkgver = 1.0.2
+   pkgver = 1.18.0.r15.gcf07a888
    pkgrel = 1
    epoch = 0
    url = https://github.com/apple/swift-protobuf
@@ -10,8 +10,7 @@ pkgbase = swift-protobuf-git
    depends = protobuf
    depends = swift-language
    provides = swift-protobuf
-   source = swift-protobuf::git+https://github.com/apple/swift-protobuf.git
+   source = swift-protobuf-git::git+https://github.com/apple/swift-protobuf.git
    md5sums = SKIP

 pkgname = swift-protobuf-git
-
diff --git a/PKGBUILD b/PKGBUILD
index 7088fba..ca4bf64 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
 # Maintainer: Daniel Bershatsky <bepshatsky@yandex.ru>
 pkgname=swift-protobuf-git
-pkgver=1.0.2
+pkgver=1.18.0.r15.gcf07a888
 pkgrel=1
 epoch=0
 pkgdesc="Plugin and runtime library for using protobuf with Swift."
@@ -17,31 +17,27 @@ replaces=()
 backup=()
 options=()

-source=("swift-protobuf::git+https://github.com/apple/swift-protobuf.git")
+source=("$pkgname"::"git+https://github.com/apple/swift-protobuf.git")
 md5sums=('SKIP')

 validpgpkeys=()

 pkgver() {
-    cd "$srcdir/swift-protobuf"
-    version=$(git tag -l | tail -n 1)
-    digest=$(git describe --long --all)
-    release=$(sed "s/heads\/master/$version/" <<< $digest)
-    echo $release
+    cd "$srcdir/$pkgname"
+    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
 }

-package() {
-    cd $srcdir/swift-protobuf
+build() {
+    cd "$srcdir/$pkgname"

-    version=$(git tag -l | tail -n 1)
+    version=$(git describe --tags --abbrev=0)
     git checkout tags/$version

     swift build -c release -Xswiftc -static-stdlib
 }

-install() {
+package() {
     target=protoc-gen-swift
-    mkdir -p $pkgdir/usr/bin
-    cp $srcdir/swift-protobuf/.build/release/$target $pkgdir/usr/bin
-    chmod +x $pkgdir/usr/bin/$target
+    mkdir -p "$pkgdir/usr/bin"
+    install -Dm755 $srcdir/$pkgname/.build/release/$target $pkgdir/usr/bin
 }
-- 
2.34.1