2012-05-17 21:12:14 +02:00
|
|
|
# $FreeBSD$
|
1998-08-11 03:18:41 +02:00
|
|
|
|
1998-08-11 13:43:53 +02:00
|
|
|
.if exists(../Makefile.conf)
|
1998-08-11 03:18:41 +02:00
|
|
|
.include "../Makefile.conf"
|
|
|
|
.endif
|
2000-11-07 05:05:37 +01:00
|
|
|
.if exists(../Makefile.inc)
|
|
|
|
.include "../Makefile.inc"
|
|
|
|
.endif
|
1999-05-15 12:16:06 +02:00
|
|
|
.if exists(Makefile.inc)
|
|
|
|
.include "Makefile.inc"
|
1996-09-24 19:46:04 +02:00
|
|
|
.endif
|
|
|
|
|
2004-11-13 13:23:19 +01:00
|
|
|
FETCH_OPT?= -am
|
1999-09-19 11:39:23 +02:00
|
|
|
|
2004-09-25 13:59:58 +02:00
|
|
|
.if defined(PINDEX_OVERRIDE)
|
|
|
|
${INDEX}: ${PINDEX_OVERRIDE}
|
|
|
|
${CP} ${PINDEX_OVERRIDE} ${INDEX}
|
2004-11-13 13:23:19 +01:00
|
|
|
.elif defined(NOPORTSNET)
|
1999-04-08 23:50:03 +02:00
|
|
|
${INDEX}: $${PORTSBASE}/${PINDEX}
|
2001-10-29 11:14:33 +01:00
|
|
|
${CP} ${PORTSBASE}/${PINDEX} ${INDEX}
|
1999-04-08 23:50:03 +02:00
|
|
|
.else
|
2001-06-14 05:09:56 +02:00
|
|
|
${INDEX}:
|
2005-11-30 23:43:47 +01:00
|
|
|
${FETCH} ${FETCH_OPT} -o ${INDEX}.bz2 ${INDEXURI}.bz2
|
|
|
|
${BUNZIP2} ${INDEX}.bz2
|
1999-04-08 23:50:03 +02:00
|
|
|
.endif
|
1999-03-11 20:42:24 +01:00
|
|
|
|
2005-11-30 23:41:54 +01:00
|
|
|
HOSTNAME!= hostname
|
2013-04-07 04:55:16 +02:00
|
|
|
.if ${HOSTNAME} == "hub.freebsd.org" || ${HOSTNAME} == "freefall.freebsd.org" || ${HOSTNAME} == "www.freebsd.org" || ${HOSTNAME} == "build-web.stream.FreeBSD.org"
|
2005-11-30 23:41:54 +01:00
|
|
|
CLUSTER_MACHINE= YES
|
2001-04-22 19:44:25 +02:00
|
|
|
.endif
|
|
|
|
|
2005-11-30 23:41:54 +01:00
|
|
|
# Build the list of available packages, but only on the main FreeBSD machines.
|
|
|
|
# Don't build the list if NO_PACKAGES_LINK is set and not empty.
|
|
|
|
#
|
1999-04-08 23:50:03 +02:00
|
|
|
packages.exists:
|
2005-11-30 23:41:54 +01:00
|
|
|
.if defined(CLUSTER_MACHINE) && (!defined(NO_PACKAGES_LINK) || empty(NO_PACKAGES_LINK))
|
2001-10-29 11:14:33 +01:00
|
|
|
@if ${SH} ${.CURDIR}/packages > ${.TARGET}.temp; then \
|
|
|
|
${MV} ${.TARGET}.temp ${.TARGET}; \
|
1999-05-13 13:53:27 +02:00
|
|
|
else \
|
2001-10-29 11:14:33 +01:00
|
|
|
${RM} ${.TARGET}.temp; ${TOUCH} ${.TARGET}; \
|
1999-05-13 13:53:27 +02:00
|
|
|
fi;
|
1998-08-09 15:55:10 +02:00
|
|
|
.else
|
2001-10-29 11:14:33 +01:00
|
|
|
${TOUCH} ${.TARGET}
|
1998-08-09 15:55:10 +02:00
|
|
|
.endif
|
1998-06-10 17:52:30 +02:00
|
|
|
|
2012-10-01 11:53:01 +02:00
|
|
|
Makefile.gen: categories-alpha.xml categories-grouped.xml index.xml \
|
|
|
|
installing.xml master-index.xml references.xml searching.xml \
|
|
|
|
statistics.ent updating.xml .NOTMAIN
|
2012-10-01 13:56:00 +02:00
|
|
|
( ${ECHO_CMD} DOCS= *.xml | ${SED} 's|catalog-cwd\.xml||g';\
|
2006-08-19 23:20:54 +02:00
|
|
|
${ECHO_CMD} -n "DYNAMIC_DOCS= ";\
|
2012-10-01 11:53:01 +02:00
|
|
|
${ECHO_CMD} -n " categories-alpha.xml";\
|
|
|
|
${ECHO_CMD} -n " categories-grouped.xml";\
|
|
|
|
${ECHO_CMD} -n " master-index.xml";\
|
2006-08-19 23:20:54 +02:00
|
|
|
${ECHO_CMD} -n " statistics.ent";\
|
|
|
|
) > Makefile.gen
|
2005-12-15 02:02:28 +01:00
|
|
|
for categoryfile in ${CATEGORYLIST}; do \
|
2012-10-01 11:53:01 +02:00
|
|
|
${ECHO_CMD} -n " $$categoryfile.xml" >> Makefile.gen; \
|
2005-12-15 02:02:28 +01:00
|
|
|
done
|
|
|
|
${ECHO_CMD} >> Makefile.gen
|
1996-09-24 19:46:04 +02:00
|
|
|
|
2005-11-30 23:46:33 +01:00
|
|
|
.if defined(CLUSTER_MACHINE)
|
2005-11-15 11:09:26 +01:00
|
|
|
PORTS_TARGZ_URL?= ftp://ftp-master.FreeBSD.org/pub/FreeBSD/ports/ports/ports.tar.gz
|
2005-11-30 23:46:33 +01:00
|
|
|
.else
|
|
|
|
PORTS_TARGZ_URL?= ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/ports/ports.tar.gz
|
|
|
|
.endif
|
2005-11-15 11:09:26 +01:00
|
|
|
|
|
|
|
ports.size:
|
|
|
|
.if defined (NOPORTSNET)
|
|
|
|
touch ${.TARGET}
|
|
|
|
.else
|
|
|
|
${RM} -f ${.TARGET}
|
|
|
|
${FETCH} -s ${PORTS_TARGZ_URL} > ${.TARGET}
|
|
|
|
.endif
|
|
|
|
|
2012-10-01 11:53:01 +02:00
|
|
|
# this builds: categories-alpha.xml, categories-grouped.xml,
|
|
|
|
# master-index.xml, statistics.ent, <category>.xml
|
2005-12-15 02:02:28 +01:00
|
|
|
CATEGORYLIST=`grep "^[a-z]" categories | sed -e s"/,.*//"`
|
2012-10-01 11:53:01 +02:00
|
|
|
categories-alpha.xml: ${INDEX} categories categories.descriptions \
|
2005-12-15 02:02:28 +01:00
|
|
|
packages.exists portindex ports.ent ports.size .NOTMAIN
|
2012-10-01 11:53:01 +02:00
|
|
|
${RM} -f categories-alpha.xml categories-grouped.xml \
|
|
|
|
master-index.xml statistics.ent
|
2005-12-15 02:02:28 +01:00
|
|
|
for categoryfile in ${CATEGORYLIST}; do \
|
2012-10-01 11:53:01 +02:00
|
|
|
rm -f "$$categoryfile.xml"; \
|
2005-12-15 02:02:28 +01:00
|
|
|
done
|
2001-01-01 13:33:23 +01:00
|
|
|
${PORTINDEX} ${INDEX} ${.CURDIR}
|
1996-09-24 20:56:21 +02:00
|
|
|
|
2002-05-20 15:49:27 +02:00
|
|
|
install: all beforeinstall
|
1999-05-15 12:16:06 +02:00
|
|
|
|
|
|
|
all install clean:
|
2001-10-29 11:14:33 +01:00
|
|
|
cd ${.CURDIR}; \
|
|
|
|
${MAKE} ${MAKEFLAGS} -f ${.CURDIR}/Makefile.inc0 ${.TARGET}
|
2002-05-20 15:49:27 +02:00
|
|
|
.if defined(WITH_PORTS_GROWTH)
|
2007-10-27 22:41:37 +02:00
|
|
|
cd growth; \
|
|
|
|
${MAKE} ${MAKEFLAGS} ${.TARGET}
|
2002-05-20 15:49:27 +02:00
|
|
|
beforeinstall:
|
|
|
|
.else
|
|
|
|
beforeinstall:
|
2012-09-14 19:55:43 +02:00
|
|
|
${SED} -i "" -e 's,href="growth,href="http://www.FreeBSD.org/ports/growth,' index.html
|
|
|
|
${SED} -i "" -e 's,href="growth,href="http://www.FreeBSD.org/ports/growth,' references.html
|
2002-05-20 15:49:27 +02:00
|
|
|
.endif
|
1999-05-15 12:16:06 +02:00
|
|
|
|
2012-05-17 05:23:15 +02:00
|
|
|
.include "${DOC_PREFIX}/share/mk/web.site.mk"
|