7023890 resize(1) needs to move out of pkg:/terminal/xterm
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Sun, 05 Jun 2011 23:58:00 -0700
changeset 1143 f9aac8f4b258
parent 1142 c235d03e9fab
child 1144 61b19ca308de
7023890 resize(1) needs to move out of pkg:/terminal/xterm
open-src/app/xterm/Makefile
pkg/manifests/terminal-resize.p5m
pkg/manifests/terminal-xterm.p5m
--- a/open-src/app/xterm/Makefile	Sun Jun 05 23:52:41 2011 -0700
+++ b/open-src/app/xterm/Makefile	Sun Jun 05 23:58:00 2011 -0700
@@ -32,6 +32,10 @@
 MODULE_PKGNAME=terminal/xterm
 MODULE_PKGNAME_SET=yes
 
+# resize goes into a separate package so it can be installed in zones without
+# X, but which you login to from a resizable GUI terminal window.
+RESIZE_PKGNAME=terminal/resize
+
 # Package classification (override default)
 MODULE_PKGCLASS=Applications/System Utilities
 MODULE_PKGCLASS_SET=yes
@@ -61,9 +65,20 @@
 SOURCE_PATCHES = 
 
 # Man pages to apply Sun footer to & attributes to list
-SUNTOUCHED_MANPAGES=*.man
+SUNTOUCHED_MANPAGES=koi8rxterm.man resize.man uxterm.man xterm.man
 MODULE_STABILITY=Committed
 
+# Fix man page footers to not say "Last changed: X Window System"
+XORGRELSTRING = $(MODULE_NAME) $(MODULE_VERSION)
+  XORGMANNAME = X Version 11
+  XVENDORVERS = "$(XORGRELSTRING)" "$(XORGMANNAME)"
+MODULE_SUNTOUCH_MAN_FLAGS = -r '{__vendorversion__, $(XVENDORVERS)}'
+
+# Override specific attributes for specific man pages
+MODULE_SUNTOUCH_MAN_FLAGS += \
+	$(SUNTOUCH_MAN_FLAGS_$(@F:%.man.$(FIXED_MAN_SUFFIX)=%))
+SUNTOUCH_MAN_FLAGS_resize = -o '{Availability, $(RESIZE_PKGNAME)}'
+
 # Paths to find Xft/fontconfig/freetype headers libraries at build time
 # and run time 
 FT_CFLAGS= -I$(PROTODIR)/usr/include -I$(PROTODIR)/usr/include/freetype2
@@ -88,7 +103,6 @@
 # Tell configure where to find luit binary
 MODULE_CONFIG_ENV = LUIT=$(X11_BIN_DIR)/luit
 
-MODULE_ADD_BUILD_TARGETS=fix_manpages
 MODULE_ADD_INSTALL_TARGETS=install_docs
 
 # Compatibility links from /usr/X11/bin to /usr/bin
@@ -96,15 +110,6 @@
 
 include ../Makefile.inc
 
-# Fix man page footers to not say "Last changed: X Window System"
-XORGRELSTRING = $(MODULE_NAME) $(MODULE_VERSION)
-  XORGMANNAME = X Version 11
-  XVENDORVERS = "$(XORGRELSTRING)" "$(XORGMANNAME)"
-
-fix_manpages: $(UNPACK_TARGET)
-	$(PERL) -i -p -e 's{__vendorversion__}{$(XVENDORVERS)}g' \
-	  $(SOURCE_DIR)/*.man
-
 # Install documentation of xterm control sequences for packaging
 MODULE_DOCDIR=/usr/share/doc/xterm
 
@@ -112,3 +117,19 @@
 	mkdir -p $(PROTODIR)$(MODULE_DOCDIR)
 	rm -f $(PROTODIR)$(MODULE_DOCDIR)/ctlseqs.txt
 	cp -pf $(SOURCE_DIR)/ctlseqs.txt $(PROTODIR)$(MODULE_DOCDIR)/
+
+# Metadata for separate package for resize
+RESIZE_PKG_METADATA_DIR      = $(MODULE_PKG_METADATA_DIR:%xterm=%resize)
+RESIZE_PKG_ATTRDATA_FILE     = $(RESIZE_PKG_METADATA_DIR)/$(ATTRDATA_FILE_NAME)
+RESIZE_PKG_LICENSE_FILE      = $(RESIZE_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME)
+RESIZE_METADATA_TARGETS = \
+        $(RESIZE_PKG_METADATA_DIR) \
+        $(RESIZE_PKG_ATTRDATA_FILE) \
+        $(RESIZE_PKG_LICENSE_FILE)
+
+install_metadata: $(RESIZE_METADATA_TARGETS)
+
+$(RESIZE_PKG_METADATA_DIR):
+	mkdir -p $@
+
+$(RESIZE_PKG_ATTRDATA_FILE) $(RESIZE_PKG_LICENSE_FILE): $(RESIZE_PKG_METADATA_DIR)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/manifests/terminal-resize.p5m	Sun Jun 05 23:58:00 2011 -0700
@@ -0,0 +1,36 @@
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+set name=pkg.fmri value=pkg:/terminal/resize@0.__version:xterm__
+set name=pkg.description \
+    value="Resize prints a shell command for setting the TERM and TERMCAP environment variables to indicate the current size of the terminal window from which the command is run."
+set name=pkg.summary \
+    value="resize - adjust terminal settings to current window size"
+dir path=usr
+dir path=usr/X11
+dir path=usr/X11/bin
+dir path=usr/bin
+dir path=usr/share
+dir path=usr/share/man
+dir path=usr/share/man/man1
+file path=usr/bin/resize
+file path=usr/share/man/man1/resize.1
+link path=usr/X11/bin/resize target=../../bin/resize
--- a/pkg/manifests/terminal-xterm.p5m	Sun Jun 05 23:52:41 2011 -0700
+++ b/pkg/manifests/terminal-xterm.p5m	Sun Jun 05 23:58:00 2011 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -21,7 +21,7 @@
 #
 set name=pkg.fmri value=pkg:/terminal/xterm@__version:xterm__
 set name=pkg.description \
-    value="The xterm program is a terminal emulator for the X Window System. It provides DEC VT102 and Tektronix 4014 compatible terminals for programs that can't use the window system directly.  This version implements ISO/ANSI colors using the new color model (i.e., background color erase). It also implements most of the control sequences for VT220."
+    value="The xterm program is a terminal emulator for the X Window System. It provides DEC VT102 and Tektronix 4014 compatible terminals for programs that can't use the window system directly.  This version implements ISO/ANSI colors, Unicode, and most of the control sequences used by DEC VT220 terminals."
 set name=pkg.summary value="xterm - terminal emulator for X"
 dir path=usr
 dir path=usr/X11
@@ -36,7 +36,6 @@
 dir path=usr/share/man/man1
 dir path=usr/share/pixmaps
 file path=usr/bin/koi8rxterm
-file path=usr/bin/resize
 file path=usr/bin/uxterm
 file path=usr/bin/xterm
 file path=usr/share/X11/app-defaults/KOI8RXTerm
@@ -47,14 +46,12 @@
 file path=usr/share/X11/app-defaults/XTerm-color
 file path=usr/share/doc/xterm/ctlseqs.txt
 file path=usr/share/man/man1/koi8rxterm.1
-file path=usr/share/man/man1/resize.1
 file path=usr/share/man/man1/uxterm.1
 file path=usr/share/man/man1/xterm.1
 file path=usr/share/pixmaps/xterm-color_32x32.xpm
 file path=usr/share/pixmaps/xterm-color_48x48.xpm
 file path=usr/share/pixmaps/xterm_32x32.xpm
 file path=usr/share/pixmaps/xterm_48x48.xpm
-link path=usr/X11/bin/resize target=../../bin/resize
 link path=usr/X11/bin/xterm target=../../bin/xterm
 # xterm app-defaults specifies fonts including:
 #  -adobe-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-*
@@ -62,3 +59,4 @@
 #  -misc-fixed-medium-r-normal--<various sizes>-iso10646-1
 depend fmri=pkg:/system/font/xorg/xorg-core type=require
 depend fmri=pkg:/terminal/luit type=require
+depend fmri=pkg:/terminal/resize type=require