summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Yantis2015-06-11 08:58:37 -0700
committerJonathan Yantis2015-06-11 08:58:37 -0700
commit408983e366a327bc62f1ade215e40055ef0a96b3 (patch)
tree1b97c1c326d679b6799e471eb5dc41602596b0c7
downloadaur-408983e366a327bc62f1ade215e40055ef0a96b3.tar.gz
Initial import
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD68
2 files changed, 86 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1501df836cd5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = python2-markdown2-git
+ pkgdesc = A fast and complete implementation of Markdown in Python 2
+ pkgver = 2.3.0.r13.g596d48b
+ pkgrel = 3
+ url = https://github.com/trentm/python-markdown2
+ arch = any
+ license = MIT
+ makedepends = git
+ makedepends = python2-setuptools
+ depends = python2
+ optdepends = python2-pygments: testing
+ provides = python2-markdown2
+ conflicts = python2-markdown2
+ source = git+https://github.com/trentm/python-markdown2.git
+ sha256sums = SKIP
+
+pkgname = python2-markdown2-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..bfb208fe2e4f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,68 @@
+# Maintainer: jyantis <yantis@yantis.net>
+
+# There is some confusion between this and the community python2-markdown
+# That is a different immlementation. From the readme:
+
+# "There is another Python markdown.py. However, at least at the time this
+# project was started, markdown2.py was faster (see the Performance Notes)
+# and, to my knowledge, more correct (see Testing Notes). That was a while ago
+# though, so you shouldn't discount Python-markdown from your consideration."
+
+pkgname=python2-markdown2-git
+pkgver=2.3.0.r13.g596d48b
+pkgrel=3
+pkgdesc='A fast and complete implementation of Markdown in Python 2'
+arch=('any')
+url='https://github.com/trentm/python-markdown2'
+license=('MIT')
+depends=('python2')
+source=('git+https://github.com/trentm/python-markdown2.git')
+sha256sums=('SKIP')
+makedepends=('git' 'python2-setuptools')
+optdepends=('python2-pygments: testing')
+
+# These are the python2 version even though named wrong
+provides=('python2-markdown2')
+conflicts=('python2-markdown2')
+
+pkgver() {
+ cd python-markdown2
+ set -o pipefail
+ 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)"
+}
+
+build() {
+ cd python-markdown2
+
+ # Patch any #!/usr/bin/python to #!/usr/bin/python2
+ for file in $(find . -name '*.py' -print); do
+ sed -r -i 's_^#!.*/usr/bin/python(\s|$)_#!/usr/bin/python2_' $file
+ sed -r -i 's_^#!.*/usr/bin/env(\s)*python(\s|$)_#!/usr/bin/env python2_' $file
+ done
+
+ python2 setup.py build
+}
+
+check() {
+ cd python-markdown2
+ cd test
+ python2 testall.py
+}
+
+package() {
+ cd python-markdown2
+
+ # We don't need anything related to git in the package
+ rm -rf .git*
+
+ python2 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.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
+}
+
+# vim:set ts=2 sw=2 et: