Skip to content

Commit

Permalink
Update debian packaging (#62)
Browse files Browse the repository at this point in the history
- Add pyproject dependency
- Update icon cache in postinst and postrm
  scripts
- Read python dependencies from file requires.txt
  • Loading branch information
hsbasu authored Oct 24, 2024
1 parent d69cb8e commit c8c81e0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Build-Depends: debhelper-compat (= 13),
libglib2.0-bin,
libgtk-4-bin,
meson,
pybuild-plugin-pyproject,
python3,
python3-sphinx,
python3-sphinx-argparse
Expand Down
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
6 changes: 5 additions & 1 deletion debian/postrm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# postrm script for theme-manager
# postrm script for battery-monitor
#
# see: dh_installdeb(1)

Expand All @@ -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
4 changes: 4 additions & 0 deletions debian/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
configobj
PyGObject
setproctitle
tldextract
7 changes: 5 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# output every command that modifies files on the build system.
# export DH_VERBOSE = 1

export PYBUILD_SYSTEM=meson
# export PYBUILD_NAME=battery-monitor
export PYBUILD_NAME=battery-monitor
export PYBUILD_SYSTEM=pyproject

%:
dh ${@} --with python3,sphinxdoc --buildsystem=meson
Expand All @@ -27,3 +27,6 @@ override_dh_auto_build:
override_dh_install:
dh_install -O--buildsystem=meson
install -D -m 0644 data/battery-monitor-autostart.desktop.in debian/battery-monitor/etc/xdg/autostart/battery-monitor-autostart.desktop

override_dh_python3:
dh_python3 -O--buildsystem=meson --requires debian/requires.txt

0 comments on commit c8c81e0

Please sign in to comment.