summaryrefslogtreecommitdiff
path: root/net/fehqlibs/Makefile
blob: d360cc735dc3c7ae442e0023445911a1c3881a37 (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
# $NetBSD: Makefile,v 1.19 2021/10/21 22:28:42 schmonz Exp $

DISTNAME=		fehQlibs-19
PKGNAME=		${DISTNAME:S/Qlibs-/qlibs-/}
CATEGORIES=		net
MASTER_SITES=		https://www.fehcom.de/ipnet/fehQlibs/
EXTRACT_SUFX=		.tgz

MAINTAINER=		schmonz@NetBSD.org
HOMEPAGE=		https://www.fehcom.de/ipnet/qlibs.html
COMMENT=		State-of-the-art C routines for Internet services
LICENSE=		public-domain

MAKE_JOBS_SAFE=		no

BUILD_TARGET=		libs shared

SUBST_CLASSES+=		echo
SUBST_STAGE.echo=	pre-configure
SUBST_FILES.echo=	configure install
SUBST_SED.echo=		-e 's|echo -n|${ECHO_N}|g'
SUBST_NOOP_OK.echo=	yes # ECHO_N may be "echo -n"

SUBST_CLASSES+=		etc
SUBST_STAGE.etc=	do-configure
SUBST_FILES.etc=	dnsstub/dns_rcrw.c
SUBST_SED.etc=		-e 's|/etc/dnsrewrite|${PKG_SYSCONFBASE}/dnsrewrite|g'

SUBST_CLASSES+=		ldflags
SUBST_STAGE.ldflags=	pre-configure
SUBST_FILES.ldflags=	Makefile
SUBST_SED.ldflags=	-e 's|\$$(MAKELIB) \$$(LDFLAGS) |$$(MAKELIB) |g'

BUILD_DEFS+=		PKG_SYSCONFBASE

post-extract:
	rm -f ${WRKSRC}/include/*.orig

do-configure:
	cd ${WRKSRC};								\
	${ECHO} "LIBDIR=${DESTDIR}${PREFIX}/lib/qlibs" >> ${WRKSRC}/conf-build;	\
	${ECHO} "HDRDIR=${DESTDIR}${PREFIX}/include/qlibs" >> ${WRKSRC}/conf-build; \
	${MAKE} check

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

post-build:
.if ${OPSYS} == Darwin
	cd ${WRKSRC} && for lib in *.so; do \
	  install_name_tool -id ${PREFIX}/lib/qlibs/$${lib} $${lib}; \
	done
.endif

.include "../../mk/bsd.pkg.mk"