summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 12:38:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 12:38:07 +0000
commit6dc7255b85d1c1bb1b66b94c55a91f21905eef08 (patch)
tree09a26e75b022344fa64251c7973cccfffe8f174d /debian/rules
parentAdding upstream version 2.8.1. (diff)
downloadpowerline-6dc7255b85d1c1bb1b66b94c55a91f21905eef08.tar.xz
powerline-6dc7255b85d1c1bb1b66b94c55a91f21905eef08.zip
Adding debian version 2.8.1-4.debian/2.8.1-4debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules54
1 files changed, 54 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ee68b32
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,54 @@
+#!/usr/bin/make -f
+
+export PYBUILD_NAME=powerline
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)")
+
+%:
+ dh $@ --with python3,sphinxdoc --buildsystem=pybuild
+
+update-changelog:
+ curl -s "https://api.github.com/repos/powerline/powerline/releases" | jq -r '.[] | .tag_name, .body' - > debian/changelog.upstream
+
+# Build sphinx HTML documentation
+override_dh_installdocs:
+ PYTHONPATH=. sphinx-build -b html -N docs/source docs/build/html
+ dh_installdocs -ppowerline-doc docs/build/html
+ dh_installdocs -A
+
+override_dh_installchangelogs:
+ dh_installchangelogs -ppowerline debian/changelog.upstream
+ dh_installchangelogs -A
+
+override_dh_installman:
+ PYTHONPATH=. sphinx-build -D today="$(BUILD_DATE)" -b man -N docs/source docs/build/man
+ ln -s powerline.1 docs/build/man/powerline-render.1
+ dh_installman -p powerline docs/build/man/*
+
+# Remove scripts and bindings from library packages
+override_dh_install:
+ dh_install -Xscripts/powerline-release.py
+ rm -rf debian/python*-powerline/usr/bin
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/awesome
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/bash
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/bar
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/fish
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/i3
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/lemonbar
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/qtile
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/rc
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/shell
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/tcsh
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/tmux/*.conf
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/vim/plugin
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/vim/autoload
+ rm -f debian/python*-powerline/usr/lib/*/dist-packages/powerline/bindings/zsh/powerline.zsh
+ rm -rf debian/python*-powerline/usr/lib/*/dist-packages/powerline/config_files
+
+# Remove files generated during build
+override_dh_auto_clean:
+ dh_auto_clean
+ find . -name "*.pyc" -delete
+ rm -rf build docs/build .pybuild Powerline.egg-info powerline_status.egg-info scripts/powerline tests/shell