]> spindle.queued.net Git - midori/commitdiff
also set a priority number for the alternative in the distro config file. This sets...
authorRyan Niebur <ryanryan52@gmail.com>
Fri, 29 May 2009 07:43:52 +0000 (00:43 -0700)
committerRyan Niebur <ryanryan52@gmail.com>
Fri, 29 May 2009 07:43:52 +0000 (00:43 -0700)
debian/changelog
debian/clean
debian/config/Debian.h
debian/config/Ubuntu.h
debian/midori.postinst.base
debian/rules

index 380e8ac32b03aa04f24621abcb3472e7a7805493..bad5d1a08189119229a8d90d9be4d3aaa9cab692 100644 (file)
@@ -15,8 +15,11 @@ midori (0.1.7-1) UNRELEASED; urgency=low
   * change the default-homepage patch to use the files in debian/config/
     to set the default homepage based on whether it's debian, ubuntu,
     etc (second half of ubuntu diff)
+  * also set a priority number for the alternative in the distro config
+    file. This sets it to 50 for debian, and 39 for ubuntu (just under
+    firefox). This addresses the other half of the ubuntu diff.
 
- -- Ryan Niebur <ryanryan52@gmail.com>  Thu, 28 May 2009 23:28:24 -0700
+ -- Ryan Niebur <ryanryan52@gmail.com>  Fri, 29 May 2009 00:43:08 -0700
 
 midori (0.1.6-1) experimental; urgency=low
 
index d2a367206cf9de86b3817cd50c79c4adad5ce809..d95aab58d3c46be5aacde42a398142d11b16948a 100644 (file)
@@ -1 +1,2 @@
 midori/midori-debian.h
+debian/midori.postinst
index 318a23d1cb23060742ee441b93911b21064804e7..beb0223a52134579b441d8e0ebc8e2a8c6f662e3 100644 (file)
@@ -1 +1,3 @@
 #define DEBIAN_DISTRO_DEFAULT_HOMEPAGE "file:///usr/share/doc/midori/user/midori.html"
+#define DEBIAN_WWW_ALTERNATIVES_PRIORITY 50
+
index d3466f2cb2d95ed57c09a4055034976a7fe5ffa8..5f07884e87a1bed2fe6bcaa609189de14968c2f0 100644 (file)
@@ -1 +1,3 @@
 #define DEBIAN_DISTRO_DEFAULT_HOMEPAGE "file:///usr/share/ubuntu-artwork/home/index.html"
+#define DEBIAN_WWW_ALTERNATIVES_PRIORITY 39
+
index 5c1f3cc1b5c3c2474cd8e4d1c174126c7ee6815d..32f4b76c9cca451833ab3439e676cf8aea71384f 100644 (file)
@@ -4,7 +4,7 @@ case "$1" in
     configure)
         update-alternatives \
             --install /usr/bin/x-www-browser \
-            x-www-browser /usr/bin/midori 50 \
+            x-www-browser /usr/bin/midori DEBIAN_WWW_ALTERNATIVES_PRIORITY \
             --slave /usr/share/man/man1/x-www-browser.1.gz \
             x-www-browser.1.gz /usr/share/man/man1/midori.1.gz
         ;;
index eb6c4d3701a28e933d4f58acbffca8f7b496d8a0..1f9544f48622a1726e7d9c30fffeccc1ebbf1613 100755 (executable)
@@ -1,12 +1,16 @@
 #!/usr/bin/make -f
 
+CMD=$(shell echo $@ | sed 's/override_//')
+
+CONFIG_FILE=debian/config/$(shell lsb_release -is).h
+
 %:
        dh --with quilt $@
 
 override_dh_quilt_patch:
-       ln -sf ../debian/config/$(shell lsb_release -is).h midori/midori-debian.h
+       ln -sf ../$(CONFIG_FILE) midori/midori-debian.h
        test -e midori/midori-debian.h
-       dh_quilt_patch
+       $(CMD)
 
 override_dh_auto_clean:
        ./waf --nocache distclean
@@ -26,5 +30,13 @@ override_dh_auto_install:
        ./waf --nocache install --destdir debian/tmp
        rm -f debian/tmp/usr/share/doc/midori/COPYING debian/tmp/usr/share/doc/midori/TRANSLATE
 
+PRIORITY=$(shell sed -r -e '/DEBIAN_WWW_ALTERNATIVES_PRIORITY/ !d' -e 's/.* ([^ ]*)$$/\1/' $(CONFIG_FILE))
+
+debian/midori.postinst: debian/midori.postinst.base
+       sed "s/DEBIAN_WWW_ALTERNATIVES_PRIORITY/$(PRIORITY)/g" debian/midori.postinst.base > debian/midori.postinst
+
+override_dh_installdeb: debian/midori.postinst
+       $(CMD)
+
 override_dh_strip:
-       dh_strip --dbg-package=midori-dbg
+       $(CMD) --dbg-package=midori-dbg