r11670 - in /desktop/unstable/evince/debian: changelog check-mime-types.pl evince.mime rules
lool at users.alioth.debian.org
lool at users.alioth.debian.org
Sun Jun 24 17:16:15 UTC 2007
Author: lool
Date: Sun Jun 24 17:16:15 2007
New Revision: 11670
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=11670
Log:
* Add a script to check the presence of all MIME types listed in .desktop
files in debian/*.mime, debian/check-mime-types.pl; call this scrip in
post-install.
* Update list of MIME types.
Added:
desktop/unstable/evince/debian/check-mime-types.pl
Modified:
desktop/unstable/evince/debian/changelog
desktop/unstable/evince/debian/evince.mime
desktop/unstable/evince/debian/rules
Modified: desktop/unstable/evince/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/evince/debian/changelog?rev=11670&op=diff
==============================================================================
--- desktop/unstable/evince/debian/changelog (original)
+++ desktop/unstable/evince/debian/changelog Sun Jun 24 17:16:15 2007
@@ -5,8 +5,12 @@
* Drop dh_installmime from debian/rules and build-dep on cdbs >= 0.4.35.
* Misc cleanups.
* Build-dep on cdbs >= 0.4.37 for -dbg support.
-
- -- Loic Minier <lool at dooz.org> Sun, 24 Jun 2007 18:12:22 +0200
+ * Add a script to check the presence of all MIME types listed in .desktop
+ files in debian/*.mime, debian/check-mime-types.pl; call this scrip in
+ post-install.
+ * Update list of MIME types.
+
+ -- Loic Minier <lool at dooz.org> Sun, 24 Jun 2007 19:13:19 +0200
evince (0.8.1-2) unstable; urgency=low
Added: desktop/unstable/evince/debian/check-mime-types.pl
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/evince/debian/check-mime-types.pl?rev=11670&op=file
==============================================================================
--- desktop/unstable/evince/debian/check-mime-types.pl (added)
+++ desktop/unstable/evince/debian/check-mime-types.pl Sun Jun 24 17:16:15 2007
@@ -1,0 +1,45 @@
+# shebang disabled as this is shipped in the .diff.gz
+#/usr/bin/perl -T
+# compares MIME types in installed .desktop files with the ones installed in
+# debian/*.mime files
+
+use warnings;
+use strict;
+
+my @debian_mime_types;
+foreach my $mime_file (glob "debian/*.mime") {
+ open MIME_FILE,$mime_file or die "Can't open $mime_file: $!";
+ while (<MIME_FILE>) {
+ chomp;
+ s/\s*;.*//;
+ next if /^#/;
+ next if /^$/;
+ push @debian_mime_types, $_;
+ }
+}
+
+my @desktop_mime_types;
+foreach my $desktop_file (glob "debian/*/usr/share/applications/*.desktop") {
+
+ open DESKTOP_FILE,$desktop_file or die "Can't open $desktop_file: $!";
+ while (<DESKTOP_FILE>) {
+ chomp;
+ next unless /^MimeType\s*=/;
+ s/.*=\s*//;
+ push @desktop_mime_types, split(/;/);
+ }
+}
+
+my @missing_mime_types;
+foreach my $desktop_mime_type (@desktop_mime_types) {
+ next if grep($desktop_mime_type eq $_, @debian_mime_types);
+ push @missing_mime_types, $desktop_mime_type;
+}
+
+if (@missing_mime_types) {
+ print "The following MIME types are listed in some .desktop files but are missing from debian/*.mime:\n";
+ print join("\n", @missing_mime_types);
+ print "\n";
+ exit(2);
+}
+
Modified: desktop/unstable/evince/debian/evince.mime
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/evince/debian/evince.mime?rev=11670&op=diff
==============================================================================
--- desktop/unstable/evince/debian/evince.mime (original)
+++ desktop/unstable/evince/debian/evince.mime Sun Jun 24 17:16:15 2007
@@ -1,4 +1,19 @@
-application/pdf; evince %s; test=test -n "$DISPLAY" ; nametemplate=%s.pdf; priority=5
-application/postscript; evince %s; test=test -n "$DISPLAY" ; nametemplate=%s.ps; priority=5
-application/x-dvi; evince %s; test=test -n "$DISPLAY" ; nametemplate=%s.dvi; priority=5
-image/vnd.djvu; evince %s; test=test -n "$DISPLAY" ; nametemplate=%s.djvu; priority=5
+application/pdf; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.pdf; priority=5
+application/x-bzpdf; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.pdf.gz; priority=5
+application/x-gzpdf; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.pdf.bz2; priority=5
+application/postscript; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.ps; priority=5
+application/x-bzpostscript; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.ps.bz2; priority=5
+application/x-gzpostscript; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.ps.gz; priority=5
+image/x-eps; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.eps; priority=5
+image/x-bzeps; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.eps.bz2; priority=5
+image/x-gzeps; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.eps.gz; priority=5
+application/x-dvi; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.dvi; priority=5
+application/x-gzdvi; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.dvi.gz; priority=5
+image/vnd.djvu; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.djvu; priority=5
+image/tiff; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.tiff; priority=5
+application/x-cbr; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.cbr; priority=5
+application/x-cbz; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.cbz; priority=5
+application/vnd.sun.xml.impress; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.sxd; priority=5
+application/vnd.oasis.opendocument.presentation; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.odp; priority=5
+
+image/*; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.dummy; priority=5
Modified: desktop/unstable/evince/debian/rules
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/evince/debian/rules?rev=11670&op=diff
==============================================================================
--- desktop/unstable/evince/debian/rules (original)
+++ desktop/unstable/evince/debian/rules Sun Jun 24 17:16:15 2007
@@ -6,7 +6,8 @@
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk
-DEB_CONFIGURE_EXTRA_FLAGS += --disable-scrollkeeper \
+DEB_CONFIGURE_EXTRA_FLAGS += \
+ --disable-scrollkeeper \
--enable-djvu \
--enable-dvi \
--with-print=gtk \
@@ -20,3 +21,8 @@
binary-install/evince-dbg::
rm -rf debian/evince-dbg/usr/share/doc/evince-dbg
dh_link -pevince-dbg usr/share/doc/evince usr/share/doc/evince-dbg
+
+binary-post-install/evince::
+ # check for missing MIME types
+ perl -T debian/check-mime-types.pl
+
More information about the pkg-gnome-commits
mailing list