version 1.69, 2012/05/28 09:38:04 |
version 1.87, 2021/11/06 19:09:10 |
|
|
# $OpenBSD$ |
# $OpenBSD$ |
# $FreeBSD: Makefile,v 1.36 1997/10/04 15:54:31 jkh Exp $ |
|
# |
|
|
|
|
.if !defined(BSD_OWN_MK) |
|
. include <bsd.own.mk> |
|
.endif |
|
|
PKGPATH = |
PKGPATH = |
MIRROR_MK ?= ${.CURDIR}/distfiles/Makefile |
|
DISTFILES_DB ?= ${.CURDIR}/infrastructure/db/locate.database |
DISTFILES_DB ?= ${.CURDIR}/infrastructure/db/locate.database |
|
INDEX = ${LOCALBASE}/share/ports-INDEX |
|
|
.if defined(SUBDIR) |
.if defined(SUBDIR) |
# nothing to do |
# nothing to do |
.elif defined(key) || defined(name) || defined(category) || defined(author) |
.elif !make(search) && (defined(key) || defined(name) || defined(category) || defined(author)) |
|
|
# set up subdirs from the index, assume it's up-to-date |
# set up subdirs from the index, assume it's up-to-date |
_CMD = perl ${.CURDIR}/infrastructure/bin/retrieve-index index='${.CURDIR}/INDEX' |
_CMD = perl ${.CURDIR}/infrastructure/bin/port-search-helper index='${INDEX}' |
. if defined(key) |
. if defined(key) |
_CMD += key='${key}' |
_CMD += key='${key}' |
. endif |
. endif |
|
|
SUBDIR += multimedia |
SUBDIR += multimedia |
SUBDIR += net |
SUBDIR += net |
SUBDIR += news |
SUBDIR += news |
SUBDIR += palm |
|
SUBDIR += plan9 |
SUBDIR += plan9 |
SUBDIR += print |
SUBDIR += print |
SUBDIR += productivity |
SUBDIR += productivity |
SUBDIR += russian |
|
SUBDIR += security |
SUBDIR += security |
SUBDIR += shells |
SUBDIR += shells |
SUBDIR += sysutils |
SUBDIR += sysutils |
SUBDIR += telephony |
SUBDIR += telephony |
SUBDIR += textproc |
SUBDIR += textproc |
|
SUBDIR += wayland |
SUBDIR += www |
SUBDIR += www |
SUBDIR += x11 |
SUBDIR += x11 |
.endif |
.endif |
|
|
.include <bsd.port.subdir.mk> |
.include <bsd.port.subdir.mk> |
|
|
index: |
${INDEX}: |
@rm -f ${.CURDIR}/INDEX |
@if pkg_info -q -e 'portslist-<6.10'; then \ |
@${_MAKE} ${.CURDIR}/INDEX |
echo "Old portslist found"; \ |
|
echo "Don't mix -current and 6.4"; \ |
|
fi |
|
@echo "Please install portslist" |
|
@echo "${SUDO} pkg_add portslist" |
|
@exit 1 |
|
|
${.CURDIR}/INDEX: |
|
@echo "Generating INDEX..." |
|
@${_MAKE} describe MACHINE_ARCH=i386 ECHO_MSG="echo 1>&2" > ${.CURDIR}/INDEX |
|
@echo "Done." |
|
|
|
print-index: ${.CURDIR}/INDEX |
print-index: ${INDEX} |
@awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10); }' < ${.CURDIR}/INDEX |
@awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10); }' < ${INDEX} |
|
|
print-licenses: ${.CURDIR}/INDEX |
print-licenses: ${INDEX} |
@printf "Port PC PF DC DF Maint\n" |
@printf "Port PC PF DC DF Maint\n" |
@awk -F\| '{printf("%-40.39s%-3.2s%-3.2s%-3.2s%-3.2s%-25.25s\n",$$2,$$12,$$13,$$14,$$15,$$6);}' < ${.CURDIR}/INDEX |
@awk -F\| '{printf("%-40.39s%-3.2s%-3.2s%-3.2s%-3.2s%-25.25s\n",$$2,$$12,$$13,$$14,$$15,$$6);}' < ${INDEX} |
|
|
search: ${.CURDIR}/INDEX |
search: ${INDEX} |
.if !defined(key) && !defined(name) |
.if !defined(key) && !defined(name) |
@echo "The search target requires a keyword or name parameter," |
@echo "The search target requires a keyword or name parameter," |
@echo "e.g.: \"make search key=somekeyword\" \"make search name=somename\"" |
@echo "e.g.: \"make search key=somekeyword\" \"make search name=somename\"" |
.else |
.else |
. if defined(key) |
. if defined(key) |
@egrep -i -- "${key}" ${.CURDIR}/INDEX | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\nArchs:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10, $$11); }' |
@egrep -i -- "${key}" ${INDEX} | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\nArchs:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10, $$11); }' |
. else |
. else |
@awk -F\| '$$1 ~ /${name}/ { printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\nArchs:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10, $$11); }' ${.CURDIR}/INDEX |
@awk -F\| '$$1 ~ /${name}/ { printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\nArchs:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10, $$11); }' ${INDEX} |
. endif |
. endif |
.endif |
.endif |
|
|
homepages.html: |
fix-permissions: |
@echo '<html><ul>' >$@ |
@{ echo "DUMMY_PACKAGE=Yes"; \ |
@${_MAKE} homepage-links ECHO_MSG='echo >&2' >>$@ |
echo ".include <bsd.port.mk>"; }|${MAKE} -f - fix-permissions |
@echo '</ul></html>' >>$@ |
|
|
|
distfiles-update-locatedb: |
distfiles-update-locatedb: |
@PORTSDIR=${.CURDIR} /bin/sh ${.CURDIR}/infrastructure/fetch/distfiles-update-locatedb ${DISTFILES_DB} |
@PORTSDIR=${.CURDIR} /bin/sh ${.CURDIR}/infrastructure/fetch/distfiles-update-locatedb ${DISTFILES_DB} |
|
|
pkglocatedb: |
create_DEPENDS_CACHE: |
@pkg_mklocatedb -a -d ${.CURDIR}/packages/${MACHINE_ARCH}/all/ \ |
@${_mk_DEPENDS_CACHE}; echo $${_DEPENDS_CACHE} |
>${.CURDIR}/packages/${MACHINE_ARCH}/ftp/pkglocatedb |
|
|
|
|
destroy_DEPENDS_CACHE: |
|
@${_PBUILD} rm -rf 2>/dev/null $${_DEPENDS_CACHE} |
|
|
|
|
.PHONY: index search distfiles-update-locatedb \ |
.PHONY: index search distfiles-update-locatedb \ |
pkglocatedb print-licenses print-index |
print-licenses print-index fix-permissions \ |
|
create_DEPENDS_CACHE destroy_DEPENDS_CACHE |