Skip to content

Commit

Permalink
Debian package fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
L3337 committed Apr 20, 2023
1 parent e155935 commit d68306b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions scripts/deb.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ def parse_args():
#!/bin/sh
rm -f /usr/bin/stargate
rm -rf /usr/share/doc/stargate
rm -f /usr/share/pixmaps/stargate.png
rm -f /usr/share/pixmaps/stargate.ico
rm -f /usr/share/applications/stargate.desktop
rm -f /usr/share/mime/packages/stargate.xml
ln -s /opt/stargate/scripts/stargate /usr/bin/stargate || true
ln -s /opt/stargate/files/share/doc/stargate /usr/share/doc/stargate || true
ln -s /opt/stargate/files/share/pixmaps/stargate.png \
Expand All @@ -143,7 +149,7 @@ def parse_args():
# xdg-mime default stargate.desktop text/stargate.project || true
"""

prerm = """\
postrm = """\
rm -f /usr/bin/stargate || true
rm -f /usr/bin/stargate || true
rm -rf /usr/share/doc/stargate || true
Expand Down Expand Up @@ -172,13 +178,13 @@ def parse_args():
f.write(postinst)
os.chmod(postinst_path, 0o755)

prerm_path = os.path.join(
postrm_path = os.path.join(
DEBIAN,
'prerm',
'postrm',
)
with open(prerm_path, 'w') as f:
f.write(prerm)
os.chmod(prerm_path, 0o755)
with open(postrm_path, 'w') as f:
f.write(postrm)
os.chmod(postrm_path, 0o755)

retcode = os.system(f"dpkg-deb --build --root-owner-group {root}")
assert not retcode, retcode
Expand Down

0 comments on commit d68306b

Please sign in to comment.