summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD35
1 files changed, 21 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 284c6e7d2071..680418d2926f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,32 @@
-# Maintainer: Liganic <liganic-aur@gmx.net>
+# Maintainer: Jason Papakostas <vithos@gmail.com>
+# Contributor: Liganic <liganic-aur@gmx.net>
pkgname=cpplint
-pkgver=11
-pkgrel=0
+pkgver=456
+_commit=01e47236c846571b82a0136f79288a0b07916097
+pkgrel=1
pkgdesc="Automated checker to make sure a C++ file follows Google's C++ style guide."
-arch=('i686' 'x86_64')
-url="https://google.github.io/styleguide/cppguide.html"
-license=('unknown')
+arch=('any')
+url='https://google.github.io/styleguide/cppguide.html'
+license=('custom:BSD3')
groups=()
depends=('python2')
-source=('https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py'
-'https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/README')
-sha256sums=('21898350f6c9b293758e3a55c63ef5531dde1c0b468ff1ca4cc401f68004e9d0'
+source=("cpplint-${_commit}.py::https://raw.githubusercontent.com/google/styleguide/${_commit}/cpplint/cpplint.py"
+ "README-${_commit}::https://raw.githubusercontent.com/google/styleguide/${_commit}/cpplint/README")
+sha256sums=('0653d091d88e69d2e9cebde61aecec50665077faf61fd862bc4f12494efec2f0'
'a2a49a15fc0db21a0c130e57fb5894954d81bc95962fc90be2e70d2daaa27d89')
build() {
- sed -i 's/\/usr\/bin\/env python/\/usr\/bin\/env python2/' $srcdir/cpplint.py
+ sed -i 's%/usr/bin/env python%/usr/bin/env python2%' "cpplint-${_commit}.py"
+
+ # extract license from source
+ sed -r '/^# Copyright/,/^$/!d; /^#/!d; s/# (.*)|#/\1/' "cpplint-${_commit}.py" > "LICENSE-$_commit"
+
+ # ensure license hasn't changed
+ sha256sum -c <(echo "70eb89e4cb460d1b27173348c9f9fca5cf67c09d722ddaa07c5d0fcd6262a97e LICENSE-$_commit")
}
package() {
- install -Dm755 "$srcdir/cpplint.py" "$pkgdir/usr/bin/cpplint"
- install -Dm755 "$srcdir/README" "$pkgdir/usr/share/doc/cpplint/README"
+ install -Dm755 "cpplint-${_commit}.py" "$pkgdir/usr/bin/$pkgname"
+ install -Dm644 "README-$_commit" "$pkgdir/usr/share/doc/$pkgname/README"
+ install -Dm644 "LICENSE-$_commit" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
-
-# vim:set ts=2 sw=2 et: