summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Yantis2015-06-11 08:58:56 -0700
committerJonathan Yantis2015-06-11 08:58:56 -0700
commitfe53bc532b94ee0088802c54e82ae8685d4f5fc2 (patch)
tree6ef077416dc49b5c683e33ec1dfae8dea0ffec62
downloadaur-fe53bc532b94ee0088802c54e82ae8685d4f5fc2.tar.gz
Initial import
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD65
2 files changed, 83 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2b538356caa4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = python-markdown2-git
+ pkgdesc = A fast and complete implementation of Markdown in Python 3
+ pkgver = 2.3.0.r13.g596d48b
+ pkgrel = 1
+ url = https://github.com/trentm/python-markdown2
+ arch = any
+ license = MIT
+ makedepends = git
+ depends = python
+ depends = python-setuptools
+ optdepends = python-pygments: testing
+ provides = python-markdown2
+ conflicts = python-markdown2
+ source = git+https://github.com/trentm/python-markdown2.git
+ sha256sums = SKIP
+
+pkgname = python-markdown2-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..96fa2536fcb9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,65 @@
+# Maintainer: jyantis <yantis@yantis.net>
+
+# There is some confusion between this and the community python-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=python-markdown2-git
+pkgver=2.3.0.r13.g596d48b
+pkgrel=1
+pkgdesc='A fast and complete implementation of Markdown in Python 3'
+arch=('any')
+url='https://github.com/trentm/python-markdown2'
+license=('MIT')
+depends=('python' 'python-setuptools')
+source=('git+https://github.com/trentm/python-markdown2.git')
+sha256sums=('SKIP')
+makedepends=('git')
+optdepends=('python-pygments: testing')
+provides=('python-markdown2')
+conflicts=('python-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
+ python setup.py build
+}
+
+# Tests fail under python 3 as it has some python 3 code
+# check() {
+# cd python-markdown2
+# cd test
+# python testall.py
+#}
+
+package() {
+ cd python-markdown2
+
+ # 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.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
+
+ # Conflicts happen because of the /usr/bin/markdown2 file if someone installs both the python2 and 3 packages
+ # Since there are multiple versions of python2 and no other python3 versions
+ # lets rename the python3 version to markdown3
+ mv "${pkgdir}/usr/bin/markdown2" "${pkgdir}/usr/bin/markdown3"
+}
+
+# vim:set ts=2 sw=2 et: