summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Pałubicki2019-03-16 21:22:42 +0100
committerMichał Pałubicki2019-03-16 21:22:42 +0100
commitc80e822609ff274244098d6d0cd19190d9fec0b8 (patch)
tree747dbc2b0cdb668e7c3c807e6070ac83c9390dfa
parent91062aaec191ad18b2ca0bf47ab95184ccf11330 (diff)
downloadaur-c80e822609ff274244098d6d0cd19190d9fec0b8.tar.gz
Reduce package size by linking to rtd theme package
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD6
2 files changed, 6 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d0960ca4ed9..c1b191fde54 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -7,10 +7,10 @@ pkgbase = python-agate-sql
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-sqlalchemy>=1.0.8
+ depends = python-sphinx_rtd_theme>=0.1.6
source = https://github.com/wireservice/agate-sql/archive/0.5.3.tar.gz
sha256sums = 73f7ed13092a0ec18f94820290e5c372cfeea256daef53300ae168965d40a37a
diff --git a/PKGBUILD b/PKGBUILD
index eecc7545821..c2ad7aff511 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,11 +12,11 @@ depends=(
'python'
'python-agate>=1.5.0'
'python-sqlalchemy>=1.0.8'
+ '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-sql/archive/${pkgver}.tar.gz")
sha256sums=('73f7ed13092a0ec18f94820290e5c372cfeea256daef53300ae168965d40a37a')
@@ -28,4 +28,8 @@ 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"
}