Skip to content

Commit

Permalink
Build and add docs to deb packaging (#85)
Browse files Browse the repository at this point in the history
- Build unix manual from argparse options
- Build html docs from argparse options
- Add python3-sphinx and python3-sphinx-argparse
  as build dependencies
- Fix post install and remove scripts
  • Loading branch information
hsbasu authored Oct 19, 2024
1 parent c8e48d1 commit 14725fd
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 66 deletions.
5 changes: 4 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Build-Depends: debhelper-compat (= 13),
meson,
pybuild-plugin-pyproject,
python3,
python3-sphinx,
python3-sphinx-argparse
Standards-Version: 4.6.0
Homepage: https://hsbasu.github.io/theme-manager
#Vcs-Browser: https://salsa.debian.org/debian/theme-manager
Expand All @@ -24,7 +26,8 @@ Depends: gir1.2-gtk-3.0,
gir1.2-appindicator3-0.1,
redshift,
${python3:Depends},
${misc:Depends}
${misc:Depends},
${sphinxdoc:Depends}
Suggests: theme-manager-doc
Description: Automatically change Themes
A Python3-based GUI application
Expand Down
1 change: 1 addition & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr
4 changes: 4 additions & 0 deletions debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ case "$1" in
then
glib-compile-schemas /usr/share/glib-2.0/schemas
fi
if which gtk4-update-icon-cache >/dev/null 2>&1
then
gtk4-update-icon-cache -q -t -f /usr/share/icons/hicolor
fi
;;

abort-upgrade|abort-remove|abort-deconfigure)
Expand Down
4 changes: 4 additions & 0 deletions debian/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ case "$1" in
then
glib-compile-schemas /usr/share/glib-2.0/schemas
fi
if which gtk4-update-icon-cache >/dev/null 2>&1
then
gtk4-update-icon-cache -q -t -f /usr/share/icons/hicolor
fi
;;

*)
Expand Down
19 changes: 10 additions & 9 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,22 @@ export PYBUILD_NAME=theme-manager
export PYBUILD_SYSTEM=pyproject

%:
dh ${@} --with=python3 --buildsystem=meson
dh ${@} --with=python3,sphinxdoc --buildsystem=meson


# If you need to rebuild the Sphinx documentation
# Add sphinxdoc to the dh --with line
#
# And uncomment the following lines
# override_dh_auto_build: export http_proxy=127.0.0.1:9
# override_dh_auto_build: export https_proxy=127.0.0.1:9
# override_dh_auto_build:
# dh_auto_build
# PYTHONPATH=. python3 -m sphinx -N -bhtml \
# docs/ usr/share/html # HTML generator
# PYTHONPATH=. python3 -m sphinx -N -bman \
# docs/ usr/share/man/man1 # Manpage generator
override_dh_auto_build: export http_proxy=127.0.0.1:9
override_dh_auto_build: export https_proxy=127.0.0.1:9
override_dh_auto_build:
dh_auto_build -O--buildsystem=meson
PYTHONPATH=. python3 -m sphinx -N -bhtml \
docs/ usr/share/doc/theme-manager/html # HTML generator
PYTHONPATH=. python3 -m sphinx -N -bman \
docs/ usr/share/man/man1 # Manpage generator
rm -rfv usr/share/doc/theme-manager/html/.doctrees usr/share/man/man1/.doctrees

override_dh_install:
dh_install -O--buildsystem=meson
Expand Down
56 changes: 0 additions & 56 deletions debian/theme-manager.1

This file was deleted.

13 changes: 13 additions & 0 deletions debian/theme-manager.doc-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Document: theme-manager
Title: Debian Battery Monitor Manual
Author: Himadri Sekhar Basu <[email protected]>
Abstract: This manual describes what
Theme Manager is and how it can be used
to change themes for different componets
automatically with time on linux desktop
environments.
Section: System/Administration

Format: HTML
Index: /usr/share/doc/theme-manager/html/index.html
Files: /usr/share/doc/theme-manager/html/*.html

0 comments on commit 14725fd

Please sign in to comment.