aboutsummaryrefslogtreecommitdiff
path: root/net/openmdns/Makefile
blob: 95dd599faef252c0bf4bf1cbf02fbdb4ee30ed12 (plain) (blame)
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
PORTNAME=	openmdns
DISTVERSION=	0.7
PORTREVISION=	3
CATEGORIES=	net

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Multicast DNS and Service Discovery daemon

LICENSE=	ISCL

USE_GITHUB=	yes
GH_ACCOUNT=	haesbaert
GH_PROJECT=	mdnsd

CONFLICTS_INSTALL=	mDNSResponder # sbin/mdnsd

USES=		localbase uidfix
USE_RC_SUBR=	mdnsd
MAKE_ENV=	LDADD="${LIBS}"
MAKE_ARGS=	BINDIR="${PREFIX}/sbin" \
		MANDIR="${PREFIX}/share/man/man"
CFLAGS+=	-D__dead=__dead2
LDFLAGS+=	-Wl,--as-needed # -lutil
LIBS+=		-lopenbsd
SUB_LIST=	COMMENT="${COMMENT}"
PLIST_FILES=	sbin/mdnsctl \
		sbin/mdnsd \
		share/man/man8/mdnsctl.8.gz \
		share/man/man8/mdnsd.8.gz
PORTDOCS=	*

USERS=		_mdnsd
GROUPS=		_mdnsd

OPTIONS_DEFINE=	DOCS STATIC

STATIC_BUILD_DEPENDS=	${LOCALBASE}/lib/libevent.a:devel/libevent \
			${LOCALBASE}/lib/libopenbsd.a:devel/libopenbsd
STATIC_MAKE_ENV=	NO_SHARED=1
STATIC_LIB_DEPENDS_OFF=	libevent.so:devel/libevent \
			libopenbsd.so:devel/libopenbsd

post-patch:
# warning: duplicate script for target "maninstall" ignored
	@${REINPLACE_CMD} '/bsd\.man\.mk/d' ${WRKSRC}/*/Makefile

post-install-DOCS-on:
	(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>