64 lines
1.9 KiB
Makefile
Executable file
64 lines
1.9 KiB
Makefile
Executable file
#!/usr/bin/make -f
|
|
|
|
CMD=$(shell echo $@ | sed 's/override_//')
|
|
|
|
LIBWEBKIT_PKG=$(shell dpkg-query -p libwebkit-dev | grep Depends | sed -r 's/.*(libwebkit[^ ]+).*/\1/')
|
|
GTKLAUNCHER=$(shell dpkg-query -L $(LIBWEBKIT_PKG) | grep GtkLauncher)
|
|
DISTRO=$(shell lsb_release -is)
|
|
CONFIG_FILE=debian/config/$(DISTRO).h
|
|
ifneq (0, $(shell test -e $(CONFIG_FILE); echo "$$?"))
|
|
DISTRO=Debian
|
|
endif
|
|
|
|
%:
|
|
dh --with quilt $@
|
|
|
|
override_dh_quilt_patch:
|
|
ln -sf ../$(CONFIG_FILE) midori/midori-debian.h
|
|
test -e midori/midori-debian.h
|
|
$(CMD)
|
|
|
|
WAF=/usr/bin/waf
|
|
#WAF=./waf
|
|
|
|
debian/presubj: debian/presubj.in
|
|
@echo "presubj parameters:"
|
|
@echo "Replacing %LIBWEBKIT_PKG% with $(LIBWEBKIT_PKG)"
|
|
@echo "Replacing %GTKLAUNCHER% with $(GTKLAUNCHER)"
|
|
test -f "/var/lib/dpkg/info/$(LIBWEBKIT_PKG).list"
|
|
test -f "$(GTKLAUNCHER)"
|
|
test -n "$(GTKLAUNCHER)"
|
|
sed -e "s,%LIBWEBKIT_PKG%,$(LIBWEBKIT_PKG),g" -e "s,%GTKLAUNCHER%,$(GTKLAUNCHER),g" $@.in > $@
|
|
|
|
override_dh_install: debian/presubj
|
|
$(CMD)
|
|
|
|
override_dh_auto_clean:
|
|
$(WAF) --nocache distclean
|
|
rm -rf _build_
|
|
|
|
override_dh_auto_configure:
|
|
$(WAF) --nocache configure --prefix /usr
|
|
|
|
override_dh_auto_build:
|
|
$(WAF) --nocache build --debug full
|
|
|
|
override_dh_auto_test:
|
|
xvfb-run $(WAF) --nocache check
|
|
|
|
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
|
|
rm -f debian/tmp/usr/share/midori/res/mootools.js
|
|
ln -s /usr/share/javascript/mootools/mootools.js debian/tmp/usr/share/midori/res/mootools.js
|
|
|
|
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:
|
|
$(CMD) --dbg-package=midori-dbg
|