From 54fc91849c8ef3d76cb0dd29a2500d6a18679a6c Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Mon, 11 Feb 2008 13:55:58 +0000 Subject: [PATCH] Dumped some old mimetype files. Added InstallEdeMimeFiles rule, which should install a new XDG mime types and update mime database. Added fluid mime until fd.o merge it into official mime distribution. --- build/Install.jam | 37 +++++++++++++ datas/Jamfile | 1 + datas/mime-types/Jamfile | 13 +++++ datas/mime-types/x-fluid.xml | 14 +++++ datas/mime.conf | 101 ----------------------------------- datas/mimetypes.conf | 87 ------------------------------ 6 files changed, 65 insertions(+), 188 deletions(-) create mode 100644 datas/mime-types/Jamfile create mode 100644 datas/mime-types/x-fluid.xml delete mode 100644 datas/mime.conf delete mode 100644 datas/mimetypes.conf diff --git a/build/Install.jam b/build/Install.jam index 1d94fec..8d36a35 100644 --- a/build/Install.jam +++ b/build/Install.jam @@ -108,10 +108,47 @@ rule InstallEdeConfigFiles InstallData $(EDECONFIGDIR) : $(<) ; } +# InstallEdeMimeFiles [targets] ; +# Installs XDG mime files and run update-mime-database +rule InstallEdeMimeFiles +{ + # First check if we have 'update-mime-database' command + # TODO: this should be set globaly + local matches = [ Glob $(PATH) : update-mime-database ] ; + + if ! $(matches) { + return ; + } else { + local update_cmd pakdir ; + + update_cmd = $(matches[1]) ; + + # Files must be instaled in $(EDEMIMEDIR)/packages or + # update-mime-database will not see it + pakdir = [ FDirName $(EDEMIMEDIR) packages ] ; + InstallData $(pakdir) : $(<) ; + + MIME_UPDATE_DATABASE = $(update_cmd) ; + + # Shut up jam warning + NotFile $(EDEMIMEDIR) ; + + # Call update-mime-database after install/uninstall + # Just hoping this will be executed after files are copied/removed... + MimeUpdater install : $(EDEMIMEDIR) ; + MimeUpdater uninstall : $(EDEMIMEDIR) ; + } +} + actions Install1 { $(CP) "$(>)" "$(<)" } +actions updated together MimeUpdater +{ + $(MIME_UPDATE_DATABASE) "$(>)" +} + NotFile install uninstall ; Always install uninstall ; diff --git a/datas/Jamfile b/datas/Jamfile index 751a918..ee546a4 100644 --- a/datas/Jamfile +++ b/datas/Jamfile @@ -21,4 +21,5 @@ InstallEdeIcons icons-48 : $(ICONS48) ; InstallEdeConfigFiles $(CONFS) ; InstallEdeDesktopFiles $(PLINKS) ; +SubInclude TOP datas mime-types ; SubInclude TOP datas icon-themes ; diff --git a/datas/mime-types/Jamfile b/datas/mime-types/Jamfile new file mode 100644 index 0000000..d13ad6d --- /dev/null +++ b/datas/mime-types/Jamfile @@ -0,0 +1,13 @@ +# +# $Id$ +# +# Part of Equinox Desktop Environment (EDE). +# Copyright (c) 2008 EDE Authors. +# +# This program is licensed under terms of the +# GNU General Public License version 2 or newer. +# See COPYING for details. + +SubDir TOP datas mime-types ; + +InstallEdeMimeFiles x-fluid.xml ; diff --git a/datas/mime-types/x-fluid.xml b/datas/mime-types/x-fluid.xml new file mode 100644 index 0000000..fd23df1 --- /dev/null +++ b/datas/mime-types/x-fluid.xml @@ -0,0 +1,14 @@ + + + + + FLTK Fluid file + + + + + + + + + diff --git a/datas/mime.conf b/datas/mime.conf deleted file mode 100644 index 916c26e..0000000 --- a/datas/mime.conf +++ /dev/null @@ -1,101 +0,0 @@ -# EFLTK Configuration - Version 2.000300 - -[.rpm] - Name=RPM Package - Exec=einstaller - -[.deb] - Name=DEB Package - Exec=einstaller - -[.tgz] - Name=TGZ Package - Exec=einstaller - -[.fl] - Name=Fast Light user inferface designer file - Exec=efluid - -[.fld] - Name=Fast Light user inferface designer file - Exec=efluid - -[.html] - Name=Internet WWW page - Exec=mozilla - -[.htm] - Name=Internet WWW page - Exec=mozilla - -[.mp3] - Name=Music file compressed with MP3 method - Exec=xmms - -[.bz2] - Exec= - Name=Archive file, type bz2 - -[.tar] - Exec= - Name=Archive file, type tar - -[.C] - Exec=enotepad - Name=C++ language file - -[.cpp] - Exec=enotepad - Name=C++ language file - -[.c] - Exec=enotepad - Name=C language file - -[.h] - Exec=enotepad - Name=C/C++ Include file - -[.H] - Exec=enotepad - -[.jpg] - Exec=eimgviewer - Name=Jpg image - -[.jpeg] - Exec=eimgviewer - Name=Jpeg image - -[.png] - Exec=eimgviewer - Name=Png Image file - -[.gif] - Exec=eimgviewer - Name=Gif Image file - -[.xpm] - Exec=eimgviewer - Name=Xpm image file - -[.sdw] - Name=Staroffice document - Exec=ooffice - -[.cxx] - Name=C++ language file - Exec=enotepad - -[.txt] - Name=Text file - Exec=enotepad - -[.pdf] - Name=PDF file - Exec=epdfreader - -[.m3u] - Name=M3u Playlist - Exec=alsaplayer -i ede_interface - diff --git a/datas/mimetypes.conf b/datas/mimetypes.conf deleted file mode 100644 index fad8e3c..0000000 --- a/datas/mimetypes.conf +++ /dev/null @@ -1,87 +0,0 @@ -# EDE mimetypes description -# -# Format: -# id|description|handler program|icon|wildcard for filename (extension)|wildcard for file command output|classic mime type -# -# - id - short string; to setup subtypes, just use slash (/) as separator in ID -# - description - what is shown in gui -# - handler program - filename will be appended, specify any needed parameters for opening - THIS WILL BE MOVED INTO SEPARATE FILE (for handling multiple programs etc.) -# - icon - just name, don't give extension or path -# - extension - will be used only if multiple types have same file command match. You don't need to give asterisk (*) i.e. .png. If there are multiple extensions, separate them with slash (/). Actually, "extension" can be any part of filename, but I can't think of use for this -# - file output - relevant part of output from `file -bLnNp $filename` -# - classic mime type - what is used for interchange i.e. text/plain - may be used for matching if other methods fail -# -# This is how mimetype resolving is supposed to work: if there is exactly one match for `file` -# output, this is what we use. If there are multiple, the largest match is used. If there are -# no results or several results with same size we look at extension, then at classic mime type -# (using -i parameter to `file`). -# -bitmap|Picture (Unknown)|eimage|image||| -bitmap/bmp|Picture (BMP)|eimage|image|.bmp|PC bitmap data|image/bmp -bitmap/gif|Picture (GIF)|eimage|image|.gif|GIF image data|image/gif -bitmap/jpeg|Picture (JPEG)|eimage|image|.jpg/.jpeg|JPEG image data|image/png -bitmap/png|Picture (PNG)|eimage|image|.png|PNG image data|image/png -bitmap/psd|Picture (Adobe PhotoShop)||image|.psd|Adobe Photoshop Image|image/x-photoshop -text|Plain text|enotepad|txt|.txt/|text|text/plain -#text/unicode|Plain text|enotepad|txt|.txt|Unicode * text|text/plain # we need wildcard support in file output :( -text/c|C code|enotepad|source_c|.c/.h|C program text|text/x-c -text/config|Program configuration|enotepad|ascii|.conf/rc|text|text/plain -text/config/xml|Program configuration (XML)|enotepad|ascii|.conf/rc|XML document text|text/xml -text/cpp|C++ code|enotepad|source_cpp|.cpp/.cxx/.h|C++ program text|text/x-c++ -text/cpp/lame|Plain text|enotepad|txt||C++ program text|text/plain -text/desktop|Shortcut|elauncher|exec|.desktop/.directory|text|text/plain -text/diff|File difference|fldiff|kmultiple|.diff/.patch|'diff' output text| -text/html|Web page (HTML)|konqueror|html|.html/.htm|HTML document text|text/html -text/html/lame|Web page (HTML)|konqueror|html|.html/.htm|text|text/html # for pages that dont have the proper headers, and are so detected as simple ascii text -text/java|Java code|enotepad|source_java|.java|Perl5 module source text|text/x-java # misdetection in find -text/php|PHP code|enotepad|source_php|.php/.php3|PHP script text|text/plain -text/po|Program translation resource|kbabel|ascii|.po|PO (gettext message catalogue) text|text/x-po -text/readme|Read this first!|enotepad|txt2|README|text|text/plain -text/script|Program (shell script)|elauncher|empty|.sh|script text|application/x-shellscript -text/script/perl|Program (Perl script)|elauncher|empty|.pl|perl script text|application/x-perl -text/xml|XML text|enotepad|txt|.xml/|XML document text|text/xml -office|Office document|ooffice2.0|document||Document| -office/db|Database|ooffice2.0|empty||| # find icon for database! -office/db/sqlite|Database (SQLite)|ooffice2.0|empty|.db|SQLite database| -office/ms|Microsoft Office document|ooffice2.0|document||Microsoft Office Document| -office/odf|Open Document Format (ODF) document|ooffice2.0|document|| -office/pdf|PDF document|xpdf|pdf|.pdf|PDF document|application/pdf -office/spread|Spreadsheet|ooffice2.0|spreadsheet||| -office/spread/ods|Spreadsheet (OpenOffice.org 2.0)|ooffice2.0|spreadsheet|.ods|Zip archive data| -office/spread/sxc|Spreadsheet (OpenOffice.org 1.x)|ooffice2.0|spreadsheet|.sxc|Zip archive data| -office/spread/xls|Spreadsheet (MS Excel)|ooffice2.0|spreadsheet|.xls|Microsoft Office Document|application/msexcel -office/word|Word document|ooffice2.0|wordprocessing||| -office/word/doc|Word document (MS Word)|ooffice2.0|wordprocessing|.doc|Microsoft Office Document|application/msword -office/word/odt|Word document (OpenOffice.org 2.0)|ooffice2.0|wordprocessing|.odt|Zip archive data| -office/word/sxw|Word document (OpenOffice.org 1.x)|ooffice2.0|wordprocessing|.sxw|Zip archive data| -empty|Empty file|enotepad|mimetypes/misc||empty| -archive|Archive||tar||archive| # Consider using the term "Compressed file(s)" -archive/bz2|Archive (BZ2)||tar|.bz2|bzip2 compressed data|application/x-gzip -archive/gz|Archive (GZ)||tar|.gz|gzip compressed data|application/x-gzip -archive/rar|Archive (RAR)||tar|.rar|RAR archive data|application/x-rar -archive/tar|Archive (TAR)||tar|.tar|tar archive|application/x-tar -archive/targz|Archive (TAR.GZ)||tar|.tar.gz|gzip compressed data|application/x-gzip -archive/tarbz2|Archive (TAR.BZ2)||tar|.tar.bz2|bzip2 compressed data|application/x-bzip2 -archive/zip|Archive (ZIP)||tar|.zip|Zip archive data|application/x-zip -install|Program installation|efiler|tgz||| -install/makefile|Program instalation (source)|einstaller|make||make commands text|text/x-makefile -install/rpm|Program installation (RPM)|einstaller|rpm|.rpm|RPM|application/x-rpm -program|Program|elauncher|empty||| -program/elf|Program|elauncher|empty||ELF 32-bit LSB executable|application/x-executable -program/elf/o|Program part||mimetypes/misc||ELF 32-bit LSB relocatable|application/x-object -program/jar|Java program|java -jar|empty|.jar|Zip archive data|application/x-zip -program/java-class|Java program|java|empty|.class|compiled Java class data| -program/swf|Macromedia Flash program|mozilla-firefox|empty|.swf|Macromedia Flash data| -video|Video|mplayer|video||video| -video/qt|Video (QuickTime)|mplayer|video|.mov|Apple QuickTime movie|video/quicktime -video/xvid|Video (XviD)|mplayer|video|.avi|video: XviD|video/x-msvideo -audio|Audio|xmms|sound||audio| -audio/mp3|Audio (MP3)|xmms|sound|.mp3|MPEG ADTS, layer III|audio/mpeg -audio/ogg|Audio (OGG)|xmms|sound|.ogg|Ogg data, Vorbis audio|application/ogg -image|Filesystem image||binary|.img|filesystem data| -image/ext2|Filesystem image (ext2)||binary|.img|ext2 filesystem data| -image/boot|Boot floppy image||3floppy_unmount|.img|x86 boot sector| -vector|Drawing (unknown)|inkscape|vectorgfx||| -vector/svg|Drawing (SVG)|inkscape|vectorgfx|.svg|XML document text| # hope they fix file to detect this properly -font|Font||font||font| -font/ttf|Font (TrueType)||font_truetype|.ttf|TrueType font data|