summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitris Kiziridis2020-05-13 08:32:02 +0300
committerDimitris Kiziridis2020-05-13 08:32:02 +0300
commitc9fdc2cdb67ba616931474261927b40d9cb0dde1 (patch)
tree66cdfa1aaa1524a44f9675989a9efb4b368eef30
parentaa08356af8e7a956e9ef61f4f614a9f7927b0843 (diff)
downloadaur-c9fdc2cdb67ba616931474261927b40d9cb0dde1.tar.gz
sanitize pkgbuild
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD10
2 files changed, 10 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9ed0f4d412a..a5fede13449 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,9 +6,10 @@ pkgbase = legit
arch = any
license = MIT
makedepends = npm
- noextract = v3.0.1.tar.gz
- source = https://github.com/captainsafia/legit/archive/v3.0.1.tar.gz
- md5sums = 3954bd2dd6cd78c070716788a10cb633
+ depends = nodejs
+ noextract = legit-3.0.1.tar.gz
+ source = legit-3.0.1.tar.gz::https://github.com/captainsafia/legit/archive/v3.0.1.tar.gz
+ sha256sums = ad126242ca1657fe9470712903383c6f588461ad15182734667e760d805ba21b
pkgname = legit
diff --git a/PKGBUILD b/PKGBUILD
index 2e31f5b1de8..b71de9a2a01 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,13 +7,14 @@ pkgdesc="Add licenses to projects at the command line"
arch=('any')
url='https://github.com/captainsafia/legit'
license=('MIT')
+depends=('nodejs')
makedepends=('npm')
-noextract=("v${pkgver}.tar.gz")
-source=("${url}/archive/v${pkgver}.tar.gz")
-md5sums=('3954bd2dd6cd78c070716788a10cb633')
+noextract=("${pkgname}-${pkgver}.tar.gz")
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
+sha256sums=('ad126242ca1657fe9470712903383c6f588461ad15182734667e760d805ba21b')
package() {
- npm install -g --user root --prefix "${pkgdir}/usr" "${srcdir}/v${pkgver}.tar.gz"
+ 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 {} +
local tmppackage="$(mktemp)"
@@ -22,4 +23,5 @@ package() {
mv "$tmppackage" "$pkgjson"
chmod 644 "$pkgjson"
chown -R root:root "${pkgdir}"
+ install -Dm644 "${pkgdir}/usr/lib/node_modules/@captainsafia/legit/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
} \ No newline at end of file