summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorYuki Ibe2023-11-29 13:44:32 +0000
committerYuki Ibe2023-11-29 13:44:32 +0000
commita471cef5168f71c284cfe11eeb4e86f84143baf3 (patch)
tree92a605f5f69c03d2ec4a57a7bd4dcb34b085c6c1 /PKGBUILD
downloadaur-protobufjson.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD32
1 files changed, 32 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e95b43d8ffd7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Yuki Ibe <yibe\100yibe\056org>
+pkgname=protobufjson
+_reponame=ProtobufJson
+pkgver=0.1.0_alpha
+pkgrel=1
+_commit=ed6aecb8ae92d0fb130e316c0714337356f166e4
+pkgdesc="A simple CLI wrapper over the protobuf JSON API"
+arch=('x86_64')
+url="https://github.com/hq6/ProtobufJson"
+license=('MIT')
+depends=('protobuf>=22.0')
+makedepends=('git')
+source=("git+${url}.git#commit=${_commit}")
+sha256sums=('SKIP')
+
+prepare() {
+ cd "$_reponame"
+ sed -e 's@google/protobuf/stubs/strutil\.h@absl/strings/escaping.h@' \
+ -e 's@google::protobuf::Base64Unescape@absl::Base64Unescape@' \
+ -i ./ProtobufJson.cc
+}
+
+build() {
+ cd "$_reponame"
+ make CXXFLAGS=-std=c++17 LDLIBS='-lprotobuf -labsl_status -labsl_strings'
+}
+
+package() {
+ cd "$_reponame"
+ install -v -Dm755 ProtobufJson -t "$pkgdir/usr/bin/"
+ install -v -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
+}