Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
[dragonfly.git] / etc / Makefile.usr
CommitLineData
809ae383
MD
1# Makefile.pkgsrc - installed as /usr/pkgsrc/Makefile
2#
3# Provides simple targets to download and maintain /usr/pkgsrc.
4#
919067aa 5# $DragonFly: src/etc/Makefile.usr,v 1.8 2008/09/03 10:38:55 hasso Exp $
809ae383 6
f0f0aece
SS
7CVSROOT_PKGSRC?= anoncvs@anoncvs.NetBSD.org:/cvsroot
8CVSROOT_PKGSRC_WIP?= anoncvs@anoncvs.NetBSD.se:/cvsroot
9GIT_DRAGONFLY?= git://chlamydia.fs.ei.tum.de/dragonfly.git
10GIT_BRANCH?= master
1c864d80 11
e2dbfa0b
TN
12help all:
13 @echo "Extract /usr/pkgsrc from pkgsrc-all.tgz"
14 @echo " make release-pkgsrc-extract"
15 @echo "Or, install or update /usr/pkgsrc using NetBSDs anoncvs"
809ae383
MD
16 @echo " make pkgsrc-checkout"
17 @echo " make pkgsrc-update"
18 @echo ""
aee3a86e 19 @echo "These targets download/update the DragonFly git repository into"
e2dbfa0b 20 @echo "/usr/src"
aee3a86e
MS
21 @echo " make git-clone"
22 @echo " make git-update"
809ae383 23 @echo ""
f03b7956
MS
24 @echo "Install or update /usr/pkgsrc/wip using NetBSD.se anoncvs"
25 @echo " make pkgsrc-wip-checkout"
26 @echo " make pkgsrc-wip-update"
27 @echo ""
e2dbfa0b 28 @echo "Extract kernel sources from src-sys.tgz in this directory"
809ae383 29 @echo " make release-sys-extract"
e2dbfa0b
TN
30 @echo "Extract full DragonFly sources from src-all.tgz in this directory"
31 @echo " make release-src-extract"
809ae383
MD
32 @echo ""
33 @echo "If automating please restrict updates from the NetBSD anoncvs"
aee3a86e 34 @echo "server to no more than once a week and run gits no more often"
0e87bc32 35 @echo "than daily."
809ae383
MD
36
37pkgsrc-checkout:
38 cd ${.CURDIR}; \
1c864d80 39 cvs -d ${CVSROOT_PKGSRC} checkout -P pkgsrc
809ae383
MD
40
41pkgsrc-update:
42 cd ${.CURDIR}; \
f5e4c0dd 43 cvs -d ${CVSROOT_PKGSRC} -q update -Pd pkgsrc
809ae383 44
f03b7956
MS
45pkgsrc-wip-checkout:
46 cd ${.CURDIR}; \
47 mkdir -p pkgsrc/wip; \
48 cd pkgsrc; \
1c864d80 49 cvs -d ${CVSROOT_PKGSRC_WIP} checkout -P wip
f03b7956
MS
50
51pkgsrc-wip-update:
52 cd ${.CURDIR}/pkgsrc; \
f5e4c0dd 53 cvs -d ${CVSROOT_PKGSRC_WIP} -q update -Pd wip
f03b7956 54
e2dbfa0b
TN
55release-pkgsrc-extract:
56 cd ${.CURDIR}; \
57 mkdir -p pkgsrc; \
58 cd pkgsrc; \
bcd79f29 59 tar xvpzf ${.CURDIR}/pkgsrc-all.tgz
e2dbfa0b
TN
60
61release-src-extract:
62 cd ${.CURDIR}; \
63 tar xvpzf src-all.tgz
64
809ae383 65release-sys-extract:
e2dbfa0b
TN
66 cd ${.CURDIR}; \
67 tar xvpzf src-sys.tgz
809ae383 68
aee3a86e 69git-clone:
f0f0aece 70 @if [ -z "`which git`" ]; then \
aee3a86e
MS
71 echo "Please install devel/scmgit from pkgsrc"; \
72 exit 1; \
f0f0aece
SS
73 fi
74 git clone -n ${GIT_DRAGONFLY} ${.CURDIR}/src
75 if [ "${GIT_BRANCH}" != master ]; then \
76 git --git-dir=${.CURDIR}/src/.git branch --track -l -f ${GIT_BRANCH} origin/${GIT_BRANCH}; \
77 fi
78 cd ${.CURDIR}/src && git checkout ${GIT_BRANCH}
809ae383 79
aee3a86e 80git-update:
f0f0aece 81 @if [ -z "`which git`" ]; then \
aee3a86e
MS
82 echo "Please install devel/scmgit from pkgsrc"; \
83 exit 1; \
f0f0aece
SS
84 fi
85 cd ${.CURDIR}/src && git pull