summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Papakostas2016-05-25 17:39:53 -0500
committerJason Papakostas2016-05-25 17:39:53 -0500
commit018a316907b853339003a6c9cfc3ca9276ea50bb (patch)
tree4fab1bb42acaf2aad68e993fe6d253d2d19bc070
parent5968435094591526e9599f2e93af68df2e3b86c6 (diff)
downloadaur-018a316907b853339003a6c9cfc3ca9276ea50bb.tar.gz
PKGBUILD rewrite and update to version 456
- use commit specific source urls - now using the versions in the upstream commit messages as $pkgver - no epoch required since the upstream version was higher than ours here - specify/verify/install license - README no longer installed as executable - architecture is 'any' now since it's python
-rw-r--r--.SRCINFO15
-rw-r--r--.editorconfig5
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD35
4 files changed, 38 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a6cd6fef2c70..c194d29f9a58 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
pkgbase = cpplint
pkgdesc = Automated checker to make sure a C++ file follows Google's C++ style guide.
- pkgver = 11
- pkgrel = 0
+ pkgver = 456
+ pkgrel = 1
url = https://google.github.io/styleguide/cppguide.html
- arch = i686
- arch = x86_64
- license = unknown
+ arch = any
+ license = custom:BSD3
depends = python2
- source = https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py
- source = https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/README
- sha256sums = 21898350f6c9b293758e3a55c63ef5531dde1c0b468ff1ca4cc401f68004e9d0
+ source = cpplint-01e47236c846571b82a0136f79288a0b07916097.py::https://raw.githubusercontent.com/google/styleguide/01e47236c846571b82a0136f79288a0b07916097/cpplint/cpplint.py
+ source = README-01e47236c846571b82a0136f79288a0b07916097::https://raw.githubusercontent.com/google/styleguide/01e47236c846571b82a0136f79288a0b07916097/cpplint/README
+ sha256sums = 0653d091d88e69d2e9cebde61aecec50665077faf61fd862bc4f12494efec2f0
sha256sums = a2a49a15fc0db21a0c130e57fb5894954d81bc95962fc90be2e70d2daaa27d89
pkgname = cpplint
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000000..e3207ea27130
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,5 @@
+root = true
+
+[*]
+indent_style = space
+indent_size = 2 \ No newline at end of file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..ec379481f247
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/cpplint-*.py
+/cpplint-*.pkg.tar.xz
+/README-*
+/pkg/
+/src/ \ No newline at end of file
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: