- # Add here commands to install the package into debian/modest
- $(MAKE) install DESTDIR=$(CURDIR)/debian/modest
+# install the package into debian/tmp/
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+
+ifeq "$(strip $(LAUNCHER))" "yes"
+ mv $(CURDIR)/debian/tmp/usr/bin/modest \
+ $(CURDIR)/debian/modest/usr/bin/modest.launch
+ ln -s /usr/bin/maemo-invoker \
+ $(CURDIR)/debian/modest/usr/bin/modest
+endif
+
+# ACHTUNG: hack
+# we remove the modest.mo english localization, if the current control file contains a reference
+# to modest-l10n-mr0; thus, the modest package will not conflict with that one.
+# if modest-l10n-mr0 is not there, we'll install our own (en_GB) .mo file.
+ grep modest-l10n-mr0 $(CURDIR)/debian/control && rm $(CURDIR)/debian/tmp/usr/share/locale/en_GB/LC_MESSAGES/modest.mo