Allow users to use the pkglocatedb target if they have
PACKAGE_REPOSITORY set to a non standard location.  I expected this
behavior, not sure if it's useful in the the general case.

Regards,
Mark

Index: Makefile
===================================================================
RCS file: /cvs/obsd/ports/Makefile,v
retrieving revision 1.54
diff -u -p -r1.54 Makefile
--- Makefile    27 Nov 2006 15:38:01 -0000      1.54
+++ Makefile    6 Apr 2007 04:58:06 -0000
@@ -126,8 +126,13 @@ distfiles-update-locatedb:
        @PORTSDIR=${.CURDIR} /bin/sh 
${.CURDIR}/infrastructure/fetch/distfiles-update-locatedb ${DISTFILES_DB}
 
 pkglocatedb:
+.if defined(PACKAGE_REPOSITORY)
+       @pkg_mklocatedb ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/* \
+           >${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/ftp/pkglocatedb
+.else
        @pkg_mklocatedb ${.CURDIR}/packages/${MACHINE_ARCH}/all/* \
            >${.CURDIR}/packages/${MACHINE_ARCH}/ftp/pkglocatedb
+.endif
 
 .PHONY: mirror-maker index search distfiles-update-locatedb \
        pkglocatedb print-licenses print-index

Reply via email to