summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorUniversebenzene2019-10-02 21:05:10 +0800
committerUniversebenzene2019-10-02 21:05:10 +0800
commit8220def83ba6b890a2c7f15f3b171a34c5f3fbff (patch)
tree369ea0d6cfca749a6747cd71cd52e6da91f6fe5d /PKGBUILD
downloadaur-8220def83ba6b890a2c7f15f3b171a34c5f3fbff.tar.gz
Initial import 1.2.9
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD56
1 files changed, 56 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e5ef1e4128e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer: Astro Benzene <universebenzene at sina dot com>
+pkgbase=python-sunpy-sphinx-theme
+_pyname=${pkgbase#python-}
+pkgname=("python-${_pyname}" "python2-${_pyname}")
+pkgver=1.2.9
+pkgrel=1
+pkgdesc="The sphinx theme for the SunPy website and documentation"
+arch=('i686' 'x86_64')
+url="https://github.com/sunpy/sunpy-sphinx-theme"
+license=('BSD')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-sphinx' 'python2-sphinx' 'python-sphinx-bootstrap-theme' 'python2-sphinx-bootstrap-theme')
+source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
+md5sums=('0c88afd297d1be2e837ee02f22eafae9')
+
+prepare() {
+ cp -a ${srcdir}/${_pyname}-${pkgver}{,-py2}
+}
+
+build() {
+ msg "Building Python2"
+ cd ${srcdir}/${_pyname}-${pkgver}-py2
+ python2 setup.py build
+
+ msg "Building Python3"
+ cd ${srcdir}/${_pyname}-${pkgver}
+ python setup.py build
+}
+
+check() {
+ cd ${srcdir}/${_pyname}-${pkgver}
+ msg "Checking Python3"
+ python setup.py test
+
+ msg "Checking Python2"
+ cd ${srcdir}/${_pyname}-${pkgver}-py2
+ python2 setup.py test
+}
+
+package_python2-sunpy-sphinx-theme() {
+ depends=('python2-sphinx' 'python2-sphinx-bootstrap-theme')
+ cd ${srcdir}/${_pyname}-${pkgver}-py2
+
+ install -D -m644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -D -m644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+ python2 setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
+}
+
+package_python-sunpy-sphinx-theme() {
+ depends=('python-sphinx' 'python-sphinx-bootstrap-theme')
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ install -D -m644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -D -m644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+ python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
+}