Makefile revision 1549
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico###############################################################################
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico#
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# libpciaccess - generic PCI access software library & scanpci utility
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico#
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico#
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Permission is hereby granted, free of charge, to any person obtaining a
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# copy of this software and associated documentation files (the "Software"),
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# to deal in the Software without restriction, including without limitation
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# the rights to use, copy, modify, merge, publish, distribute, sublicense,
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# and/or sell copies of the Software, and to permit persons to whom the
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Software is furnished to do so, subject to the following conditions:
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico#
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# The above copyright notice and this permission notice (including the next
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# paragraph) shall be included in all copies or substantial portions of the
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Software.
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico#
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# DEALINGS IN THE SOFTWARE.
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico#
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Package name used in tarballs
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_NAME=libpciaccess
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Version number (used in path names)
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_VERSION=0.13.3
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Checksums for upstream tarball
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoTARBALL_MD5 = 1f65be5ffc55641c1846c2f41d180d00
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoTARBALL_SHA1 = 74e16b6d9a1d9d28279754010d2c4c4636b72e35
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoTARBALL_SHA256= 6cd76ccae4e06eee47d3ead84a118740e9406e2a9b7adc9b08e92c69ce89c2e3
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Patches to apply to source after unpacking, in order
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoSOURCE_PATCHES = scanpci.man.patch
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Library name
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoLIBNAME=libpciaccess
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Where to install libpciaccess files
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_PREFIX=/usr
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_PREFIX_SET=yes
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Package metadata
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_DESC = the libpciaccess library and scanpci utility
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# pkg(5) name we deliver the files in (override default)
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_PKGNAME=diagnostic/scanpci
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_PKGNAME_SET=yes
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Package classification (override default)
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_PKGCLASS=System/Hardware
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_PKGCLASS_SET=yes
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# ARC cases that covered this module
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# PSARC/2008/638 libpciaccess & scanpci
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_ARC_CASES = PSARC/2008/638
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Man pages to apply Sun footer to & attributes to list
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoSUNTOUCHED_MANPAGES=man/scanpci.man
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_STABILITY=Volatile
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoLIB_MAN_SUFFIX=3pciaccess
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Update scanpci.man with program man page flags instead of library ones
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoSUNTOUCH_MAN_FLAGS = $(COMMON_SUNTOUCH_MAN_FLAGS)
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoSUNTOUCH_MAN_FLAGS +=-p $(MODULE_PREFIX)/bin/
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoSUNTOUCH_MAN_FLAGS_SET=yes
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# pkg-config files that need to have -R added
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoFIX_PC_FILES=pciaccess.pc.in
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Activate additional debugging code in debug builds
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_DEBUG_FLAGS=-DDEBUG
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Override linker flags for scanpci program
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoPCIACCESS_PROG_LDFLAGS = $(MAPFILES_FOR_PROGS) ../src/libpciaccess.so.0
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoPROGRAM_VARS = scanpci
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoPROGRAM_MAKEFLAGS = $(PROGRAM_VARS:%=%_LDADD="$(PCIACCESS_PROG_LDFLAGS)")
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_BUILD_MAKEFLAGS = AM_MAKEFLAGS='$(PROGRAM_MAKEFLAGS)'
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Additional targets for scanpci
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_ADD_INSTALL_TARGETS_64 = install_scanpci
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_ADD_INSTALL_TARGETS = $(MODULE_ADD_INSTALL_TARGETS_$(BUILD_TYPE))
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# Compatibility links from /usr/X11/bin to /usr/bin
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoMODULE_X11_BINCOMPAT_LINKS = scanpci
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoinclude ../Makefile.inc
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico# We want to install scanpci, even though the upstream Makefile doesn't
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNicoinstall_scanpci: default_install
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico mkdir -p $(PROTODIR)$(MODULE_PREFIX)/bin \
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico $(PROTODIR)/etc/security/exec_attr.d/ \
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico $(PROTODIR)$(MODULE_PREFIX)/share/man/man1
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico $(INSTALL_SCRIPT) -m 755 $(BUILD_DIR)/scanpci/scanpci \
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico $(PROTODIR)$(MODULE_PREFIX)/bin/scanpci
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico $(INSTALL_SCRIPT) -m 444 $(BUILD_DIR)/man/scanpci.1 \
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico $(PROTODIR)$(MODULE_PREFIX)/share/man/man1/scanpci.1
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico $(INSTALL_SCRIPT) -m 444 exec_attr \
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico $(PROTODIR)/etc/security/exec_attr.d/scanpci
55409b97452fc42cc6fbb542da79ab133ed705b3JazzyNico