Install MIME data to map ".xo" files to "application/vnd.olpc-x-sugar"

This commit is contained in:
Dan Winship 2007-08-09 18:29:10 -04:00
parent cff8ffc328
commit 6aeb95aa46
3 changed files with 28 additions and 1 deletions

2
.gitignore vendored
View File

@ -38,6 +38,7 @@ mkinstalldirs
po/Makefile.in.in
po/POTFILES
po/*.gmo
po/.intltool-merge-cache
sugar/__installed__.py
tools/sugar-setup-activity
threadframe
@ -53,4 +54,5 @@ browser/sugar-marshal.h
bin/sugar
shell/extensions/_extensions.c
data/sugar.gtkrc
data/sugar.xml
data/sugar-xo.gtkrc

View File

@ -14,5 +14,23 @@ GTKRC_FILES = \
sugar.gtkrc \
sugar-xo.gtkrc
EXTRA_DIST = $(sugar_DATA) em.py gtkrc.em
mime_xml_in_files = sugar.xml.in
mime_xml_files = $(mime_xml_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@
mimedir = $(datadir)/mime/packages
mime_DATA = $(mime_xml_files)
install-data-hook:
if [ -z "$$DESTDIR" ]; then \
update-mime-database "$(datadir)/mime"; \
fi
uninstall-hook:
if [ -z "$$DESTDIR" ]; then \
update-mime-database "$(datadir)/mime"; \
fi
EXTRA_DIST = $(sugar_DATA) $(mime_xml_in_files) em.py gtkrc.em
CLEANFILES = $(GTKRC_FILES)

7
data/sugar.xml.in Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/vnd.olpc-x-sugar">
<_comment>Sugar activity bundle</_comment>
<glob pattern="*.xo"/>
</mime-type>
</mime-info>