summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Papakostas2017-11-11 15:20:26 -0600
committerJason Papakostas2017-11-11 15:20:26 -0600
commit5c4e5127004ed23860fa51859c00dbf7c94e4a9b (patch)
treea84bf07b911b7a9ec380f53f10e543cc00dc0ef9
parent1e4c7df9117fa7c539eab394aabef11fbb80b097 (diff)
downloadaur-5c4e5127004ed23860fa51859c00dbf7c94e4a9b.tar.gz
cpplint 456.r32
* switched to using git to obtain the source, they added a new subdir * worked around new unit test that breaks when cpplint is checked out inside another git worktree (like the AUR package's checkout)
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD45
-rwxr-xr-xcheck_upstream_version.sh6
4 files changed, 31 insertions, 40 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a10667d3de52..bbe7f488e674 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,16 @@
# Generated by mksrcinfo v8
-# Sat Jul 29 03:02:46 UTC 2017
+# Sat Nov 11 21:20:03 UTC 2017
pkgbase = cpplint
pkgdesc = Automated checker to make sure a C++ file follows Google's C++ style guide.
- pkgver = 456.r22
+ pkgver = 456.r32
pkgrel = 1
url = https://google.github.io/styleguide/cppguide.html
arch = any
license = custom:BSD3
+ makedepends = git
depends = python2
- source = cpplint-6c8669edb20249cd5534c78cfb48e7cf0978dda3.py::https://raw.githubusercontent.com/google/styleguide/6c8669edb20249cd5534c78cfb48e7cf0978dda3/cpplint/cpplint.py
- source = README-6c8669edb20249cd5534c78cfb48e7cf0978dda3::https://raw.githubusercontent.com/google/styleguide/6c8669edb20249cd5534c78cfb48e7cf0978dda3/cpplint/README
- source = cpplint_unittest-6c8669edb20249cd5534c78cfb48e7cf0978dda3.py::https://raw.githubusercontent.com/google/styleguide/6c8669edb20249cd5534c78cfb48e7cf0978dda3/cpplint/cpplint_unittest.py
- source = cpplint_test_header-6c8669edb20249cd5534c78cfb48e7cf0978dda3.h::https://raw.githubusercontent.com/google/styleguide/6c8669edb20249cd5534c78cfb48e7cf0978dda3/cpplint/cpplint_test_header.h
- sha256sums = 3bac5ebf2ab1957fa65d3ea8fd6ac1a2498aa1905aa78ffe5e37bc4d7c03d1d8
- sha256sums = a2a49a15fc0db21a0c130e57fb5894954d81bc95962fc90be2e70d2daaa27d89
- sha256sums = 5f3bcce39ae6990006c480e485c13188de59f0a563484ba5f0abb935f72719f1
- sha256sums = ca87382ffce185c94adf1f33d46ec5f20d13bfe41549a5e243095ce1117f0b12
+ source = styleguide::git+https://github.com/google/styleguide.git#commit=4e8e56fb655432bdbe9cae421be84b1a1cdc234e
+ sha256sums = SKIP
pkgname = cpplint
diff --git a/.gitignore b/.gitignore
index ce24ab67944d..7de7c73973df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,5 @@
-/cpplint-*.py
-/cpplint_unittest-*.py
-/cpplint_test_header-*.h
/cpplint-*.pkg.tar.xz
-/README-*
/pkg/
/src/
+/styleguide/
/styleguide.mirror/
diff --git a/PKGBUILD b/PKGBUILD
index 2c03c76b7792..1efb05e188e2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: Jason Papakostas <vithos@gmail.com>
# Contributor: Liganic <liganic-aur@gmx.net>
pkgname=cpplint
-pkgver='456.r22'
-_commit=6c8669edb20249cd5534c78cfb48e7cf0978dda3
+pkgver='456.r32'
+_commit=4e8e56fb655432bdbe9cae421be84b1a1cdc234e
pkgrel=1
pkgdesc="Automated checker to make sure a C++ file follows Google's C++ style guide."
arch=('any')
@@ -10,42 +10,37 @@ url='https://google.github.io/styleguide/cppguide.html'
license=('custom:BSD3')
groups=()
depends=('python2')
-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"
- "cpplint_unittest-${_commit}.py::https://raw.githubusercontent.com/google/styleguide/${_commit}/cpplint/cpplint_unittest.py"
- "cpplint_test_header-${_commit}.h::https://raw.githubusercontent.com/google/styleguide/${_commit}/cpplint/cpplint_test_header.h")
-sha256sums=('3bac5ebf2ab1957fa65d3ea8fd6ac1a2498aa1905aa78ffe5e37bc4d7c03d1d8'
- 'a2a49a15fc0db21a0c130e57fb5894954d81bc95962fc90be2e70d2daaa27d89'
- '5f3bcce39ae6990006c480e485c13188de59f0a563484ba5f0abb935f72719f1'
- 'ca87382ffce185c94adf1f33d46ec5f20d13bfe41549a5e243095ce1117f0b12')
+makedepends=('git')
+source=("styleguide::git+https://github.com/google/styleguide.git#commit=$_commit")
+sha256sums=('SKIP')
build() {
- sed -i 's%/usr/bin/env python%/usr/bin/env python2%' "cpplint-${_commit}.py"
+ cd "$srcdir/styleguide/cpplint"
+
+ sed -i 's%/usr/bin/env python%/usr/bin/env python2%' "cpplint.py"
# extract license from source
- sed -r '/^# Copyright/,/^$/!d; /^#/!d; s/# (.*)|#/\1/' "cpplint-${_commit}.py" > "LICENSE-$_commit"
+ sed -r '/^# Copyright/,/^$/!d; /^#/!d; s/# (.*)|#/\1/' "cpplint.py" > "LICENSE"
# ensure license hasn't changed
- sha256sum -c <(echo "70eb89e4cb460d1b27173348c9f9fca5cf67c09d722ddaa07c5d0fcd6262a97e LICENSE-$_commit")
+ sha256sum -c <(echo "70eb89e4cb460d1b27173348c9f9fca5cf67c09d722ddaa07c5d0fcd6262a97e LICENSE")
}
check() {
- [ -d "cpplint" ] && rm -r "cpplint"
- mkdir "cpplint"
- cp "cpplint-${_commit}.py" "cpplint/cpplint.py"
- cp "cpplint_unittest-${_commit}.py" "cpplint/cpplint_unittest.py"
- cp "cpplint_test_header-${_commit}.h" "cpplint/cpplint_test_header.h"
+ cd "$srcdir/styleguide/cpplint"
- # one of the unit tests assumes it's being run in a clone of
- # https://github.com/google/styleguide, this makes the test work:
- touch ".svn" "cpplint/.svn"
+ # unit test gets confused by the styleguide git repo being
+ # checked out inside the AUR package's git repo.
+ # we have to fake it out with a pretend SVN repo.
+ touch {..,.,nested}/.svn
- cd "cpplint"
python2 cpplint_unittest.py
}
package() {
- 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"
+ 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"
}
diff --git a/check_upstream_version.sh b/check_upstream_version.sh
index f991d86369fd..2024330b4cc1 100755
--- a/check_upstream_version.sh
+++ b/check_upstream_version.sh
@@ -6,7 +6,7 @@
start="$PWD"
mirror="$PWD/styleguide.mirror"
-working="$PWD/styleguide"
+working="$PWD/styleguide.workdir"
# clone or update mirror styleguide repo
if [ ! -d "$mirror" ]; then
@@ -51,6 +51,10 @@ done
# print latest version
printf "\nlatest version: %s" "$(git describe | sed 's/\([^-]*-\)g/r\1/;s/-/./g'|cut -f 1-2 -d.)"
+# print latest commit
+cd "$mirror"
+printf "\nlatest commit: %s" "$(git log --max-count=1 --format="%H" -- cpplint)"
+
# clean up
cd "$start" || exit
rm -rf "$working"