Skip to content

Instantly share code, notes, and snippets.

@vith
Last active May 13, 2016
Embed
What would you like to do?
cpplint PKGBUILD
# Contributor: Liganic <liganic-aur@gmx.net>
# Maintainer: Jason Papakostas <vithos@gmail.com>
pkgname=cpplint
pkgver=456
_commit=01e4723
pkgrel=1
pkgdesc="Automated checker to make sure a C++ file follows Google's C++ style guide."
arch=('any')
url='https://google.github.io/styleguide/cppguide.html'
license=('custom:BSD3')
groups=()
depends=('python2')
source=("git+https://github.com/google/styleguide#commit=${_commit}")
sha256sums=('SKIP')
build() {
cd "$srcdir/styleguide/cpplint"
sed -i 's%/usr/bin/env python%/usr/bin/env python2%' cpplint.py
# extract license from source
sed -r '/# Copyright/,/DAMAGE\./!d; s/# (.*)|#/\1/' cpplint.py > LICENSE
# ensure license hasn't changed
sha256sum -c <(echo '70eb89e4cb460d1b27173348c9f9fca5cf67c09d722ddaa07c5d0fcd6262a97e LICENSE')
}
package() {
cd "$srcdir/styleguide/cpplint"
install -Dm755 cpplint.py "$pkgdir/usr/bin/$pkgname"
install -Dm644 README "$pkgdir/usr/share/doc/$pkgname/README"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment