Add mime database file.

This commit is contained in:
2020-03-12 13:33:36 +00:00
parent a90625afaa
commit 2692f87da8
6 changed files with 63 additions and 1 deletions

View File

@@ -45,6 +45,11 @@ build() {
}
package() {
# Install MIME database file
cd "${srcdir}"/Aaru
install -d -m0755 -g 0 "${pkgdir}"/usr/share/mime/packages
install -m0755 -g 0 -t "${pkgdir}"/usr/share/mime/packages aaruformat.xml
cd "${srcdir}"/"${_aarubase}"/Aaru/bin/Debug/${_netcoretarget}/${dotnet_rid}/publish
# Create destination directory
@@ -75,4 +80,18 @@ package() {
# Link executable
install -d -m0755 -g 0 "${pkgdir}"/usr/bin
ln -sf /opt/Aaru/aaru "${pkgdir}"/usr/bin/aaru
}
post_install() {
xdg-icon-resource forceupdate --theme hicolor &>/dev/null
update-mime-database usr/share/mime &>/dev/null
update-desktop-database -q
}
post_upgrade() {
post_install "$1"
}
post_remove() {
post_install "$1"
}

View File

@@ -33,6 +33,11 @@ build() {
}
package() {
# Install MIME database file
cd "${srcdir}"/Aaru
install -d -m0755 -g 0 "${pkgdir}"/usr/share/mime/packages
install -m0755 -g 0 -t "${pkgdir}"/usr/share/mime/packages aaruformat.xml
cd "${srcdir}"/Aaru/bin/Debug/${_netcoretarget}/${dotnet_rid}/publish
# Create destination directory
@@ -63,4 +68,18 @@ package() {
# Link executable
install -d -m0755 -g 0 "${pkgdir}"/usr/bin
ln -sf /opt/Aaru/aaru "${pkgdir}"/usr/bin/aaru
}
post_install() {
xdg-icon-resource forceupdate --theme hicolor &>/dev/null
update-mime-database usr/share/mime &>/dev/null
update-desktop-database -q
}
post_upgrade() {
post_install "$1"
}
post_remove() {
post_install "$1"
}