hgview #103668 hgview.1 installed in /usr/man instead of /usr/share/man [open]

In hgview 1.5.0, setup.py installs hgview.1 in ${root}/usr/share/man/man1 directory, because setup.py uses hgviewlib/__pkginfo__.py, which sets share/man/man1 path.

In hgview 1.6.0, 1.6.1 and 1.6.2, setup.py installs hgview.1 in ${root}/usr/man/man1 directory, because setup.py has started to use doc/Makefile for installation of man page.

(${root} means value passed to --root option, as in `python2.7 setup.py install --root=/tmp/hgview`.)

Additionally installed hgview.1 now has +x permission bits, because `install` defaults to 755.

Suggested fix:
--- doc/Makefile
+++ doc/Makefile
@@ -3,7 +3,7 @@
 MAN=$(SOURCES:%.txt=%)
 HTML=$(SOURCES:%.txt=%.html)
 PREFIX=/usr/local
-MANDIR=$(PREFIX)/man
+MANDIR=$(PREFIX)/share/man
 INSTALL=install -c
 
 all: man html
@@ -25,7 +25,7 @@
        for i in $(MAN) ; do \
          subdir=`echo $$i | sed -n 's/..*\.\([0-9]\)$$/man\1/p'` ; \
          $(INSTALL) -d $(DESTDIR)$(MANDIR)/$$subdir && \
-         $(INSTALL) $$i $(DESTDIR)$(MANDIR)/$$subdir ; \
+         $(INSTALL) -m 644 $$i $(DESTDIR)$(MANDIR)/$$subdir ; \
        done
 
 clean:
prioritynormal
typebug
done in<not specified>
closed by<not specified>