diff -urN rpm-5.1.4/lib/rpmfc.c rpm-5.1.4.new/lib/rpmfc.c --- rpm-5.1.4/lib/rpmfc.c 2008-07-29 19:36:38.000000000 +0200 +++ rpm-5.1.4.new/lib/rpmfc.c 2008-07-29 19:43:42.000000000 +0200 @@ -527,6 +527,8 @@ { "troff or preprocessor input", RPMFC_MANPAGE|RPMFC_INCLUDE }, { "GNU Info", RPMFC_MANPAGE|RPMFC_INCLUDE }, + { "Desktop Entry", RPMFC_DESKTOP_FILE|RPMFC_INCLUDE }, + { "perl script text", RPMFC_PERL|RPMFC_INCLUDE }, { "Perl5 module source text", RPMFC_PERL|RPMFC_MODULE|RPMFC_INCLUDE }, @@ -875,6 +877,9 @@ if (fc->fcolor->vals[fc->ix] & RPMFC_JAVA) { xx = rpmfcHelper(fc, 'P', "java"); xx = rpmfcHelper(fc, 'R', "java"); + } else + if (fc->fcolor->vals[fc->ix] & RPMFC_DESKTOP_FILE) { + xx = rpmfcHelper(fc, 'P', "mimetype"); } /*@-observertrans@*/ @@ -957,7 +963,7 @@ /*@unchecked@*/ static struct rpmfcApplyTbl_s rpmfcApplyTable[] = { { rpmfcELF, RPMFC_ELF }, - { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_FONT|RPMFC_HASKELL|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP|RPMFC_MONO|RPMFC_TYPELIB) }, + { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_FONT|RPMFC_HASKELL|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP|RPMFC_MONO|RPMFC_TYPELIB|RPMFC_DESKTOP_FILE) }, #if defined(RPM_VENDOR_MANDRIVA) { rpmfcSYMLINK, RPMFC_SYMLINK }, #endif @@ -1311,6 +1317,9 @@ else if (_suffix(s, ".php")) ftype = "PHP script text"; + else if (_suffix(s, ".desktop")) + ftype = "Desktop Entry"; + /* XXX files with extension ".typelib" are GNOME typelib for now. */ else if (_suffix(s, ".typelib")) ftype = "G-IR binary database"; diff -urN rpm-5.1.4/lib/rpmfc.h rpm-5.1.4.new/lib/rpmfc.h --- rpm-5.1.4/lib/rpmfc.h 2008-07-29 19:36:38.000000000 +0200 +++ rpm-5.1.4.new/lib/rpmfc.h 2008-07-29 19:44:27.000000000 +0200 @@ -28,7 +28,7 @@ #define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32) /* (1 << 3) leaks into package headers, reserved */ - /* bit 4 unused */ + RPMFC_DESKTOP_FILE = (1 << 4), RPMFC_TYPELIB = (1 << 5), RPMFC_HASKELL = (1 << 6), RPMFC_RUBY = (1 << 7), diff -urN rpm-5.1.4/macros/macros.in rpm-5.1.4.new/macros/macros.in --- rpm-5.1.4/macros/macros.in 2008-07-29 19:36:38.000000000 +0200 +++ rpm-5.1.4.new/macros/macros.in 2008-07-29 19:45:45.000000000 +0200 @@ -1617,6 +1617,16 @@ #}1}%{rpm_license_check} #------------------------------------------------------------------------ +# mimetype(...) configuration. +# +# Path to script to autogenerate mimetype(foo) provides, based on MimeType +# key from desktop files. +# +# Note: Used if _use_internal_dependency_generator is non-zero. The +# helper is also used by %{_uselibrpm}/rpmdeps --provides +%__mimetype_provides %{_usrlibrpm}/mimetypedeps.sh --provides + +#------------------------------------------------------------------------ # executable(...) configuration. # # Path to scripts to autogenerate executable(foo) script dependencies,