nrelease - Redo /usr/Makefile to use only git repos.
[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
e2dbfa0b 7help all:
4922fbd1
MD
8 @echo "HELP:"
9 @echo ""
10.if exists(${.CURDIR}/pkgsrc/.git)
11.if exists(${.CURDIR}/pkgsrc/Makefile)
12 @echo " make pkgsrc-update - update your pkgsrc repo from the net"
13.else
14 @echo " make pkgsrc-checkout - initial checkout of your pre-packaged"
15 @echo " pkgsrc repo."
16 @echo " make pkgsrc-update - update your pkgsrc repo from the net"
17 @echo " after the initial checkout."
18.endif
19.else
20 @echo " make pkgsrc-create - fetch initial pkgsrc repo from the net"
21 @echo " make pkgsrc-update - update your pkgsrc repo from the net"
22.endif
809ae383 23 @echo ""
4922fbd1
MD
24.if exists(${.CURDIR}/src/.git)
25.if exists(${.CURDIR}/src/Makefile)
26 @echo " make src-update - update your src repo from the net"
27.else
28 @echo " make src-checkout - initial checkout of your pre-packaged src repo"
29 @echo " make src-update - update your src repo from the net"
30 @echo " after the initial checkout."
31.endif
32.else
33 @echo " make src-create - fetch initial src repo from the net"
34 @echo " make src-update - update your src repo from the net"
35.endif
809ae383 36 @echo ""
4922fbd1
MD
37.if exists(${.CURDIR}/src-sys.tgz)
38 @echo " make release-sys-extract - extract the pre-packaged sys-only sources"
39.endif
f03b7956 40 @echo ""
4922fbd1
MD
41 @echo "If automating please feel free to run git pull's from cron."
42 @echo "We prefer once a day but you can run them more often if you"
43 @echo "desire."
809ae383 44 @echo ""
4922fbd1
MD
45 @echo "If you have a repo previously maintained via CVS you should"
46 @echo "rm -rf it (save any local modifications) and then use the"
47 @echo "make src-create and/or make pkgsrc-create to set up the initial"
48 @echo "git repo."
49
50pkgsrc-create:
51 @echo "If problems occur you may have to rm -rf pkgsrc and try again."
52 @echo ""
53 mkdir -p ${.CURDIR}/pkgsrc
54 cd ${.CURDIR}/pkgsrc && git init
55 cd ${.CURDIR}/pkgsrc && \
56 git remote add origin git://git.dragonflybsd.org/pkgsrc.git
57 cd ${.CURDIR}/pkgsrc && git fetch origin
58 cd ${.CURDIR}/pkgsrc && git branch vendor origin/vendor
59 cd ${.CURDIR}/pkgsrc && git checkout vendor
60 cd ${.CURDIR}/pkgsrc && git pull
809ae383
MD
61
62pkgsrc-checkout:
4922fbd1 63 cd ${.CURDIR}/pkgsrc && git checkout vendor
809ae383
MD
64
65pkgsrc-update:
4922fbd1 66 cd ${.CURDIR}/pkgsrc && git pull
f03b7956 67
4922fbd1
MD
68src-create:
69 @echo "If problems occur you may have to rm -rf src and try again."
70 @echo ""
71 mkdir -p ${.CURDIR}/src
72 cd ${.CURDIR}/src && git init
73 cd ${.CURDIR}/src && \
74 git remote add origin git://git.dragonflybsd.org/dragonfly.git
75 cd ${.CURDIR}/src && git fetch origin
76 cd ${.CURDIR}/src && git branch master origin/master
77 cd ${.CURDIR}/src && git checkout master
78 cd ${.CURDIR}/src && git pull
f03b7956 79
4922fbd1
MD
80src-checkout:
81 cd ${.CURDIR}/src && git checkout master
e2dbfa0b 82
4922fbd1
MD
83src-update:
84 cd ${.CURDIR}/src && git pull
e2dbfa0b 85
809ae383 86release-sys-extract:
4922fbd1 87 cd ${.CURDIR} && tar xvpzf src-sys.tgz
809ae383 88