Skip to content

Commit

Permalink
Remove log folder in postrm
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Mar 18, 2024
1 parent a0b9968 commit ad3bf1c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
2 changes: 2 additions & 0 deletions debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ INSTALL_ROOT=/opt/ChineseChess
case "$1" in
configure)
mkdir -p $INSTALL_ROOT/etc
mkdir -p $INSTALL_ROOT/log
chmod -R a+rw $INSTALL_ROOT/log

if [ ! -f /usr/share/applications/org.Rabbit.ChineseChess.desktop ]; then
Expand All @@ -43,6 +44,7 @@ case "$1" in
rm -fr /usr/share/applications/org.Rabbit.ChineseChess.desktop
rm -fr /etc/ld.so.conf.d/ChineseChess.conf
rm -fr /usr/share/pixmaps/org.Rabbit.ChineseChess.png
rm -fr $INSTALL_ROOT/log
;;

*)
Expand Down
7 changes: 4 additions & 3 deletions debian/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ set -e
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package


INSTALL_ROOT=/opt/ChineseChess
case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
rm -fr /usr/share/applications/org.Rabbit.ChineseChess.desktop
rm -fr /etc/ld.so.conf.d/ChineseChess.conf
#rm -fr /etc/ld.so.conf.d/ChineseChess.conf
rm -fr /usr/share/pixmaps/org.Rabbit.ChineseChess.png
ldconfig
rm -fr $INSTALL_ROOT/log
#ldconfig
;;

*)
Expand Down
18 changes: 12 additions & 6 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,18 @@ override_dh_auto_build:
cmake --build $(BUILD_DIR) --config Release

override_dh_auto_install:
cmake --install $(BUILD_DIR) --config Release --component Runtime --prefix $(PACKAGE_chinesechess_DIR)/opt/ChineseChess
cmake --install $(BUILD_DIR) --config Release --component QtRuntime --prefix $(PACKAGE_chinesechess_DIR)/opt/ChineseChess
cmake --install $(BUILD_DIR) --config Release --component DependLibraries --prefix $(PACKAGE_chinesechess_DIR)/opt/ChineseChess
cmake --install $(BUILD_DIR) --config Release --component QtApplications --prefix $(PACKAGE_chinesechess_DIR)/opt/ChineseChess
cmake --install $(BUILD_DIR) --config Release --component Development --prefix $(PACKAGE_chinesechess_dev_DIR)/opt/ChineseChess
cmake --install $(BUILD_DIR) --config Release --component QtDevelopment --prefix $(PACKAGE_chinesechess_dev_DIR)/opt/ChineseChess
cmake --install $(BUILD_DIR) --config Release --component Runtime \
--prefix $(PACKAGE_chinesechess_DIR)/opt/ChineseChess
cmake --install $(BUILD_DIR) --config Release --component QtRuntime \
--prefix $(PACKAGE_chinesechess_DIR)/opt/ChineseChess
cmake --install $(BUILD_DIR) --config Release --component DependLibraries \
--prefix $(PACKAGE_chinesechess_DIR)/opt/ChineseChess
cmake --install $(BUILD_DIR) --config Release --component QtApplications \
--prefix $(PACKAGE_chinesechess_DIR)/opt/ChineseChess
cmake --install $(BUILD_DIR) --config Release --component Development \
--prefix $(PACKAGE_chinesechess_dev_DIR)/opt/ChineseChess
cmake --install $(BUILD_DIR) --config Release --component QtDevelopment \
--prefix $(PACKAGE_chinesechess_dev_DIR)/opt/ChineseChess

override_dh_builddeb:
dh_builddeb --package=chinesechess -P$(PACKAGE_chinesechess_DIR)
Expand Down

0 comments on commit ad3bf1c

Please sign in to comment.