]> granicus.if.org Git - sudo/commitdiff
Replace out of date MAN_POSTINSTALL with MANCOMPRESS and MANCOMPRESSEXT
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 31 May 2012 20:51:15 +0000 (16:51 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 31 May 2012 20:51:15 +0000 (16:51 -0400)
which can be used to compress the installed manual pages.
Compress the man pages for .deb files to appease lintian.

--HG--
branch : 1.7

Makefile.in
configure
configure.in
mkpkg

index af3430bb599db1beea6aedb5eb3c5a2104160c34..343e078b519a568ae8a3c8f9c1aa11133f650a17 100644 (file)
@@ -37,6 +37,8 @@ NROFF = @NROFFPROG@ -Tascii
 LIBTOOL = @LIBTOOL@
 AR=@AR@
 RANLIB=@RANLIB@
+MANCOMPRESS = @MANCOMPRESS@
+MANCOMPRESSEXT = @MANCOMPRESSEXT@
 
 # Our install program supports extra flags...
 INSTALL = $(SHELL) $(srcdir)/install-sh -c
@@ -581,13 +583,23 @@ install-doc: install-dirs ChangeLog
        (cd $(srcdir) && for f in ChangeLog HISTORY LICENSE NEWS README TROUBLESHOOTING UPGRADE sample.*; do $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 $$f $(DESTDIR)$(docdir); done)
        @LDAP@(cd $(srcdir) && for f in README.LDAP schema.* sudoers2ldif; do $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 $$f $(DESTDIR)$(docdir); done)
        $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 @mansrcdir@/sudo.$(mantype) $(DESTDIR)$(mandirsu)/sudo.$(mansectsu)
-       @rm -f $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)
-       ln $(DESTDIR)$(mandirsu)/sudo.$(mansectsu) $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)
        @REPLAY@$(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 @mansrcdir@/sudoreplay.$(mantype) $(DESTDIR)$(mandirsu)/sudoreplay.$(mansectsu)
        $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 @mansrcdir@/visudo.$(mantype) $(DESTDIR)$(mandirsu)/visudo.$(mansectsu)
        $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 @mansrcdir@/sudoers.$(mantype) $(DESTDIR)$(mandirform)/sudoers.$(mansectform)
        @LDAP@$(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 @mansrcdir@/sudoers.ldap.$(mantype) $(DESTDIR)$(mandirform)/sudoers.ldap.$(mansectform)
-@MAN_POSTINSTALL@
+       @if test -n "$(MANCOMPRESS)"; then \
+           for f in $(mandirsu)/sudo.$(mansectsu) $(mandirsu)/sudoreplay.$(mansectsu) $(mandirsu)/visudo.$(mansectsu) $(mandirform)/sudoers.$(mansectform) $(mandirform)/sudoers.ldap.$(mansectform); do \
+               if test -f $(DESTDIR)$$f; then \
+                   echo $(MANCOMPRESS) -f $(DESTDIR)$$f; \
+                   $(MANCOMPRESS) -f $(DESTDIR)$$f; \
+               fi; \
+           done; \
+           rm -f $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)$(MANCOMPRESSEXT); \
+           ln $(DESTDIR)$(mandirsu)/sudo.$(mansectsu)$(MANCOMPRESSEXT) $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)$(MANCOMPRESSEXT)
+       else \
+           rm -f $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu); \
+           ln $(DESTDIR)$(mandirsu)/sudo.$(mansectsu) $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)
+       fi
 
 check:
        @echo nothing to check
index 45ea22d126accc1a05e53378641e641feba1896d..6a034b96cc8579df56d4cff6ae72ebe450353e89 100755 (executable)
--- a/configure
+++ b/configure
@@ -715,7 +715,8 @@ DEV
 SUDOERS_GID
 SUDOERS_UID
 SUDOERS_MODE
-MAN_POSTINSTALL
+MANCOMPRESSEXT
+MANCOMPRESS
 MANTYPE
 AUTH_OBJS
 OSDEFS
@@ -2852,6 +2853,7 @@ $as_echo "$as_me: Configuring Sudo version $PACKAGE_VERSION" >&6;}
 
 
 
+
 
 
 #
@@ -14062,7 +14064,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     *-*-irix*)
                OSDEFS="${OSDEFS} -D_BSD_TYPES"
                if test -z "$NROFFPROG"; then
-                   MAN_POSTINSTALL='   /bin/rm -f $(mandirsu)/sudo.$(mansectsu).z $(mandirsu)/visudo.$(mansectsu).z $(mandirform)/sudoers.$(mansectform).z ; /usr/bin/pack $(mandirsu)/sudo.$(mansectsu) $(mandirsu)/visudo.$(mansectsu) $(mandirform)/sudoers.$(mansectform)'
                    if test "$prefix" = "/usr/local" -a "$mandir" = '${datarootdir}/man'; then
                        if test -d /usr/share/catman/local; then
                            mandir="/usr/share/catman/local"
@@ -14070,6 +14071,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
                            mandir="/usr/catman/local"
                        fi
                    fi
+                   # Compress cat pages with pack
+                   MANCOMPRESS='pack'
+                   MANCOMPRESSEXT='.z'
                else
                    if test "$prefix" = "/usr/local" -a "$mandir" = '${datarootdir}/man'; then
                        if test -d "/usr/share/man/local"; then
index 7e6492f8cb59a18cf2f38bc10846bab3c6bbaf88..e88fd826bdbd83b0e33c6c4aa20586155c5e21fd 100644 (file)
@@ -30,7 +30,8 @@ AC_SUBST([GETGROUPS_LIB])
 AC_SUBST([OSDEFS])
 AC_SUBST([AUTH_OBJS])
 AC_SUBST([MANTYPE])
-AC_SUBST([MAN_POSTINSTALL])
+AC_SUBST([MANCOMPRESS])
+AC_SUBST([MANCOMPRESSEXT])
 AC_SUBST([SUDOERS_MODE])
 AC_SUBST([SUDOERS_UID])
 AC_SUBST([SUDOERS_GID])
@@ -1660,7 +1661,6 @@ case "$host" in
     *-*-irix*)
                OSDEFS="${OSDEFS} -D_BSD_TYPES"
                if test -z "$NROFFPROG"; then
-                   MAN_POSTINSTALL='   /bin/rm -f $(mandirsu)/sudo.$(mansectsu).z $(mandirsu)/visudo.$(mansectsu).z $(mandirform)/sudoers.$(mansectform).z ; /usr/bin/pack $(mandirsu)/sudo.$(mansectsu) $(mandirsu)/visudo.$(mansectsu) $(mandirform)/sudoers.$(mansectform)'
                    if test "$prefix" = "/usr/local" -a "$mandir" = '${datarootdir}/man'; then
                        if test -d /usr/share/catman/local; then
                            mandir="/usr/share/catman/local"
@@ -1668,6 +1668,9 @@ case "$host" in
                            mandir="/usr/catman/local"
                        fi
                    fi
+                   # Compress cat pages with pack
+                   MANCOMPRESS='pack'
+                   MANCOMPRESSEXT='.z'
                else
                    if test "$prefix" = "/usr/local" -a "$mandir" = '${datarootdir}/man'; then
                        if test -d "/usr/share/man/local"; then
diff --git a/mkpkg b/mkpkg
index 4e9f3839da4cda54a0832d4acf41c8c657308ef9..9f4f328353319bfcc2666fd54f8f6827c61c68f7 100755 (executable)
--- a/mkpkg
+++ b/mkpkg
@@ -185,6 +185,9 @@ case "$osversion" in
        ;;
     deb*|ubu*)
        prefix=/usr
+       # Man pages should be compressed in .deb files
+       export MANCOMPRESS='gzip -9'
+       export MANCOMPRESSEXT='.gz'
        # If Ubuntu, add --enable-admin-flag
        case "$osversion" in
            ubu*)