[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / ham / predict

File: [cvs.NetBSD.org] / pkgsrc / ham / predict / Makefile (download)

Revision 1.4, Sun May 5 21:44:58 2019 UTC (4 months, 2 weeks ago) by wiedi
Branch: MAIN
CVS Tags: pkgsrc-2019Q2-base, pkgsrc-2019Q2, HEAD
Changes since 1.3: +3 -1 lines

predict: fix build on SunOS

# $NetBSD: Makefile,v 1.4 2019/05/05 21:44:58 wiedi Exp $
#

DISTNAME=	predict-2.2.3
CATEGORIES=	ham
MASTER_SITES=	http://www.qsl.net/kd2bd/

MAINTAINER=	dbj@NetBSD.org
HOMEPAGE=	http://www.qsl.net/kd2bd/predict.html
COMMENT= 	PREDICT - curses satellite tracking/orbital prediction program

LICENSE=	gnu-gpl-v2

FAKE_NCURSES=	yes
USE_LANGUAGES=	c

LDFLAGS.SunOS+=	-lsocket -lnsl

do-configure:
	printf "const char predictpath[] = \"${PREFIX}/share/predict/\";\n" > "${WRKSRC}/predict.h"
	printf "const int soundcard = 1;\n" >> "${WRKSRC}/predict.h"
	printf "const char version[] = \"$$(cat "${WRKSRC}/.version")\";\n" >> "${WRKSRC}/predict.h"

do-build:
	cd ${WRKSRC} && ${CC} ${CFLAGS} ${LDFLAGS} predict.c -o predict -lm -lncurses -lpthread
	${SED} -e 's|@PREFIX@|${PREFIX}|g' ${FILESDIR}/vocalizer.sh > ${WRKSRC}/vocalizer/vocalizer.sh

INSTALLATION_DIRS+= bin ${PKGMANDIR}/man1 share/predict/default share/predict/vocalizer

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/predict ${DESTDIR}${PREFIX}/bin/
	${INSTALL_SCRIPT} ${WRKSRC}/vocalizer/vocalizer.sh ${DESTDIR}${PREFIX}/share/predict/vocalizer/vocalizer
	${INSTALL_MAN} ${WRKSRC}/docs/man/predict.man ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/predict.1
	${INSTALL_DATA} ${WRKSRC}/vocalizer/*.wav ${DESTDIR}${PREFIX}/share/predict/vocalizer/
	${INSTALL_DATA} ${WRKSRC}/default/predict.* ${DESTDIR}${PREFIX}/share/predict/default/

# Run time only dependency on the play utility
DEPENDS+=	sox-[0-9]*:../../audio/sox

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