* 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
midori/midori-debian.h
+debian/midori.postinst
#define DEBIAN_DISTRO_DEFAULT_HOMEPAGE "file:///usr/share/doc/midori/user/midori.html"
+#define DEBIAN_WWW_ALTERNATIVES_PRIORITY 50
+
#define DEBIAN_DISTRO_DEFAULT_HOMEPAGE "file:///usr/share/ubuntu-artwork/home/index.html"
+#define DEBIAN_WWW_ALTERNATIVES_PRIORITY 39
+
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
;;
#!/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
./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