summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDimitris Kiziridis2020-05-13 08:32:02 +0300
committerDimitris Kiziridis2020-05-13 08:32:02 +0300
commitc9fdc2cdb67ba616931474261927b40d9cb0dde1 (patch)
tree66cdfa1aaa1524a44f9675989a9efb4b368eef30 /PKGBUILD
parentaa08356af8e7a956e9ef61f4f614a9f7927b0843 (diff)
downloadaur-legit.tar.gz
sanitize pkgbuild
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD10
1 files changed, 6 insertions, 4 deletions
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