summaryrefslogtreecommitdiff
path: root/regress/usr.sbin/pkg_add/Makefile
blob: c2c5bea8fa00803dd642970d96f9240622cb13a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# $OpenBSD: Makefile,v 1.3 2006/08/18 13:14:34 espie Exp $

REGRESS_TARGETS=pkgnames depends-check

pkgnames:
	perl ${.CURDIR}/check-name

depends-check: old/a-0.0.tgz old/b-0.0.tgz new/a-1.0.tgz new/b-1.0.tgz
	-rm -rf ${.OBJDIR}/depends
	-mkdir -p ${.OBJDIR}/depends/pkgdb
	PKG_DBDIR=${.OBJDIR}/depends/pkgdb pkg_add -F nonroot -B${.OBJDIR}/depends old/a-0.0.tgz old/b-0.0.tgz
	PKG_DBDIR=${.OBJDIR}/depends/pkgdb PKG_PATH=${.OBJDIR}/new pkg_add -F nonroot -B${.OBJDIR}/depends -u a b
	PKG_DBDIR=${.OBJDIR}/depends/pkgdb PKG_PATH=${.OBJDIR}/old pkg_add -F nonroot -B${.OBJDIR}/depends -u a b

old/a-0.0.tgz:
	-mkdir -p ${@D}
	pkg_create -p /usr/local -A \* \
	    -DFULLPKGPATH=test/a \
	    -DPERMIT_PACKAGE_FTP=Yes \
	    -DPERMIT_PACKAGE_CDROM=Yes \
	    -P'test/b:b-*:b-0.0' \
	    -c '-comment' -d '-descr' -f ${.CURDIR}/empty $@

new/a-1.0.tgz:
	-mkdir -p ${@D}
	pkg_create -p /usr/local -A \* \
	    -DFULLPKGPATH=test/a \
	    -DPERMIT_PACKAGE_FTP=Yes \
	    -DPERMIT_PACKAGE_CDROM=Yes \
	    -c '-comment' -d '-descr' -f ${.CURDIR}/empty $@

old/b-0.0.tgz:
	-mkdir -p ${@D}
	pkg_create -p /usr/local -A \* \
	    -DFULLPKGPATH=test/a \
	    -DPERMIT_PACKAGE_FTP=Yes \
	    -DPERMIT_PACKAGE_CDROM=Yes \
	    -c '-comment' -d '-descr' -f ${.CURDIR}/empty $@

new/b-1.0.tgz:
	-mkdir -p ${@D}
	pkg_create -p /usr/local -A \* \
	    -DFULLPKGPATH=test/a \
	    -DPERMIT_PACKAGE_FTP=Yes \
	    -DPERMIT_PACKAGE_CDROM=Yes \
	    -P'test/a:a-*:a-1.0' \
	    -c '-comment' -d '-descr' -f ${.CURDIR}/empty $@

.PHONY: pkgnames depends-check

CLEANFILES+=old/*.tgz new/*.tgz depends/*/*/*

.include <bsd.regress.mk>