3263N/A#
3263N/A# CDDL HEADER START
3263N/A#
3263N/A# The contents of this file are subject to the terms of the
3263N/A# Common Development and Distribution License (the "License").
3263N/A# You may not use this file except in compliance with the License.
3263N/A#
3263N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3263N/A# or http://www.opensolaris.org/os/licensing.
3263N/A# See the License for the specific language governing permissions
3263N/A# and limitations under the License.
3263N/A#
3263N/A# When distributing Covered Code, include this CDDL HEADER in each
3263N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3263N/A# If applicable, add the following below this CDDL HEADER, with the
3263N/A# fields enclosed by brackets "[]" replaced with your own identifying
3263N/A# information: Portions Copyright [yyyy] [name of copyright owner]
3263N/A#
3263N/A# CDDL HEADER END
3263N/A#
5680N/A
3263N/A#
5680N/A# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
5680N/A#
6227N/ACOMPILER= gcc
5680N/ABUILD_BITS= 64
3263N/Ainclude ../../make-rules/shared-macros.mk
3263N/A
3263N/ACOMPONENT_NAME= text-utilities
6227N/ACOMPONENT_VERSION= 2.28
3263N/ACOMPONENT_PROJECT_URL= https://www.kernel.org/pub/linux/utils/util-linux
3263N/ACOMPONENT_SRC= util-linux-$(COMPONENT_VERSION)
3263N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
3263N/ACOMPONENT_ARCHIVE_HASH= \
6227N/A sha256:395847e2a18a2c317170f238892751e73a57104565344f8644090c8b091014bb
6227N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/v$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
3263N/A
6227N/ATPNO= 29447
3263N/A
5680N/ATEST_TARGET= install $(TEST_64)
5680N/ASYSTEM_TEST_TARGET= configure $(SYSTEM_TEST_64)
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
3263N/A
3263N/A# We currently only want some of the text-utils text utilities from this
3263N/A# component, so enumerate it in a macro that we can use for build and install.
3263N/A# Anything else that we want should be added to this macro in the future.
3263N/APROGRAMS = colcrt colrm column hexdump rev tailf
3263N/A
3897N/A# Build a utility program used by one of the hexdump tests.
3897N/APROGRAMS += test_sysinfo
3897N/A
3263N/A# Limit translations to the text utilities (and lib/* and include/* ) only.
3263N/ACOMPONENT_PRE_INSTALL_ACTION = \
3263N/A (cd $(@D)/po ; $(GMAKE) text-utilities.pot-update)
3263N/A
3897N/A# We don't need the Python bindings built.
3897N/ACONFIGURE_OPTIONS += --without-python
3897N/A
3263N/A# Always show the build and link lines for easier debugging.
3263N/ACOMPONENT_BUILD_ARGS += V=1
3263N/A
3263N/A# Only build the programs that we want.
3263N/ACOMPONENT_BUILD_ARGS += bin_PROGRAMS="$(PROGRAMS)"
3263N/ACOMPONENT_BUILD_TARGETS = $(PROGRAMS)
3263N/A
3263N/A# Only install the bits we want.
3263N/ACOMPONENT_INSTALL_ARGS += bin_PROGRAMS="$(PROGRAMS)"
3263N/ACOMPONENT_INSTALL_TARGETS = install-man install-binPROGRAMS
3263N/A
3263N/A# Install the message files.
3263N/ACOMPONENT_POST_INSTALL_ACTION = \
3263N/A (cd $(@D)/po ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install)
3263N/A
5680N/ACOMPONENT_TEST_ENV += TS_CMD_COLRM=$(PROTOUSRBINDIR)/colrm
5680N/ACOMPONENT_TEST_ENV += TS_CMD_COLUMN=$(PROTOUSRBINDIR)/column
5680N/ACOMPONENT_TEST_ENV += TS_CMD_HEXDUMP=$(PROTOUSRBINDIR)/hexdump
5680N/ACOMPONENT_TEST_ENV += TS_CMD_TAILF=$(PROTOUSRBINDIR)/tailf
3263N/ACOMPONENT_TEST_ENV += PATH="$(GNUBIN):$(PATH)"
3263N/ACOMPONENT_TEST_DIR = $(COMPONENT_SRC)/tests
3263N/A
3897N/A# The hexdump tests expect the test_sysinfo program in a different location
3897N/A# than where it's built.
3897N/ACOMPONENT_PRE_TEST_ACTION = $(CP) $(@D)/test_sysinfo $(COMPONENT_SRC)/
3263N/A
3353N/ACOMPONENT_TEST_CMD = ./run.sh
3353N/ACOMPONENT_TEST_ARGS = --verbose
3353N/ACOMPONENT_TEST_TARGETS = colrm column hexdump tailf
3353N/A
5680N/ACOMPONENT_SYSTEM_TEST_ENV += TS_CMD_COLRM=$(USRBINDIR)/colrm
5680N/ACOMPONENT_SYSTEM_TEST_ENV += TS_CMD_COLUMN=$(USRBINDIR)/column
5680N/ACOMPONENT_SYSTEM_TEST_ENV += TS_CMD_HEXDUMP=$(USRBINDIR)/hexdump
5680N/ACOMPONENT_SYSTEM_TEST_ENV += TS_CMD_TAILF=$(USRBINDIR)/tailf
4730N/ACOMPONENT_SYSTEM_TEST_ENV += PATH="$(GNUBIN):$(PATH)"
4730N/ACOMPONENT_SYSTEM_TEST_DIR = $(COMPONENT_SRC)/tests
4730N/A
4730N/A# Build the test_sysinfo program; copy it where the tests are looking for it.
4730N/ACOMPONENT_PRE_SYSTEM_TEST_ACTION = \
4730N/A (cd $(@D) ; $(GMAKE) AM_CFLAGS="" \
4730N/A V=1 bin_PROGRAMS="test_sysinfo" test_sysinfo ; \
4730N/A $(CP) test_sysinfo $(SOURCE_DIR))
4730N/A
4730N/ACOMPONENT_SYSTEM_TEST_CMD = ./run.sh
4730N/ACOMPONENT_SYSTEM_TEST_ARGS = --verbose
4730N/ACOMPONENT_SYSTEM_TEST_TARGETS = colrm column hexdump tailf