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