1 # Makefile.usr - installed as /usr/Makefile
3 # Provides simple targets to download and maintain /usr/src, /usr/pkgsrc etc.
5 GITHOST?=git.dragonflybsd.org
10 .if exists(${.CURDIR}/pkgsrc/.git)
11 .if exists(${.CURDIR}/pkgsrc/Makefile)
12 @echo " make pkgsrc-update - update your pkgsrc repo from the net"
14 @echo " make pkgsrc-checkout - initial checkout of your pre-packaged"
16 @echo " make pkgsrc-update - update your pkgsrc repo from the net"
17 @echo " after the initial checkout."
20 @echo " make pkgsrc-create - fetch initial pkgsrc repo from the net"
21 @echo " make pkgsrc-create-shallow - fetch initial history-free pkgsrc repo"
22 @echo " make pkgsrc-create-repo - fetch pkgsrc repo only, no checkout"
23 @echo " make pkgsrc-update - update your pkgsrc repo from the net"
26 .if exists(${.CURDIR}/src/.git)
27 .if exists(${.CURDIR}/src/Makefile)
28 @echo " make src-update - update your src repo from the net"
30 @echo " make src-checkout - initial checkout of your pre-packaged src repo"
31 @echo " make src-update - update your src repo from the net"
32 @echo " after the initial checkout."
35 @echo " make src-create - fetch initial src repo from the net"
36 @echo " make src-create-shallow - fetch initial history-free src repo"
37 @echo " make src-create-repo - fetch src repo only, no checkout"
38 @echo " make src-update - update your src repo from the net"
41 .if exists(${.CURDIR}/src-sys.tar.bz2)
42 @echo " make release-sys-extract - extract the pre-packaged sys-only sources"
45 @echo "If automating please feel free to run git pull's from cron."
46 @echo "We prefer once a day but you can run them more often if you"
49 @echo "If you have a repo previously maintained via CVS you should"
50 @echo "rm -rf it (save any local modifications) and then use the"
51 @echo "make src-create and/or make pkgsrc-create to set up the initial"
55 @echo "If problems occur you may have to rm -rf pkgsrc and try again."
57 mkdir -p ${.CURDIR}/pkgsrc
58 cd ${.CURDIR}/pkgsrc && git init
59 cd ${.CURDIR}/pkgsrc && \
60 git remote add origin git://${GITHOST}/pkgsrcv2.git
61 cd ${.CURDIR}/pkgsrc && git fetch origin
62 cd ${.CURDIR}/pkgsrc && git branch master origin/master
64 pkgsrc-create: pkgsrc-create-repo
65 cd ${.CURDIR}/pkgsrc && git checkout master
66 cd ${.CURDIR}/pkgsrc && git pull
68 pkgsrc-create-shallow:
69 @echo "If problems occur you may have to rm -rf pkgsrc and try again."
71 mkdir -p ${.CURDIR}/pkgsrc
72 cd ${.CURDIR}/pkgsrc && git init
73 cd ${.CURDIR}/pkgsrc && \
74 git remote add origin git://${GITHOST}/pkgsrcv2.git
75 cd ${.CURDIR}/pkgsrc && git fetch --depth=1 origin
76 cd ${.CURDIR}/pkgsrc && git branch master origin/master
77 cd ${.CURDIR}/pkgsrc && git checkout master
78 cd ${.CURDIR}/pkgsrc && git pull
81 cd ${.CURDIR}/pkgsrc && git checkout master
84 cd ${.CURDIR}/pkgsrc && git pull
87 @echo "If problems occur you may have to rm -rf src and try again."
89 mkdir -p ${.CURDIR}/src
90 cd ${.CURDIR}/src && git init
91 cd ${.CURDIR}/src && \
92 git remote add origin git://${GITHOST}/dragonfly.git
93 cd ${.CURDIR}/src && git fetch origin
94 cd ${.CURDIR}/src && git branch master origin/master
96 src-create: src-create-repo
97 cd ${.CURDIR}/src && git checkout master
98 cd ${.CURDIR}/src && git pull
101 @echo "If problems occur you may have to rm -rf src and try again."
103 mkdir -p ${.CURDIR}/src
104 cd ${.CURDIR}/src && git init
105 cd ${.CURDIR}/src && \
106 git remote add origin git://${GITHOST}/dragonfly.git
107 cd ${.CURDIR}/src && git fetch --depth=1 origin
108 cd ${.CURDIR}/src && git branch master origin/master
109 cd ${.CURDIR}/src && git checkout master
110 cd ${.CURDIR}/src && git pull
113 cd ${.CURDIR}/src && git checkout master
116 cd ${.CURDIR}/src && git pull
119 cd ${.CURDIR} && tar xvpjf src-sys.tar.bz2