diff options
author | ardeaf | 2017-06-08 15:22:50 -1000 |
---|---|---|
committer | ardeaf | 2017-06-08 15:22:50 -1000 |
commit | 828e38fdd8d97c394370bfc2e98a13f0ffc5c2fc (patch) | |
tree | a3697205323c0dc69481d0eabc09fcf3ce2d355f | |
download | aur-828e38fdd8d97c394370bfc2e98a13f0ffc5c2fc.tar.gz |
First commit
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | LICENSE | 26 | ||||
-rw-r--r-- | PKGBUILD | 93 | ||||
-rw-r--r-- | PKGBUILD_EXTRAS | 0 |
4 files changed, 144 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..feb375f37d95 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = python-shreddit-git + pkgdesc = Remove your comment history on Reddit as deleting an account does not do so. + pkgver = r292.e550fa1 + pkgrel = 1 + url = https://github.com/x89/Shreddit + arch = any + license = BSD + makedepends = python-pip + depends = python + depends = python-arrow + depends = python-backports-abc + depends = python-praw + depends = python-yaml + depends = python-requests + depends = python-six + depends = python-tornado + provides = python-shreddit + conflicts = python-shreddit + source = git+https://github.com/x89/shreddit + source = LICENSE + md5sums = SKIP + md5sums = 0cf0fb38f370a4b0e9e7e0749e0aaa9f + +pkgname = python-shreddit-git + diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..80391a53ea26 --- /dev/null +++ b/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2012-2016, David Trail +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those +of the authors and should not be interpreted as representing official policies, +either expressed or implied, of the Shreddit Project. diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..540001d290c4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,93 @@ +# Maintainer: + +pkgname=python-shreddit-git +epoch= +pkgver=r292.e550fa1 +pkgrel=1 +pkgdesc='Remove your comment history on Reddit as deleting an account does not do so.' +arch=(any) +url=https://github.com/x89/Shreddit +license=(BSD) +depends=(python python-arrow python-backports-abc python-praw python-yaml python-requests python-six python-tornado) +## EXTRA_DEPENDS ## +makedepends=(python-pip) +checkdepends=() +provides=() +conflicts=(${provides%=*}) # No quotes, to avoid an empty entry. +source=(git+https://github.com/x89/shreddit) +md5sums=(SKIP) +source+=(LICENSE) +md5sums+=(0cf0fb38f370a4b0e9e7e0749e0aaa9f) +if [[ ${source[0]} =~ ^git+ ]]; then + provides+=("${pkgname%-git}") + conflicts+=("${pkgname%-git}") +fi + +export PIP_CONFIG_FILE=/dev/null +export PIP_DISABLE_PIP_VERSION_CHECK=true + +_first_source() { + echo " ${source_i686[@]} ${source_x86_64[@]} ${source[@]}" | + tr -s ' ' | tail -c+2 | cut -d' ' -f1 +} + +_is_wheel() { + [[ $(_first_source) =~ \.whl$ ]] +} + +_dist_name() { + basename "$(_first_source)" | + sed 's/\(\.tar\.gz\|\.tgz\|\.tar\.bz2\|\.zip\|\.git\)$//' +} + +if [[ $(_first_source) =~ ^git+ ]]; then + pkgver() { + ( set -o pipefail + cd "$srcdir/$(_dist_name)" + git describe --long --tags 2>/dev/null | + sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" \ + "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) + } +fi + +build() { + if _is_wheel; then return; fi + cd "$srcdir/$(_dist_name)" + # See Arch Wiki/PKGBUILD/license. + # Get the first filename that matches. + local test_name + if [[ ${license[0]} =~ ^(BSD|MIT|ZLIB|Python)$ ]]; then + for test_name in LICENSE LICENSE.txt license.txt COPYING.md COPYING.rst COPYING.txt COPYRIGHT; do + if cp "$srcdir/$(_dist_name)/$test_name" "$srcdir/LICENSE" 2>/dev/null; then + break + fi + done + fi + # Build the wheel (which can fail) only after fetching the license. + pip wheel -v --no-deps --wheel-dir="$srcdir" \ + --global-option=build --global-option=-j"$(nproc)" . || + true +} + +check() { + # Remove the first line line to run tests. + # You may need to call `python setup.py build_ext -i` first. + return 0 + if _is_wheel; then return; fi + cd "$srcdir/$(_dist_name)" + python setup.py -q test +} + +package() { + cd "$srcdir" + # pypa/pip#3063: pip always checks for a globally installed version. + pip --quiet install --root="$pkgdir" --no-deps --ignore-installed \ + "$(ls ./*.whl 2>/dev/null || echo ./"$(_dist_name)")" + if [[ -f LICENSE ]]; then + install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + fi +} + +. "$(dirname "$BASH_SOURCE")/PKGBUILD_EXTRAS" diff --git a/PKGBUILD_EXTRAS b/PKGBUILD_EXTRAS new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/PKGBUILD_EXTRAS |