- make install prefix=`pwd`/debian/tmp/usr
- mkdir -p `pwd`/debian/tmp/etc/
- sed 's#/usr/local/sbin/#/usr/sbin/#' < Docs/sample/gnokiirc > `pwd`/debian/tmp/etc/gnokiirc
+# The following two lines are to prevent the install process from installing
+# mgnokiidev owned by the probably not-yet-existing group "gnokii". mgnokiidev
+# gets SGID after dpkg runs preinst which creates the group "gnokii".
+ mv utils/Makefile utils/Makefile.ORIG
+ sed 's#-o root -g gnokii -m 4750 ##' < utils/Makefile.ORIG > utils/Makefile
+#
+ make install prefix=$(build_dir)/usr
+#
+# just to leave the sources in a pristine state...
+ mv utils/Makefile.ORIG utils/Makefile
+#
+ mkdir -p $(build_dir)/etc
+ sed 's#/usr/local/sbin/#/usr/sbin/#' < Docs/sample/gnokiirc > $(build_dir)/etc/gnokiirc
+# lintian complains if there are multiple licence files in one package, hence
+# the next two commands
+ sed 's#"COPYING"#"file:/usr/share/doc/gnokii/copyright"#' < \
+ xgnokii/docs/help/en_US/faq.html > \
+ $(build_dir)/usr/share/xgnokii/help/en_US/faq.html
+ rm -f $(build_dir)/usr/share/xgnokii/help/en_US/COPYING
+# lintian complains if there is a binary that does not have a man page.
+# Pawel says that xlogos will soon be dumped anyways, so...
+ rm -f $(build_dir)/usr/bin/xlogos