]> git.donarmstrong.com Git - debhelper.git/commitdiff
r1737: releasing version 4.2.30 4.2.30
authorjoey <joey>
Wed, 5 Jan 2005 00:09:57 +0000 (00:09 +0000)
committerjoey <joey>
Wed, 5 Jan 2005 00:09:57 +0000 (00:09 +0000)
autoscripts/postinst-init
autoscripts/postinst-menu
autoscripts/postinst-menu-method
autoscripts/postinst-mime
autoscripts/postinst-sharedmimeinfo [new file with mode: 0644]
autoscripts/postrm-sharedmimeinfo [new file with mode: 0644]
autoscripts/postrm-xfonts
autoscripts/prerm-init
autoscripts/prerm-init-norestart
debian/changelog
dh_installmime

index 8128cd96fcc641b7d959e6df26422334d36deb60..6a1c5727e14972f512b32b5d4141c625f2a9f0fe 100644 (file)
@@ -1,6 +1,6 @@
 if [ -x "/etc/init.d/#SCRIPT#" ]; then
        update-rc.d #SCRIPT# #INITPARMS# >/dev/null
 if [ -x "/etc/init.d/#SCRIPT#" ]; then
        update-rc.d #SCRIPT# #INITPARMS# >/dev/null
-       if [ -x /usr/sbin/invoke-rc.d ]; then
+       if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
                invoke-rc.d #SCRIPT# start || #ERROR_HANDLER#
        else
                /etc/init.d/#SCRIPT# start || #ERROR_HANDLER#
                invoke-rc.d #SCRIPT# start || #ERROR_HANDLER#
        else
                /etc/init.d/#SCRIPT# start || #ERROR_HANDLER#
index 276a3c0a7f64f4e9bb1bdc83bda0d55faa15f2ba..b56a34622bb97ececbb6f133bdae86fb6752ba66 100644 (file)
@@ -1 +1,3 @@
-if [ "$1" = "configure" ] && [ -x /usr/bin/update-menus ]; then update-menus ; fi
+if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
+       update-menus
+fi
index d3ef636264b6abdd209a29d3123aefb7ba96ca5f..c56d625894930d89f58ca573ae81638b4fedf098 100644 (file)
@@ -1,7 +1,7 @@
 inst=/etc/menu-methods/#PACKAGE#
 if [ -f $inst ]; then
        chmod a+x $inst
 inst=/etc/menu-methods/#PACKAGE#
 if [ -f $inst ]; then
        chmod a+x $inst
-       if [ -x /usr/bin/update-menus ]; then
+       if [ -x "`which update-menus 2>/dev/null`" ]; then
                update-menus
        fi
 fi
                update-menus
        fi
 fi
index bef63cc97295085f3db20ba68bc07f60e11b71ab..3749fc9d503b5539928579f53f29589889ea60c3 100644 (file)
@@ -1 +1,3 @@
-if [ "$1" = "configure" ] && [ -x /usr/sbin/update-mime ]; then update-mime; fi
+if [ "$1" = "configure" ] && [ -x "`which update-mime 2>/dev/null`" ]; then
+       update-mime
+fi
diff --git a/autoscripts/postinst-sharedmimeinfo b/autoscripts/postinst-sharedmimeinfo
new file mode 100644 (file)
index 0000000..aa6333f
--- /dev/null
@@ -0,0 +1,3 @@
+if [ "$1" = "configure" ] && [ -x "`which update-mime-database 2>/dev/null`" ]; then
+       update-mime-database /usr/share/mime
+fi
diff --git a/autoscripts/postrm-sharedmimeinfo b/autoscripts/postrm-sharedmimeinfo
new file mode 100644 (file)
index 0000000..917fd49
--- /dev/null
@@ -0,0 +1,3 @@
+if [ -x "`which update-mime-database 2>/dev/null`" ]; then
+       update-mime-database /usr/share/mime
+fi
index a4d0a082465d54730844447fba313fe841ae4cac..42fea687c581c573cb3d8052c31a68bd22bf9f9a 100644 (file)
@@ -1,3 +1,3 @@
-if [ "$1" != "upgrade" ] && [ -x /usr/sbin/update-fonts-dir ]; then
+if [ "$1" != "upgrade" ] && [ -x "`which update-fonts-dir 2>/dev/null`" ]; then
 #CMDS#
 fi
 #CMDS#
 fi
index 014fa9a082834de74e3abc5287b61c28567b93e1..96d37558e844932ef589e695b31115a402866408 100644 (file)
@@ -1,5 +1,5 @@
 if [ -x "/etc/init.d/#SCRIPT#" ]; then
 if [ -x "/etc/init.d/#SCRIPT#" ]; then
-       if [ -x /usr/sbin/invoke-rc.d ] ; then
+       if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
                invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER#
        else
                /etc/init.d/#SCRIPT# stop || #ERROR_HANDLER#
                invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER#
        else
                /etc/init.d/#SCRIPT# stop || #ERROR_HANDLER#
index 0f64c45eb69e9cfa496f54d13907205f73be1c8c..9b63174811895524939fe2edaa38c0e70488e4b3 100644 (file)
@@ -1,5 +1,5 @@
 if [ -x "/etc/init.d/#SCRIPT#" ] && [ "$1" = remove ]; then
 if [ -x "/etc/init.d/#SCRIPT#" ] && [ "$1" = remove ]; then
-       if [ -x /usr/sbin/invoke-rc.d ] ; then
+       if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
                invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER#
        else
                /etc/init.d/#SCRIPT# stop || #ERROR_HANDLER#
                invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER#
        else
                /etc/init.d/#SCRIPT# stop || #ERROR_HANDLER#
index d2c66a59450d7401e25edcc32a73954318c82608..ead31f7f3983b90aad9c8ce5f177969173bdc183 100644 (file)
@@ -1,3 +1,13 @@
+debhelper (4.2.30) unstable; urgency=low
+
+  * dh_installmime: Patch from Loïc Minier to add support for instlaling
+    "sharedmimeinfo" files and calling update-mime-database. Closes: #255719
+  * Modified patch to not hardcode pathnames.
+  * Modified other autoscripts so there are no hardcoded pathnames at all
+    any more.
+
+ -- Joey Hess <joeyh@debian.org>  Tue,  4 Jan 2005 18:44:11 -0500
+
 debhelper (4.2.29) unstable; urgency=low
 
   * dh_installdocs Spanish manpage update
 debhelper (4.2.29) unstable; urgency=low
 
   * dh_installdocs Spanish manpage update
index 8ffd523621e7b756daa69eeff5cfef5649f9dd2f..42f2f823eea83a5c77257bb743b8362950c886e1 100755 (executable)
@@ -19,11 +19,13 @@ dh_installmime is a debhelper program that is responsible for installing
 mime files into package build directories.
 
 It also automatically generates the postinst and postrm commands needed to
 mime files into package build directories.
 
 It also automatically generates the postinst and postrm commands needed to
-interface with the debian mime-support package. See L<dh_installdeb(1)> for
-an explanation of how this works.
+interface with the debian mime-support and shared-mime-info packages.  See
+L<dh_installdeb(1)> for an explanation of how this works.
 
 
-If a file named debian/package.mime exists, then it is installed into
-usr/lib/mime/packages/package in the package build directory.
+If files named debian/package.mime or debian/package.sharedmimeinfo exist, then
+they are installed into usr/lib/mime/packages/package and
+/usr/share/mime/packages/package.xml (respectively) in the package build
+directory.
 
 =head1 OPTIONS
 
 
 =head1 OPTIONS
 
@@ -54,11 +56,28 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        doit("install","-d","$tmp/usr/lib/mime/packages");
                }
                doit("install","-p","-m644",$mime,"$tmp/usr/lib/mime/packages/$package");
                        doit("install","-d","$tmp/usr/lib/mime/packages");
                }
                doit("install","-p","-m644",$mime,"$tmp/usr/lib/mime/packages/$package");
-
-               if (! $dh{NOSCRIPTS}) {
-                       autoscript($package,"postinst","postinst-mime");
-                       autoscript($package,"postrm","postrm-mime")
+       }
+       # Check wether we have to call update-mime (either upstream already
+       # installs a MIME information file or Debian provides one)
+       if ((! $dh{NOSCRIPTS}) && (-d "$tmp/usr/lib/mime/packages")) {
+               autoscript($package,"postinst","postinst-mime");
+               autoscript($package,"postrm","postrm-mime")
+       }
+       
+       my $sharedmimeinfo=pkgfile($package,"sharedmimeinfo");
+       
+       if ($sharedmimeinfo ne '') {
+               if (! -d "$tmp/usr/share/mime/packages") {
+                       doit("install", "-d", "$tmp/usr/share/mime/packages");
                }
                }
+               doit("install", "-p", "-m644", $sharedmimeinfo, "$tmp/usr/share/mime/packages/$package.xml");
+       }
+       # check wether we have to call update-mime-database (either upstream
+       # already installs a shared MIME information file or Debian provides
+       # one)
+       if ((! $dh{NOSCRIPTS}) && (-d "$tmp/usr/share/mime/packages")) {
+               autoscript($package, "postinst", "postinst-sharedmimeinfo");
+               autoscript($package, "postrm", "postrm-sharedmimeinfo")
        }
 }
 
        }
 }