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

@@ -74,6 +74,7 @@
<e p="launchSettings.json" t="Include" />
</e>
<e p="Settings.StyleCop" t="Include" />
<e p="aaruformat.xml" t="Include" />
<e p="bin" t="ExcludeRecursive" />
<e p="obj" t="ExcludeRecursive">
<e p="Debug" t="Include">

View File

@@ -305,6 +305,12 @@
<Section>net</Section>
<PackageDescription>Disc image management and creation tool for disks, tapes, optical and solid state media</PackageDescription>
</PropertyGroup>
<ItemGroup>
<Content Include="aaruformat.xml" CopyToPublishDirectory="PreserveNewest" LinuxFileMode="0644">
<LinuxPath>/usr/share/mime/packages/aaruformat.xml</LinuxPath>
</Content>
</ItemGroup>
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'alpine-x64'">
<PackageName>$(PackagePrefix)-$(PackageVersion)_alpine_x86_64$(DebugPackage)</PackageName>

17
Aaru/aaruformat.xml Normal file
View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/vnd.aaruformat">
<comment>Aaru Image Format</comment>
<glob pattern="*.dicf"/>
<glob pattern="*.dicformat"/>
<glob pattern="*.aaruf"/>
<glob pattern="*.aaruformat"/>
<glob pattern="*.aif"/>
<alias type="application/x-aaru"/>
<alias type="application/aaru"/>
<magic>
<match type="string" offset="0" value="DICMFRMT"/>
<match type="string" offset="0" value="AARUFRMT"/>
</magic>
</mime-type>
</mime-info>

View File

@@ -55,7 +55,7 @@ fi
mv pkg/pacman/stable/*.pkg.tar.xz build/
cd build
for i in *.deb *.rpm *.zip;
for i in *.deb *.rpm *.zip *.tar.gz;
do
gpg --armor --detach-sign "$i"
done

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"
}