X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/blobdiff_plain/73124bbd5659c50c8fdacdccc1efb2f480fddcee..95f63bef3ec14b51ac3e13cb7881e5bf461aa90e:/etc/Makefile.usr diff --git a/etc/Makefile.usr b/etc/Makefile.usr index 139e0b64ff..6d285b2ca9 100644 --- a/etc/Makefile.usr +++ b/etc/Makefile.usr @@ -1,62 +1,86 @@ -# Makefile.pkgsrc - installed as /usr/pkgsrc/Makefile +# Makefile.usr - installed as /usr/Makefile # -# Provides simple targets to download and maintain /usr/pkgsrc. -# -# $DragonFly: src/etc/Makefile.usr,v 1.3 2007/08/12 02:28:15 dillon Exp $ +# Provides simple targets to download and maintain /usr/src, /usr/pkgsrc etc. -all: - @echo "Install or update /usr/pkgsrc using NetBSDs anoncvs" - @echo " make pkgsrc-checkout" - @echo " make pkgsrc-update" +help all: + @echo "HELP:" + @echo "" +.if exists(${.CURDIR}/pkgsrc/.git) +.if exists(${.CURDIR}/pkgsrc/Makefile) + @echo " make pkgsrc-update - update your pkgsrc repo from the net" +.else + @echo " make pkgsrc-checkout - initial checkout of your pre-packaged" + @echo " pkgsrc repo." + @echo " make pkgsrc-update - update your pkgsrc repo from the net" + @echo " after the initial checkout." +.endif +.else + @echo " make pkgsrc-create - fetch initial pkgsrc repo from the net" + @echo " make pkgsrc-update - update your pkgsrc repo from the net" +.endif + @echo "" +.if exists(${.CURDIR}/src/.git) +.if exists(${.CURDIR}/src/Makefile) + @echo " make src-update - update your src repo from the net" +.else + @echo " make src-checkout - initial checkout of your pre-packaged src repo" + @echo " make src-update - update your src repo from the net" + @echo " after the initial checkout." +.endif +.else + @echo " make src-create - fetch initial src repo from the net" + @echo " make src-update - update your src repo from the net" +.endif @echo "" - @echo "These targets download/update the DragonFly cvs repository into" - @echo "/home/dcvs. The release-src-cvsup and head-src-cvsup will" - @echo "first synchronize /home/dcvs then issue an update into /usr/src." - @echo " make cvs-cvsup" - @echo " make release-src-cvsup (suggested)" - @echo " make preview-src-cvsup" - @echo " make head-src-cvsup" +.if exists(${.CURDIR}/src-sys.tgz) + @echo " make release-sys-extract - extract the pre-packaged sys-only sources" +.endif @echo "" - @echo "Extract kernel sources from src-sys.tar.bz2 in this directory." - @echo " make release-sys-extract" + @echo "If automating please feel free to run git pull's from cron." + @echo "We prefer once a day but you can run them more often if you" + @echo "desire." + @echo "" + @echo "If you have a repo previously maintained via CVS you should" + @echo "rm -rf it (save any local modifications) and then use the" + @echo "make src-create and/or make pkgsrc-create to set up the initial" + @echo "git repo." + +pkgsrc-create: + @echo "If problems occur you may have to rm -rf pkgsrc and try again." @echo "" - @echo "If automating please restrict updates from the NetBSD anoncvs" - @echo "server to no more then once a week and run cvsups no more often" - @echo "then daily." + mkdir -p ${.CURDIR}/pkgsrc + cd ${.CURDIR}/pkgsrc && git init + cd ${.CURDIR}/pkgsrc && \ + git remote add origin git://git.dragonflybsd.org/pkgsrc.git + cd ${.CURDIR}/pkgsrc && git fetch origin + cd ${.CURDIR}/pkgsrc && git branch master origin/master + cd ${.CURDIR}/pkgsrc && git checkout master + cd ${.CURDIR}/pkgsrc && git pull pkgsrc-checkout: - cd ${.CURDIR}; \ - cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout pkgsrc + cd ${.CURDIR}/pkgsrc && git checkout master pkgsrc-update: - cd ${.CURDIR}; \ - cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot update -Pd pkgsrc + cd ${.CURDIR}/pkgsrc && git pull + +src-create: + @echo "If problems occur you may have to rm -rf src and try again." + @echo "" + mkdir -p ${.CURDIR}/src + cd ${.CURDIR}/src && git init + cd ${.CURDIR}/src && \ + git remote add origin git://git.dragonflybsd.org/dragonfly.git + cd ${.CURDIR}/src && git fetch origin + cd ${.CURDIR}/src && git branch master origin/master + cd ${.CURDIR}/src && git checkout master + cd ${.CURDIR}/src && git pull + +src-checkout: + cd ${.CURDIR}/src && git checkout master + +src-update: + cd ${.CURDIR}/src && git pull release-sys-extract: - bunzip2 < src-sys.tar.bz2 | tar xvpf - - -cvs-cvsup: - if [ ! -d /home/dcvs ]; then mkdir /home/dcvs; fi - cvsup -g -L 4 /usr/share/examples/cvsup/DragonFly-cvs-supfile - -release-src-cvsup: cvs-cvsup - cd ${.CURDIR}; if [ -d src/CVS ]; then \ - cvs -R -d /home/dcvs update -PAd -rDragonFly_RELEASE_1_10_Slip src; \ - else \ - cvs -R -d /home/dcvs checkout -PA -rDragonFly_RELEASE_1_10_Slip src; \ - fi - -preview-src-cvsup: cvs-cvsup - cd ${.CURDIR}; if [ -d src/CVS ]; then \ - cvs -R -d /home/dcvs update -PAd -rDragonFly_Preview src; \ - else \ - cvs -R -d /home/dcvs checkout -PA -rDragonFly_Preview src; \ - fi - -head-src-cvsup: cvs-cvsup - cd ${.CURDIR}; if [ -d src/CVS ]; then \ - cvs -R -d /home/dcvs update -PAd -rHEAD src; \ - else \ - cvs -R -d /home/dcvs checkout -PA -rHEAD src; \ - fi + cd ${.CURDIR} && tar xvpzf src-sys.tgz