2013-01-17 16:28:14 -05:00
# $OpenBSD: Makefile,v 1.20 2013/01/17 21:28:14 rpe Exp $
2012-05-08 06:58:45 -04:00
# NOTE for FLAVOR=src
# - you can have up-to-date ${BSDSRCDIR}/distrib/sets/lists
# and ${XSRCDIR}/distrrib/sets/lists prior to building
# - or you can fetch them on the fly through anoncvs
# you need to set PKGLOCATEDB_WANTANONCVS=Yes in /etc/mk.conf
# and you may possibly want to set PKG_LOCATEDB_CVSROOT
# The port *will go interactive* the first time around, until you
# have the correct key in your ssh config !
#
# The port *will fail if the installation is not more or less uptodate wrt to
# the set lists...
2010-01-08 09:00:49 -05:00
COMMENT = database of packages for use with locate( 1)
2012-04-23 13:15:17 -04:00
# locate data is NOT MI, unfortunately
# PKG_ARCH = ${ARCH}....
2012-10-10 05:49:20 -04:00
DISTNAME = pkglocatedb-0.6
2013-01-17 16:28:14 -05:00
REVISION = 0
2010-01-08 09:00:49 -05:00
DISTFILES =
CATEGORIES = databases
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM = Yes
PERMIT_DISTFILES_FTP = Yes
2012-06-18 08:18:45 -04:00
BUILD_DEPENDS = databases/sqlports,-compact>= 2.3
2012-04-29 04:51:35 -04:00
FLAVORS = src
FLAVOR ?=
ARGS = -a -p ${ PORTSDIR }
.if ${FLAVOR : Msrc }
2012-05-08 06:58:45 -04:00
ARGS += -C -s ${ BSDSRCDIR } -x ${ XSRCDIR }
. i n c l u d e < b s d . o w n . m k >
PKGLOCATEDB_WANTANONCVS ?= No
. if ${PKGLOCATEDB_WANTANONCVS : L } == "yes "
PKGLOCATEDB_CVSROOT ?= anoncvs@anoncvs1.ca.openbsd.org:/cvs
BSDSRCDIR = ${ WRKDIR } /src
XSRCDIR = ${ WRKDIR } /xenocara
post-extract :
cd ${ WRKDIR } && cvs -d ${ PKGLOCATEDB_CVSROOT } co src/distrib/sets/lists
cd ${ WRKDIR } && cvs -d ${ PKGLOCATEDB_CVSROOT } co xenocara/distrib/sets/lists
. e l s e
2012-05-08 05:21:45 -04:00
BSDSRCDIR ?= /usr/src
2012-04-29 04:51:35 -04:00
XSRCDIR ?= /usr/xenocara
post-extract :
2012-05-08 05:21:45 -04:00
if ! test -d ${ BSDSRCDIR } /distrib/sets/lists; then \
2012-04-29 04:51:35 -04:00
echo 1>& 2 "set SRCDIR to a valid src dir" ; \
exit 1; \
fi
if ! test -d ${ XSRCDIR } /distrib/sets/lists; then \
echo 1>& 2 "set XSRCDIR to a valid xenocara dir" ; \
exit 1; \
fi
2012-05-08 06:58:45 -04:00
. e n d i f
2012-04-29 04:51:35 -04:00
. e n d i f
2011-09-10 06:43:06 -04:00
do-build :
2011-09-24 03:37:34 -04:00
@if test -s ${ WRKBUILD } /ouch; then \
cat ${ WRKBUILD } /ouch; \
exit 1; \
fi
2010-01-08 09:00:49 -05:00
do-install :
${ INSTALL_DATA } ${ WRKBUILD } /pkglocatedb ${ PREFIX } /share
2013-01-17 16:28:14 -05:00
${ INSTALL_MAN } ${ FILESDIR } /pkg_locate.1 ${ PREFIX } /man/man1
2011-09-11 12:12:34 -04:00
${ SUBST_CMD } -o root -g bin -c ${ FILESDIR } /pkglocate ${ PREFIX } /bin/pkg_locate
chmod ${ BINMODE } ${ PREFIX } /bin/pkg_locate
ln -s ${ TRUEPREFIX } /bin/pkg_locate ${ PREFIX } /bin/pkglocate
2010-01-08 09:00:49 -05:00
NO_REGRESS = Yes
. i n c l u d e < b s d . p o r t . m k >
2011-09-10 06:43:06 -04:00
# XXX cheat a bit to avoid having two makefiles
do-build : ${WRKBUILD }/pkglocatedb
${WRKBUILD}/subdirlist :
2012-06-18 08:18:45 -04:00
sqlite3 ${ LOCALBASE } /share/sqlports-compact 'select min(paths.fullpkgpath) from paths join ports on paths.id=ports.fullpkgpath where ports.static_plist=1 group by fullpkgname order by paths.fullpkgpath' >$@
2011-09-10 06:43:06 -04:00
${WRKBUILD}/pkglocatedb : ${WRKBUILD }/subdirlist
2012-05-18 08:12:09 -04:00
SUBDIRLIST = ${ WRKBUILD } /subdirlist REPORT_PROBLEM_LOGFILE = ${ WRKBUILD } /ouch ${ SUDO } pkg_mklocatedb ${ ARGS } > $@ .tmp && mv $@ .tmp $@