X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/blobdiff_plain/64a36df5acc14d1a77ff5323e2d648c2a9ca5bdb..95f63bef3ec14b51ac3e13cb7881e5bf461aa90e:/etc/Makefile.usr diff --git a/etc/Makefile.usr b/etc/Makefile.usr index c12fd64957..6d285b2ca9 100644 --- a/etc/Makefile.usr +++ b/etc/Makefile.usr @@ -1,65 +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.8 2008/09/03 10:38:55 hasso 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 "" - @echo "These targets download/update the DragonFly git repository into" - @echo "/usr/src." - @echo " make git-clone" - @echo " make git-update" +.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 "Install or update /usr/pkgsrc/wip using NetBSD.se anoncvs" - @echo " make pkgsrc-wip-checkout" - @echo " make pkgsrc-wip-update" +.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 than once a week and run gits no more often" - @echo "than 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 -P 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 -pkgsrc-wip-checkout: - cd ${.CURDIR}; \ - mkdir -p pkgsrc/wip; \ - cd pkgsrc; \ - cvs -d anoncvs@anoncvs.NetBSD.se:/cvsroot checkout -P wip - -pkgsrc-wip-update: - cd ${.CURDIR}/pkgsrc; \ - cvs -d anoncvs@anoncvs.NetBSD.se:/cvsroot update -Pd wip +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 -release-sys-extract: - bunzip2 < src-sys.tar.bz2 | tar xvpf - +src-checkout: + cd ${.CURDIR}/src && git checkout master -git-clone: - @cd ${.CURDIR}; \ - if [ -z "`which git`" ]; then \ - echo "Please install devel/scmgit from pkgsrc"; \ - exit 1; \ - fi; \ - git clone -o crater -n git://crater.dragonflybsd.org/dragonfly.git src; \ - cd src && git checkout master +src-update: + cd ${.CURDIR}/src && git pull -git-update: - @cd ${.CURDIR}/src; \ - if [ -z "`which git`" ]; then \ - echo "Please install devel/scmgit from pkgsrc"; \ - exit 1; \ - fi; \ - git pull crater +release-sys-extract: + cd ${.CURDIR} && tar xvpzf src-sys.tgz