summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitris Kiziridis2020-03-24 19:46:22 +0200
committerDimitris Kiziridis2020-03-24 19:46:22 +0200
commit034aea2318ef13063934a52b5671f63b4c124d5c (patch)
tree215b928303fb2cbdf98d600f671e6d1ec2d6f581
downloadaur-034aea2318ef13063934a52b5671f63b4c124d5c.tar.gz
Initial commit
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD26
2 files changed, 40 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7b7ff08b2994
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = bitly-client
+ pkgdesc = Create and manage your Bitly shortlinks from the command line
+ pkgver = 1.7.2
+ pkgrel = 1
+ url = https://github.com/specious/bitly-client
+ arch = x86_64
+ license = MIT
+ makedepends = npm
+ noextract = bitly-client-1.7.2.tar.gz
+ source = bitly-client-1.7.2.tar.gz::https://github.com/specious/bitly-client/archive/v1.7.2.tar.gz
+ md5sums = 49ce0af9fb2ad2a257c4c086c11e6aa6
+
+pkgname = bitly-client
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..33bba4a06758
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Dimitris Kiziridis <ragouel at outlook dot com>
+
+pkgname=bitly-client
+pkgver=1.7.2
+pkgrel=1
+pkgdesc="Create and manage your Bitly shortlinks from the command line"
+arch=('x86_64')
+url='https://github.com/specious/bitly-client'
+license=('MIT')
+makedepends=('npm')
+noextract=("${pkgname}-${pkgver}.tar.gz")
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
+md5sums=('49ce0af9fb2ad2a257c4c086c11e6aa6')
+
+package() {
+ npm install -g --user root --prefix "${pkgdir}/usr" "${srcdir}/${pkgname}-${pkgver}.tar.gz"
+ find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d'
+ find "${pkgdir}/usr" -type d -exec chmod 755 {} +
+ sed -i "s|${pkgdir}||g" "${pkgdir}/usr/lib/node_modules/${pkgname}/node_modules/sshpk/package.json"
+ local tmppackage="$(mktemp)"
+ local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json"
+ jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
+ mv "$tmppackage" "$pkgjson"
+ chmod 644 "$pkgjson"
+ chown -R root:root "${pkgdir}"
+} \ No newline at end of file