Makefile revision 1072
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews###############################################################################
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# libpciaccess Makefile
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Permission is hereby granted, free of charge, to any person obtaining a
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# copy of this software and associated documentation files (the "Software"),
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# to deal in the Software without restriction, including without limitation
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# the rights to use, copy, modify, merge, publish, distribute, sublicense,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and/or sell copies of the Software, and to permit persons to whom the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Software is furnished to do so, subject to the following conditions:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The above copyright notice and this permission notice (including the next
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# paragraph) shall be included in all copies or substantial portions of the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Software.
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# DEALINGS IN THE SOFTWARE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
e2e4d321999340802f77adaacd19c797d04b4b95Automatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Package name used in tarballs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_NAME=libpciaccess
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Version number (used in path names)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_VERSION=0.12.1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Checksums for upstream tarball
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTARBALL_MD5 = d6363ee9f4df79f6fc47cba7c67b0d35
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTARBALL_SHA1 = 4933bda545df37395e57ff6b4bd61e17a5431770
e2e4d321999340802f77adaacd19c797d04b4b95Automatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Patches to apply to source after unpacking, in order
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSOURCE_PATCHES = \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews pciaccess_private.h.patch \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews scanpci.man.patch \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews solx_devfs.c.patch
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Library name
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLIBNAME=libpciaccess
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Where to install libpciaccess files
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_PREFIX=/usr
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_PREFIX_SET=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
91a45a8ad51e9167e674ac5ed9b4c9eb3e7faea6Tinderbox User# pkg(5) name we deliver the files in (override default)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_PKGNAME=diagnostic/scanpci
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_PKGNAME_SET=yes
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User# Package classification (override default)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_PKGCLASS=System/Hardware
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_PKGCLASS_SET=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# ARC cases that covered this module
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2008/638 libpciaccess & scanpci
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES = PSARC/2008/638
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Man pages to apply Sun footer to & attributes to list
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSUNTOUCHED_MANPAGES=man/scanpci.man
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_STABILITY=Volatile
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLIB_MAN_SUFFIX=3pciaccess
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Update scanpci.man with program man page flags instead of library ones
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSUNTOUCH_MAN_FLAGS = \
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User $(COMMON_SUNTOUCH_MAN_FLAGS) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -p $(MODULE_PREFIX)/bin/ \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -r '{__distroname__, $(DISTRO_NAME)}'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSUNTOUCH_MAN_FLAGS_SET=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# pkg-config files that need to have -R added
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsFIX_PC_FILES=pciaccess.pc.in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Activate additional debugging code in debug builds
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_DEBUG_FLAGS=-DDEBUG
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Additional targets for scanpci
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ADD_INSTALL_TARGETS_32 = install_scanpci
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ADD_INSTALL_TARGETS = $(MODULE_ADD_INSTALL_TARGETS_$(BUILD_TYPE))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Compatibility links from /usr/X11/bin to /usr/bin
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_X11_BINCOMPAT_LINKS = scanpci
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../Makefile.inc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# We want to install scanpci, even though the upstream Makefile doesn't
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall_scanpci: default_install
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mkdir -p $(PROTODIR)$(MODULE_PREFIX)/bin$(ARCHLIBSUBDIR) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/etc/security/exec_attr.d/ \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)$(MODULE_PREFIX)/share/man/man1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(INSTALL_SCRIPT) -m 755 $(SOURCE_DIR)/scanpci/scanpci \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)$(MODULE_PREFIX)/bin$(ARCHLIBSUBDIR)/scanpci
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(INSTALL_SCRIPT) -m 444 $(SOURCE_DIR)/man/scanpci.1 \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)$(MODULE_PREFIX)/share/man/man1/scanpci.1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(INSTALL_SCRIPT) -m 444 exec_attr \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/etc/security/exec_attr.d/scanpci
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews