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-repo - fetch pkgsrc repo only, no checkout"
22 @echo " make pkgsrc-update - update your pkgsrc repo from the net"
25 .if exists(${.CURDIR}/src/.git)
26 .if exists(${.CURDIR}/src/Makefile)
27 @echo " make src-update - update your src repo from the net"
29 @echo " make src-checkout - initial checkout of your pre-packaged src repo"
30 @echo " make src-update - update your src repo from the net"
31 @echo " after the initial checkout."
34 @echo " make src-create - fetch initial src repo from the net"
35 @echo " make src-create-shallow - fetch initial history-free src repo"
36 @echo " make src-create-repo - fetch src repo only, no checkout"
37 @echo " make src-update - update your src repo from the net"
40 .if exists(${.CURDIR}/src-sys.tgz)
41 @echo " make release-sys-extract - extract the pre-packaged sys-only sources"
44 @echo "If automating please feel free to run git pull's from cron."
45 @echo "We prefer once a day but you can run them more often if you"
48 @echo "If you have a repo previously maintained via CVS you should"
49 @echo "rm -rf it (save any local modifications) and then use the"
50 @echo "make src-create and/or make pkgsrc-create to set up the initial"
53 # NOTE: Adding the git gc --aggressive helps nrelease builds by significantly
54 # reducing the disk space required.
57 @echo "If problems occur you may have to rm -rf pkgsrc and try again."
59 mkdir -p ${.CURDIR}/pkgsrc
60 cd ${.CURDIR}/pkgsrc && git init
61 cd ${.CURDIR}/pkgsrc && \
62 git remote add origin git://${GITHOST}/pkgsrcv2.git
63 cd ${.CURDIR}/pkgsrc && git fetch origin
64 cd ${.CURDIR}/pkgsrc && git branch master origin/master
65 cd ${.CURDIR}/pkgsrc && git branch pkgsrc-2011Q4 origin/pkgsrc-2011Q4
66 cd ${.CURDIR}/pkgsrc && git gc --aggressive
68 pkgsrc-create: pkgsrc-create-repo
69 cd ${.CURDIR}/pkgsrc && git checkout pkgsrc-2011Q4
70 cd ${.CURDIR}/pkgsrc && git pull
73 cd ${.CURDIR}/pkgsrc && git checkout pkgsrc-2011Q4
76 cd ${.CURDIR}/pkgsrc && git pull
78 # NOTE: Adding the git gc --aggressive helps nrelease builds by significantly
79 # reducing the disk space required.
82 @echo "If problems occur you may have to rm -rf src and try again."
84 mkdir -p ${.CURDIR}/src
85 cd ${.CURDIR}/src && git init
86 cd ${.CURDIR}/src && \
87 git remote add origin git://${GITHOST}/dragonfly.git
88 cd ${.CURDIR}/src && git fetch origin
89 cd ${.CURDIR}/src && git branch master origin/master
90 cd ${.CURDIR}/src && git gc --aggressive
92 src-create: src-create-repo
93 cd ${.CURDIR}/src && git checkout master
94 cd ${.CURDIR}/src && git pull
97 @echo "If problems occur you may have to rm -rf src and try again."
99 mkdir -p ${.CURDIR}/src
100 cd ${.CURDIR}/src && git init
101 cd ${.CURDIR}/src && \
102 git remote add origin git://${GITHOST}/dragonfly.git
103 cd ${.CURDIR}/src && git fetch --depth=1 origin
104 cd ${.CURDIR}/src && git branch master origin/master
105 cd ${.CURDIR}/src && git checkout master
106 cd ${.CURDIR}/src && git pull
109 cd ${.CURDIR}/src && git checkout master
112 cd ${.CURDIR}/src && git pull
115 cd ${.CURDIR} && tar xvpzf src-sys.tgz