summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Yantis2015-06-11 09:06:20 -0700
committerJonathan Yantis2015-06-11 09:06:20 -0700
commit7337dea45058b6118dcad565862877e5a37b66c4 (patch)
tree71a3b71bed2f8fa4cfb684fb1f7403d2afe21af9
downloadaur-7337dea45058b6118dcad565862877e5a37b66c4.tar.gz
Initial import
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD75
2 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..611d2dbd7ac
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = python-rainbow-logging-handler-git
+ pkgdesc = Ultimate Python 3 colorized logger with user-custom colors
+ pkgver = 2.2.2.r2.gd2d8a88
+ pkgrel = 2
+ url = https://github.com/laysakura/rainbow_logging_handler
+ arch = any
+ license = Public Domain
+ makedepends = git
+ makedepends = python-setuptools
+ depends = python
+ provides = python-rainbow-logging-handler
+ conflicts = python-rainbow-logging-handler
+ source = git+https://github.com/laysakura/rainbow_logging_handler.git
+ sha256sums = SKIP
+
+pkgname = python-rainbow-logging-handler-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..a8f420ac166
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,75 @@
+# Maintainer: jyantis <yantis@yantis.net>
+
+pkgname=python-rainbow-logging-handler-git
+pkgver=2.2.2.r2.gd2d8a88
+pkgrel=2
+pkgdesc='Ultimate Python 3 colorized logger with user-custom colors'
+arch=('any')
+url='https://github.com/laysakura/rainbow_logging_handler'
+license=('Public Domain')
+depends=('python')
+source=('git+https://github.com/laysakura/rainbow_logging_handler.git')
+sha256sums=('SKIP')
+makedepends=('git' 'python-setuptools')
+provides=('python-rainbow-logging-handler')
+conflicts=('python-rainbow-logging-handler')
+
+build() {
+ cd $srcdir/rainbow_logging_handler-2.2.2
+ python setup.py build
+}
+
+package() {
+ cd $srcdir/rainbow_logging_handler-2.2.2
+ python setup.py install --root="$pkgdir" --optimize=1
+}
+
+
+pkgver() {
+ cd rainbow_logging_handler
+ set -o pipefail
+ _gitversion=$( git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" )
+
+ # If there is a setup.py then pull the version tag from the file
+ if [ -f "setup.py" ]; then
+ if grep --quiet "version = " setup.py; then
+ printf "%s.%s" "$(grep -R "version = " setup.py | awk -F\' '{print $2}')" $_gitversion | sed 's/-/./g'
+ elif grep --quiet "version=" setup.py; then
+ printf "%s.%s" "$(grep -R "version=" setup.py | awk -F\' '{print $2}')" $_gitversion | sed 's/-/./g'
+ else
+ printf "%s" $_gitversion
+ fi
+ else
+ printf "%s" $_gitversion
+ fi
+}
+
+build() {
+ cd rainbow_logging_handler
+
+ python setup.py build
+}
+
+# Checks fail on python 3
+# check() {
+# cd rainbow_logging_handler
+# python setup.py test --verbose
+# }
+
+package() {
+ cd rainbow_logging_handler
+
+ # We don't need anything related to git in the package
+ rm -rf .git*
+
+ python setup.py install --root="${pkgdir}" --optimize=1
+
+ # Install License
+ install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ # Install Documentation
+ install -D -m644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst"
+}
+
+# vim:set ts=2 sw=2 et: