diff --git a/debian/postinst b/debian/postinst index 66f5524..cc7efc9 100644 --- a/debian/postinst +++ b/debian/postinst @@ -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 @@ -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 ;; *) diff --git a/debian/postrm b/debian/postrm index 2742632..6fbdad3 100644 --- a/debian/postrm +++ b/debian/postrm @@ -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 ;; *) diff --git a/debian/rules b/debian/rules index 53f9378..99cbc7e 100755 --- a/debian/rules +++ b/debian/rules @@ -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)