mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
feat: add deb build (#1422)
This commit is contained in:
16
assets/linux/DEBIAN/control
Normal file
16
assets/linux/DEBIAN/control
Normal file
@@ -0,0 +1,16 @@
|
||||
Package: PiliPlus
|
||||
Version: version_need_change
|
||||
Maintainer: gh-MzA4Nzk <githubaccount2333@proton.me>
|
||||
Original-Maintainer: bggRGjQaUbCoE <githubaccount56556@proton.me>
|
||||
Section: x11
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Essential: no
|
||||
Installed-Size: size_need_change
|
||||
Description: third-party Bilibili client developed in Flutter
|
||||
Homepage: https://github.com/bggRGjQaUbCoE/PiliPlus
|
||||
Depends: libgtk-3-0t64,
|
||||
libmpv2,
|
||||
gir1.2-ayatanaappindicator3-0.1,
|
||||
libayatana-appindicator3-1
|
||||
|
||||
21
assets/linux/DEBIAN/postinst
Normal file
21
assets/linux/DEBIAN/postinst
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
ln -sf /opt/PiliPlus/piliplus /usr/bin/piliplus
|
||||
chmod +x /usr/bin/piliplus
|
||||
|
||||
if [ $1 == "config" ] && [ -x /usr/binupdate-mime-database ]; then
|
||||
echo "updating mime database..."
|
||||
update-mime-database /usr/share/mime || true
|
||||
fi
|
||||
|
||||
if [ $1 == "config" ] && [ -x /usr/bin/gtk-update-icon-cache ]; then
|
||||
echo "updating icon cache..."
|
||||
gtk-update-icon-cache -q -f -t /usr/share/icons/hicolor || true
|
||||
fi
|
||||
|
||||
if [ $1 == "config" ] && [ -x /usr/bin/update-desktop-database ]; then
|
||||
echo "updating desktop database..."
|
||||
update-desktop-database -q /usr/share/applications || true
|
||||
fi
|
||||
|
||||
exit 0
|
||||
26
assets/linux/DEBIAN/postrm
Normal file
26
assets/linux/DEBIAN/postrm
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
rm /usr/bin/piliplus
|
||||
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
|
||||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
echo "updating desktop database..."
|
||||
update-desktop-database -q /usr/share/applications || true
|
||||
fi
|
||||
|
||||
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
||||
echo "updating icon cache..."
|
||||
gtk-update-icon-cache -q -t /usr/share/icons/hicolor || true
|
||||
fi
|
||||
|
||||
if [ -x /usr/bin/update-mime-database ]; then
|
||||
echo "updating mime database..."
|
||||
update-mime-database /usr/share/mime || true
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $1 = "purge" ]; then
|
||||
echo "Removing user data..."
|
||||
rm -rf /home/*/.local/share/com.example.PiliPlus || true
|
||||
rm -rf /root/.local/share/com.example.PiliPlus || true
|
||||
fi
|
||||
|
||||
exit 0
|
||||
8
assets/linux/DEBIAN/prerm
Normal file
8
assets/linux/DEBIAN/prerm
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
|
||||
echo "Stopping PiliPlus if running..."
|
||||
pkill -x piliplus || true
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user