1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-06 22:51:41 +00:00
freebsd-ports/net/dgd/Makefile
Satoshi Asami 62cb097520 Tryed to update to use latest PATCHFILES hack in bsd.port.mk but I
can't get it to work because the patch is on a non-anon ftp site
and it needs its own ncftprc file.  Hmm....

Changed PATCHFILES -> PATCH_FILES so it works for now.
1995-03-28 02:16:21 +00:00

73 lines
2.1 KiB
Makefile

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