summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBert Peters2018-08-10 11:09:40 +0200
committerBert Peters2018-08-10 11:09:40 +0200
commitc4ade504104fc773766b1299e030bd97f145d161 (patch)
tree079beab3031014fe6adc9ad44dac66151b7027d9
parent1e4719faaaa089eff86713e7b18416df3ea00284 (diff)
downloadaur-c4ade504104fc773766b1299e030bd97f145d161.tar.gz
Fix packaging issues.
Package no longer contains references to $srcdir and $pkgdir, and I improvised a license file.
-rw-r--r--.SRCINFO5
-rw-r--r--LICENSE7
-rw-r--r--PKGBUILD27
3 files changed, 31 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 74e5f5566f6a..842d0c77ec3e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,18 @@
pkgbase = bower-away
pkgdesc = Convert your project from Bower to Yarn
pkgver = 1.1.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/sheerun/bower-away
arch = any
license = MIT
makedepends = npm
+ makedepends = jq
depends = nodejs
noextract = bower-away-1.1.2.tgz
source = https://registry.npmjs.org/bower-away/-/bower-away-1.1.2.tgz
+ source = LICENSE
sha256sums = e9a3d70b39fe388768f4c2efc931a2f199fc68f90e6c310ea51d02f2d58a6db2
+ sha256sums = 6be9328337c8f17e83b24fbebee8c6258eb364044de0dce7238afde57eaf8ae6
pkgname = bower-away
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..065898b4f1a9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,7 @@
+Copyright 2017 Adam Stankiewicz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
index 21cf8c2638ae..f06adef2aad6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,20 +1,33 @@
# Maintainer: bert@bertptrs.nl
pkgname=bower-away
pkgver=1.1.2
-pkgrel=1
+pkgrel=2
pkgdesc="Convert your project from Bower to Yarn"
arch=('any')
url="https://github.com/sheerun/bower-away"
license=('MIT')
depends=('nodejs')
-makedepends=('npm')
-source=("https://registry.npmjs.org/bower-away/-/$pkgname-$pkgver.tgz")
+makedepends=('npm' 'jq')
+source=("https://registry.npmjs.org/bower-away/-/$pkgname-$pkgver.tgz"
+ "LICENSE")
noextract=("$pkgname-$pkgver.tgz")
-sha256sums=('e9a3d70b39fe388768f4c2efc931a2f199fc68f90e6c310ea51d02f2d58a6db2')
+sha256sums=('e9a3d70b39fe388768f4c2efc931a2f199fc68f90e6c310ea51d02f2d58a6db2'
+ '6be9328337c8f17e83b24fbebee8c6258eb364044de0dce7238afde57eaf8ae6')
package() {
- npm install -g --user root --prefix "$pkgdir/usr" "$srcdir/$pkgname-$pkgver.tgz"
- find "$pkgdir/usr" -type d -exec chmod 755 {} +
+ npm install -g --user root --prefix "$pkgdir/usr" "$srcdir/$pkgname-$pkgver.tgz"
+ find "$pkgdir/usr" -type d -exec chmod 755 {} +
+
# Remove references to $pkgdir
- find "$pkgdir" -type f -print0 | xargs -0 sed -i "/_where/d"
+ find "$pkgdir" -type f -name package.json -print0 | xargs -0 sed -i "/_where/d"
+
+ # Remove references to $srcdir
+ 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"
+
+ # Install license since the package doesn't include it
+ install -Dm 644 "$srcdir/LICENSE" "$pkgdir/usr/shace/licenses/$pkgname/LICENSE"
}