1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00
freebsd-ports/devel/libpci/Makefile
Sunpoet Po-Chuan Hsieh 928c273c8f - Strip shared library
- Change symbolic link: libpci.so -> libpci.so.3
- Support STAGEDIR
2013-10-10 14:36:21 +00:00

52 lines
1.3 KiB
Makefile

# Created by: Samy Al Bahra <samy@kerneled.org>
# $FreeBSD$
PORTNAME= libpci
PORTVERSION= 3.2.0
CATEGORIES= devel
MASTER_SITES= ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/ \
LOCAL/sunpoet
DISTNAME= pciutils-${PORTVERSION}
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= PCI configuration space I/O made easy
LICENSE= GPLv2
RUN_DEPENDS= ${LOCALBASE}/share/pciids/pci.ids:${PORTSDIR}/misc/pciids
ALL_TARGET= lib/libpci.a
CPPFLAGS+= -fPIC
MAKE_ENV= LANG=C
USE_LDCONFIG= yes
USES= gmake
PLIST_DIRS= include/pci
PLIST_FILES= ${LIBPCI_FILES} \
lib/libpci.so
LIBPCI_FILES= include/pci/config.h \
include/pci/header.h \
include/pci/pci.h \
include/pci/types.h \
lib/libpci.a \
lib/libpci.so.3 \
libdata/pkgconfig/libpci.pc
post-patch:
@${LN} -s . ${WRKSRC}/lib/pci
@${REINPLACE_CMD} -e '/^CC=/d; /^CFLAGS=/ s|=|+=|; /^IDSDIR=/ s|$$|/pciids|; /^OPT=/d; /^PREFIX=/d' ${WRKSRC}/Makefile
@${REINPLACE_CMD} 's|^#include "|&pci/|' ${WRKSRC}/lib/pci.h
post-build:
@cd ${WRKSRC}/lib/ && ${CC} ${CFLAGS} ${STRIP} -shared *.o -lz -o libpci.so.3
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/include/pci/
.for file in ${LIBPCI_FILES}
${INSTALL_DATA} ${WRKSRC}/lib/${file:T} ${STAGEDIR}${PREFIX}/${file}
.endfor
${LN} -fs libpci.so.3 ${STAGEDIR}${PREFIX}/lib/libpci.so
.include <bsd.port.mk>