summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Pałubicki2019-03-16 21:08:10 +0100
committerMichał Pałubicki2019-03-16 21:19:23 +0100
commitea4ca69ba8607ad42e03647c1741a1ccfe8d222f (patch)
tree44993b8a2ae3fe9d5db392c9be12490cbe6665d5
parenta16618d504db828fe68f76c9f6bda0b8a17134e3 (diff)
downloadaur-ea4ca69ba8607ad42e03647c1741a1ccfe8d222f.tar.gz
Reduce package size
Linking to already installed theme package removes assets duplication.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD6
2 files changed, 6 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fd9cc3025b8e..6a887f298a0b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -7,10 +7,10 @@ pkgbase = python-agate-dbf
license = MIT
makedepends = python-setuptools
makedepends = python-sphinx>=1.2.2
- makedepends = python-sphinx_rtd_theme>=0.1.6
depends = python
depends = python-agate>=1.5.0
depends = python-dbfread>=2.0.5
+ depends = python-sphinx_rtd_theme>=0.1.6
source = https://github.com/wireservice/agate-dbf/archive/0.2.0.tar.gz
sha256sums = fcdb80a52f1738da7313ef7ccc6476254ae4bca9c77fe548bd478cc8b1de34c9
diff --git a/PKGBUILD b/PKGBUILD
index 3e4847c4a386..2d108a6fc10f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,11 +13,11 @@ depends=(
'python'
'python-agate>=1.5.0'
'python-dbfread>=2.0.5'
+ 'python-sphinx_rtd_theme>=0.1.6'
)
makedepends=(
'python-setuptools'
'python-sphinx>=1.2.2'
- 'python-sphinx_rtd_theme>=0.1.6'
)
source=("https://github.com/wireservice/agate-dbf/archive/${pkgver}.tar.gz")
sha256sums=('fcdb80a52f1738da7313ef7ccc6476254ae4bca9c77fe548bd478cc8b1de34c9')
@@ -29,6 +29,10 @@ package() {
python setup.py build_sphinx
mkdir -p "$pkgdir/usr/share/doc"
cp -rv "$srcdir/$_pkgname-$pkgver/build/sphinx/html" "$pkgdir/usr/share/doc/$_pkgname"
+
+ _rtd_theme_path="$(python -c 'import sphinx_rtd_theme; print(sphinx_rtd_theme.get_html_theme_path())')"
+ rm -rvf "$pkgdir/usr/share/doc/$_pkgname/_static"
+ ln -svf "$_rtd_theme_path/sphinx_rtd_theme/static" "$pkgdir/usr/share/doc/$_pkgname/_static"
}
check() {