1994-08-30 08:55:07 -04:00
|
|
|
# New ports collection makefile for: dgd
|
|
|
|
# Version required: 1.0.8
|
|
|
|
# Date created: 23 August 1994
|
|
|
|
# Whom: adam
|
|
|
|
#
|
|
|
|
|
1995-03-10 13:52:49 -05:00
|
|
|
DISTNAME= dgd-1.0.9
|
1994-10-19 11:30:07 -04:00
|
|
|
DISTFILES= ${DISTNAME}.tar.gz
|
|
|
|
|
1995-03-27 21:16:21 -05:00
|
|
|
# changed from PATCHFILES so it won't confuse bsd.port.mk
|
|
|
|
PATCH_FILES= 1.0.9-1.0.9.1.gz
|
1995-02-12 12:41:28 -05:00
|
|
|
.if defined(MASTER_SITE_OVERRIDE)
|
|
|
|
PATCHSITE:= ${MASTER_SITE_OVERRIDE}
|
|
|
|
.else
|
|
|
|
PATCHSITE= epsilon.me.chalmers.se:
|
1995-03-10 13:52:49 -05:00
|
|
|
NCFTPFLAGS= -P -V2
|
1995-02-12 12:41:28 -05:00
|
|
|
.endif
|
1994-11-23 07:27:39 -05:00
|
|
|
_PATCH_COOKIE= ${.CURDIR}/work/._patch_done
|
1994-08-30 08:55:07 -04:00
|
|
|
PATCHLIST= ${.CURDIR}/work/.patchlist
|
|
|
|
PATCHLEVEL= `tail -1 ${PATCHLIST} | sed 's/^.*\.\(.*\)\.gz$$/\1/'`
|
|
|
|
WRKSRC= ${WRKDIR}/dgd/src
|
|
|
|
|
1994-09-13 21:42:47 -04:00
|
|
|
pre-fetch:
|
|
|
|
@if [ ! -d ${DISTDIR}/${DISTNAME} ]; then mkdir -p ${DISTDIR}/${DISTNAME}; fi
|
1994-09-13 22:27:28 -04:00
|
|
|
@if [ ! -f ${DISTDIR}/${DISTNAME}.tar.gz ]; then \
|
|
|
|
echo ">> Fetching distribution file from remote site..."; \
|
1995-02-12 12:41:28 -05:00
|
|
|
${NCFTP} ${NCFTPFLAGS} ${PATCHSITE}${DISTNAME}.tar.gz \
|
1994-09-13 22:27:28 -04:00
|
|
|
&& mv ${DISTNAME}.tar.gz ${DISTDIR}; \
|
1994-09-13 21:42:47 -04:00
|
|
|
fi
|
1995-02-12 12:41:28 -05:00
|
|
|
.if defined(MASTER_SITE_OVERRIDE)
|
1995-03-27 21:16:21 -05:00
|
|
|
@for file in ${PATCH_FILES}; do \
|
1994-09-13 21:42:47 -04:00
|
|
|
if [ ! -f ${DISTDIR}/${DISTNAME}/$$file ]; then \
|
1994-09-13 22:27:28 -04:00
|
|
|
echo ">> Fetching patch $$file from remote site..."; \
|
1995-02-12 12:41:28 -05:00
|
|
|
${NCFTP} ${NCFTPFLAGS} ${PATCHSITE}${DISTNAME}/$$file \
|
|
|
|
&& mv $$file ${DISTDIR}/${DISTNAME}; \
|
|
|
|
fi \
|
|
|
|
done
|
|
|
|
.else
|
1995-03-27 21:16:21 -05:00
|
|
|
@for file in ${PATCH_FILES}; do \
|
1995-02-12 12:41:28 -05:00
|
|
|
if [ ! -f ${DISTDIR}/${DISTNAME}/$$file ]; then \
|
|
|
|
echo ">> Fetching patch $$file from remote site..."; \
|
|
|
|
${NCFTP} ${NCFTPFLAGS} ${PATCHSITE}patches/$$file \
|
1994-09-13 22:27:28 -04:00
|
|
|
&& mv patches/$$file ${DISTDIR}/${DISTNAME}; \
|
1994-09-13 21:42:47 -04:00
|
|
|
fi \
|
|
|
|
done
|
1995-02-12 12:41:28 -05:00
|
|
|
.endif
|
1994-09-13 21:42:47 -04:00
|
|
|
|
1994-09-13 22:27:28 -04:00
|
|
|
# Need to determine whether all author-supplied patches are correctly applied
|
1994-08-30 08:55:07 -04:00
|
|
|
### not yet implemented
|
|
|
|
|
1994-11-23 07:27:39 -05:00
|
|
|
pre-patch: extract ${_PATCH_COOKIE}
|
1994-08-30 08:55:07 -04:00
|
|
|
@find -X ${WRKDIR}/dgd -name '*.orig' -print | xargs rm -f
|
|
|
|
|
|
|
|
${PATCHLIST}:
|
1994-09-13 21:42:47 -04:00
|
|
|
@cd ${DISTDIR}/${DISTNAME}; \
|
|
|
|
ls *.[0-9].gz *.[0-9][0-9].gz \
|
1994-08-30 08:55:07 -04:00
|
|
|
2>/dev/null >${PATCHLIST}
|
|
|
|
|
1994-11-23 07:27:39 -05:00
|
|
|
${_PATCH_COOKIE}: ${PATCHLIST}
|
1994-08-30 08:55:07 -04:00
|
|
|
@if [ -s ${PATCHLIST} ]; then \
|
|
|
|
echo "===> Updating to ${DISTNAME}.${PATCHLEVEL}"; \
|
1994-09-13 21:42:47 -04:00
|
|
|
cd ${DISTDIR}/${DISTNAME}; \
|
1994-08-30 08:55:07 -04:00
|
|
|
gzcat `cat ${PATCHLIST}` | patch -d ${WRKDIR} --quiet -E -p0; \
|
|
|
|
fi
|
1994-11-23 22:07:55 -05:00
|
|
|
@touch -f ${_PATCH_COOKIE};
|
1994-08-30 08:55:07 -04:00
|
|
|
|
1994-08-30 13:25:25 -04:00
|
|
|
install: all
|
|
|
|
@chown -R mud.mud ${WRKDIR}/dgd
|
|
|
|
@tar -C ${WRKDIR} -cf - `grep '^dgd/' pkg/PLIST` \
|
|
|
|
| tar -C /usr/local -xpf -
|
|
|
|
|
1994-08-30 08:55:07 -04:00
|
|
|
.include <bsd.port.mk>
|