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"
54 # NOTE: Adding the git gc --aggressive helps nrelease builds by significantly
55 # reducing the disk space required.
58 @echo "If problems occur you may have to rm -rf pkgsrc and try again."
60 mkdir -p ${.CURDIR}/pkgsrc
61 cd ${.CURDIR}/pkgsrc && git init
62 cd ${.CURDIR}/pkgsrc && \
63 git remote add origin git://${GITHOST}/pkgsrcv2.git
64 cd ${.CURDIR}/pkgsrc && git fetch origin
65 cd ${.CURDIR}/pkgsrc && git branch master origin/master
66 cd ${.CURDIR}/pkgsrc && git branch pkgsrc-2012Q3 origin/pkgsrc-2012Q3
67 cd ${.CURDIR}/pkgsrc && git gc --aggressive
69 pkgsrc-create: pkgsrc-create-repo
70 cd ${.CURDIR}/pkgsrc && git checkout pkgsrc-2012Q3
71 cd ${.CURDIR}/pkgsrc && git pull
73 pkgsrc-create-shallow:
74 @echo "If problems occur you may have to rm -rf pkgsrc and try again."
76 mkdir -p ${.CURDIR}/pkgsrc
77 cd ${.CURDIR}/pkgsrc && git init
78 cd ${.CURDIR}/pkgsrc && \
79 git remote add origin git://${GITHOST}/pkgsrcv2.git
80 cd ${.CURDIR}/pkgsrc && git fetch --depth=1 origin
81 cd ${.CURDIR}/pkgsrc && git branch master origin/master
82 cd ${.CURDIR}/pkgsrc && git checkout master
83 cd ${.CURDIR}/pkgsrc && git pull
86 cd ${.CURDIR}/pkgsrc && git checkout pkgsrc-2012Q3
89 cd ${.CURDIR}/pkgsrc && git pull
91 # NOTE: Adding the git gc --aggressive helps nrelease builds by significantly
92 # reducing the disk space required.
95 @echo "If problems occur you may have to rm -rf src and try again."
97 mkdir -p ${.CURDIR}/src
98 cd ${.CURDIR}/src && git init
99 cd ${.CURDIR}/src && \
100 git remote add origin git://${GITHOST}/dragonfly.git
101 cd ${.CURDIR}/src && git fetch origin
102 cd ${.CURDIR}/src && git branch master origin/master
103 cd ${.CURDIR}/src && git branch DragonFly_RELEASE_3_2 origin/DragonFly_RELEASE_3_2
104 cd ${.CURDIR}/src && git gc --aggressive
106 src-create: src-create-repo
107 cd ${.CURDIR}/src && git checkout DragonFly_RELEASE_3_2
108 cd ${.CURDIR}/src && git pull
111 @echo "If problems occur you may have to rm -rf src and try again."
113 mkdir -p ${.CURDIR}/src
114 cd ${.CURDIR}/src && git init
115 cd ${.CURDIR}/src && \
116 git remote add origin git://${GITHOST}/dragonfly.git
117 cd ${.CURDIR}/src && git fetch --depth=1 origin
118 cd ${.CURDIR}/src && git branch master origin/master
119 cd ${.CURDIR}/src && git branch DragonFly_RELEASE_3_2 origin/DragonFly_RELEASE_3_2
120 cd ${.CURDIR}/src && git checkout DragonFly_RELEASE_3_2
121 cd ${.CURDIR}/src && git pull
124 cd ${.CURDIR}/src && git checkout DragonFly_RELEASE_3_2
127 cd ${.CURDIR}/src && git pull
130 cd ${.CURDIR} && tar xvpjf src-sys.tar.bz2