mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 20:20:06 +02:00
squashfs_tools: add mime-type, and Expander rules. (#10278)
Allows to just double click on ".sqfs" files to list or extract its content. Icon is Haiku's "data/artwork/icons/Device_Volume". Could use a custom one.
This commit is contained in:
3
sys-fs/squashfs_tools/additional-files/expander.rules
Normal file
3
sys-fs/squashfs_tools/additional-files/expander.rules
Normal file
@@ -0,0 +1,3 @@
|
||||
"application/x-squashfs" .sfs "unsquashfs -d '' -llc %s" "unsquashfs -d . %s"
|
||||
"application/x-squashfs" .sqfs "unsquashfs -d '' -llc %s" "unsquashfs -d . %s"
|
||||
"application/x-squashfs" .squashfs "unsquashfs -d '' -llc %s" "unsquashfs -d . %s"
|
||||
35
sys-fs/squashfs_tools/additional-files/x-squashfs-image.rdef
Normal file
35
sys-fs/squashfs_tools/additional-files/x-squashfs-image.rdef
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
resource(0, "META:TYPE") "application/x-squashfs-image";
|
||||
|
||||
resource(1, "META:S:DESC") #'MSDC' "SquashFS image";
|
||||
|
||||
resource(2, "META:EXTENS") message(234) {
|
||||
"extensions" = "sfs",
|
||||
"extensions" = "sqfs",
|
||||
"extensions" = "squashfs",
|
||||
"type" = "application/x-squashfs-image"
|
||||
};
|
||||
|
||||
resource(3, "META:SNIFF_RULE") "0.50 (\"hsqs\")";
|
||||
|
||||
resource(4, "META:ICON") #'VICN' array {
|
||||
$"6E636966080500040054020006023B019B3AA235BC243E3C71D248D17C498491"
|
||||
$"00E7BB8FFFC99867020006023BA71138D0C8BBF4B83E90E64AED7C485BD7008A"
|
||||
$"561DFFB57A3A02000602BB6FCBB8D4C839AA71BC3992492FF148D96A00FFC790"
|
||||
$"FFFFF4EA0366330003FFDFC003AD7238110A0626543A464C455C4B4C603E600A"
|
||||
$"063822262E264F3C5A4E484E2A0A04262E264F3C5A3C370A043C373C5A4E484E"
|
||||
$"2A0A043822262E3C374E2A0A042832284E3A573A390A042A4D2B4638492A430A"
|
||||
$"042A4D365238492B460A042A4D3854384936520A042E4CBB2BC5D3BB2BC5072E"
|
||||
$"4A0A042C49344D344B2C470A042A352A402B38383B0A0436442A403846383B0A"
|
||||
$"042B382A403644383B0A042EBE672EBF33BB2DC03FBB2DBF730A042CBD292CBD"
|
||||
$"F5343F343D08022A4E2A540E0A010100000A0001101001178420040A00011030"
|
||||
$"302901178420040A00011030401B01178420040A0001011001178400040A0201"
|
||||
$"02000A030103000A040104000A050105000A06020B06000A0202070D000A0702"
|
||||
$"0C08000A0302090E0815FF0A00020A0F0815FF"
|
||||
};
|
||||
|
||||
resource(5, "META:L:DESC") #'MLDC' "Squashed File System image";
|
||||
|
||||
resource(6, "BEOS:TYPE") #'MIMS' "application/x-vnd.Be-meta-mime";
|
||||
|
||||
resource(7, "META:PREF_APP") #'MSIG' "application/x-vnd.Haiku-Expander";
|
||||
@@ -9,13 +9,18 @@ systems) where low overhead is needed."
|
||||
HOMEPAGE="https://github.com/plougher/squashfs-tools"
|
||||
COPYRIGHT="2002-2023 Phillip Lougher"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/plougher/squashfs-tools/archive/refs/tags/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="94201754b36121a9f022a190c75f718441df15402df32c2b520ca331a107511c"
|
||||
SOURCE_DIR="squashfs-tools-$portVersion"
|
||||
|
||||
PATCHES="squashfs_tools-$portVersion.patchset"
|
||||
|
||||
ADDITIONAL_FILES="
|
||||
expander.rules
|
||||
x-squashfs-image.rdef
|
||||
"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
@@ -77,4 +82,14 @@ INSTALL()
|
||||
{
|
||||
cd squashfs-tools
|
||||
make install $MAKE_ARGS INSTALL_DIR=$commandBinDir INSTALL_MANPAGES_DIR=$manDir/man1
|
||||
|
||||
# Install new mime-type
|
||||
mkdir -p $dataDir/mime_db/application
|
||||
rc $portDir/additional-files/x-squashfs-image.rdef -o squashfs.rsrc
|
||||
resattr -O -o $dataDir/mime_db/application/x-squashfs-image squashfs.rsrc
|
||||
rm squashfs.rsrc
|
||||
|
||||
# Install Expander rules
|
||||
mkdir -p $dataDir/expander/rules
|
||||
cp $portDir/additional-files/expander.rules $dataDir/expander/rules/squashfs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user