components/mlocate/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Mon, 07 Dec 2015 16:17:05 -0800
changeset 5166 29635ee48caa
parent 4942 dff90b344418
child 5549 2dafe44bccaf
permissions -rw-r--r--
17458457 Several ncurses man pages are delivered in the wrong location
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1230
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
     1
#
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
     3
#
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
     7
#
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    12
#
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    18
#
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    20
#
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    21
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    22
#
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2225
diff changeset
    23
# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
1230
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    24
#
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    25
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    26
include ../../make-rules/shared-macros.mk
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    27
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    28
COMPONENT_NAME=         mlocate
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    29
COMPONENT_VERSION=      0.25
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    30
COMPONENT_PROJECT_URL=  https://fedorahosted.org/mlocate
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    31
COMPONENT_SRC=          $(COMPONENT_NAME)-$(COMPONENT_VERSION)
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    32
COMPONENT_ARCHIVE=      $(COMPONENT_SRC).tar.xz
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    33
COMPONENT_ARCHIVE_HASH= \
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    34
    sha256:ab95c111f9dba35b5690896180dd0a7639dbf07d70b862fcb0731264d9273951
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    35
COMPONENT_ARCHIVE_URL=  https://fedorahosted.org/releases/m/l/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1230
diff changeset
    36
COMPONENT_BUGDB=	utility/mlocate
1230
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    37
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1230
diff changeset
    38
TPNO=			10233
1230
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    39
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2225
diff changeset
    40
include $(WS_MAKE_RULES)/prep.mk
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2225
diff changeset
    41
include $(WS_MAKE_RULES)/configure.mk
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2225
diff changeset
    42
include $(WS_MAKE_RULES)/ips.mk
1230
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    43
4942
dff90b344418 21941539 "gmake test" failures for mlocate
Rich Burridge <rich.burridge@oracle.com>
parents: 4924
diff changeset
    44
COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D))
dff90b344418 21941539 "gmake test" failures for mlocate
Rich Burridge <rich.burridge@oracle.com>
parents: 4924
diff changeset
    45
1230
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    46
CONFIGURE_OPTIONS.64 +=    CC="$(CC) -m64"
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    47
CONFIGURE_OPTIONS += --localstatedir="/var/cache"
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    48
CONFIGURE_OPTIONS += --sysconfdir="/etc"
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    49
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    50
COMPONENT_PREP_ACTION = (cd $(@D) ; autoreconf -f && automake)
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    51
COMPONENT_POST_INSTALL_ACTION= \
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    52
    @$(MKDIR) -p $(PROTO_DIR)/etc/; \
4924
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    53
    $(CP) files/updatedb.conf $(PROTO_DIR)/etc/
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    54
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    55
COMPONENT_TEST_TRANSFORMS += \
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    56
	'-e "s|^make.*: Leaving directory.*$$|XXX_REMOVE_XXX|g" ' \
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    57
	'-e "s|^make.*: Entering directory.*$$|XXX_REMOVE_XXX|g" ' \
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    58
	'-e "s|^make.*: Nothing to be.*$$|XXX_REMOVE_XXX|g" ' \
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    59
	'-e "s|^/usr/gnu/bin/make.*$$|XXX_REMOVE_XXX|g" ' \
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    60
	'-e "/^XXX_REMOVE_XXX$$/d" '
1230
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    61
4942
dff90b344418 21941539 "gmake test" failures for mlocate
Rich Burridge <rich.burridge@oracle.com>
parents: 4924
diff changeset
    62
# Test 41 needs to be able to open at least 950 fds. Bump up the limit.
dff90b344418 21941539 "gmake test" failures for mlocate
Rich Burridge <rich.burridge@oracle.com>
parents: 4924
diff changeset
    63
COMPONENT_TEST_ENV_CMD =	ulimit -n 1000; env
dff90b344418 21941539 "gmake test" failures for mlocate
Rich Burridge <rich.burridge@oracle.com>
parents: 4924
diff changeset
    64
dff90b344418 21941539 "gmake test" failures for mlocate
Rich Burridge <rich.burridge@oracle.com>
parents: 4924
diff changeset
    65
# Need /usr/gnu/bin before /usr/bin for GNU diff.
dff90b344418 21941539 "gmake test" failures for mlocate
Rich Burridge <rich.burridge@oracle.com>
parents: 4924
diff changeset
    66
COMPONENT_TEST_ENV +=	PATH="$(@D)/src:$(GNUBIN):$(USRBINDIR):$(USRSBINDIR)"
dff90b344418 21941539 "gmake test" failures for mlocate
Rich Burridge <rich.burridge@oracle.com>
parents: 4924
diff changeset
    67
dff90b344418 21941539 "gmake test" failures for mlocate
Rich Burridge <rich.burridge@oracle.com>
parents: 4924
diff changeset
    68
COMPONENT_TEST_CMD =	$(SOURCE_DIR)/tests/testsuite
4924
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    69
COMPONENT_TEST_TARGETS =
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    70
4942
dff90b344418 21941539 "gmake test" failures for mlocate
Rich Burridge <rich.burridge@oracle.com>
parents: 4924
diff changeset
    71
COMPONENT_SYSTEM_TEST_ENV_CMD =	ulimit -n 1000; env
dff90b344418 21941539 "gmake test" failures for mlocate
Rich Burridge <rich.burridge@oracle.com>
parents: 4924
diff changeset
    72
COMPONENT_SYSTEM_TEST_ENV +=	PATH="$(GNUBIN):$(USRBINDIR):$(USRSBINDIR)"
4924
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    73
COMPONENT_SYSTEM_TEST_CMD =	$(SHELL) $(SOURCE_DIR)/tests/testsuite
4942
dff90b344418 21941539 "gmake test" failures for mlocate
Rich Burridge <rich.burridge@oracle.com>
parents: 4924
diff changeset
    74
COMPONENT_SYSTEM_TEST_ARGS =	AUTOTEST_PATH=$(GNUBIN):$(USRBINDIR):$(USRSBINDIR)
4924
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    75
COMPONENT_SYSTEM_TEST_TARGETS =
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    76
1230
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    77
ASLR_MODE = $(ASLR_ENABLE)
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    78
2225
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 1948
diff changeset
    79
configure:	$(CONFIGURE_64)
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 1948
diff changeset
    80
4924
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    81
build:		$(BUILD_64)
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    82
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    83
install:	$(INSTALL_64)
1230
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    84
4924
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    85
test:		$(TEST_64)
1230
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    86
4924
3100caf65c36 19847666 mlocate should enable its test suite
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    87
system-test:    configure $(SYSTEM_TEST_64)
4339
6501cf9c29f9 21116842 add system-test targets to each component Makefile and to top-level Makefiles
Stacy Yeh <stacy.yeh@oracle.com>
parents: 3817
diff changeset
    88
1230
51caab77ce23 PSARC/2012/123 Replace slocate(1) with mlocate(1)
Edwin Beasant <Edwin.Beasant@oracle.com>
parents:
diff changeset
    89
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2225
diff changeset
    90
REQUIRED_PACKAGES += system/library