summaryrefslogtreecommitdiff
path: root/net/mDNSResponder/Makefile
blob: e93132e1c4c38cd1d1892f907d71295195004a41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# $NetBSD: Makefile,v 1.37 2012/10/23 17:18:36 asau Exp $

DISTNAME=	mDNSResponder-258.14
CATEGORIES=	net
MASTER_SITES=	http://www.opensource.apple.com/tarballs/mDNSResponder/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://developer.apple.com/bonjour/
COMMENT=	Apple's mDNS responder
LICENSE=	apache-2.0 AND modified-bsd

USE_TOOLS+=		gmake flex bison
BUILD_DIRS=		mDNSPosix
BUILDDIR=		${WRKSRC}/mDNSPosix/build/prod
AUTO_MKDIRS=		yes
MAKE_JOBS_SAFE=		no

.include "../../mk/bsd.prefs.mk"

SO_SUFFIX=	so
.if ${OPSYS} == "NetBSD"
MAKE_ENV+=	os=netbsd
.elif ${OPSYS} == "FreeBSD"
MAKE_ENV+=	os=freebsd
.elif ${OPSYS} == "OpenBSD"
MAKE_ENV+=	os=openbsd
.elif ${OPSYS} == "SunOS"
MAKE_ENV+=	os=solaris
.elif ${OPSYS} == "Linux"
MAKE_ENV+=	os=linux
.elif ${OPSYS} == "Darwin"
MAKE_ENV+=	os=x
SO_SUFFIX=	dylib
.else
MAKE_ENV+=	os=netbsd
.endif
PLIST_SUBST+=	SO_SUFFIX=${SO_SUFFIX:Q}

BINARY=		mDNSClientPosix mDNSIdentify mDNSNetMonitor \
		mDNSProxyResponderPosix mDNSResponderPosix
SBINARY=	mdnsd dnsextd

.if !empty(MACHINE_PLATFORM:MNetBSD-3.99.[1-7]-*) || \
    !empty(MACHINE_PLATFORM:MNetBSD-3.[0-9]-*) || \
    !empty(MACHINE_PLATFORM:MNetBSD-3.[0-9][._]*) || \
    !empty(MACHINE_PLATFORM:MNetBSD-[0-2]*) || \
    !empty(MACHINE_PLATFORM:MSunOS-5.[0-9]-*)
.include "../../devel/librfuncs/buildlink3.mk"

MAKE_ENV+=	EXTRA_LIBS=-Wl,-R${BUILDLINK_PREFIX.librfuncs}/lib\ ${BUILDLINK_LDFLAGS.librfuncs:Q}
.else
MAKE_ENV+=	EXTRA_LIBS=
.endif

LDFLAGS.SunOS+=	-lsocket

PKG_OPTIONS_VAR=	PKG_OPTIONS.mDNSResponder
PKG_SUPPORTED_OPTIONS=	inet6
PKG_SUGGESTED_OPTIONS=	inet6

.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Minet6)
MAKE_ENV+=	HAVE_IPV6=1
.endif

do-install:
	for i in ${BINARY}; do \
		${INSTALL_PROGRAM} ${BUILDDIR}/$$i ${DESTDIR}${PREFIX}/bin; \
	done
	for i in ${SBINARY}; do \
		${INSTALL_PROGRAM} ${BUILDDIR}/$$i ${DESTDIR}${PREFIX}/sbin; \
	done
	${INSTALL_PROGRAM} ${WRKSRC}/Clients/build/dns-sd ${DESTDIR}${PREFIX}/bin
	${INSTALL_MAN} ${WRKSRC}/mDNSShared/dns-sd.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
	${INSTALL_MAN} ${WRKSRC}/mDNSShared/dnsextd.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
	${INSTALL_MAN} ${WRKSRC}/mDNSShared/mDNSResponder.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/mdnsd.8
	${INSTALL_DATA} ${WRKSRC}/mDNSShared/dns_sd.h ${DESTDIR}${PREFIX}/include
	${INSTALL_LIB} ${BUILDDIR}/libdns_sd.${SO_SUFFIX} ${DESTDIR}${PREFIX}/lib

.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"