]> Zhao Yanbai Git Server - minix.git/commitdiff
Makefile for pkgsrc repo update/checkout
authorArun Thomas <arun@minix3.org>
Tue, 20 Jul 2010 17:09:44 +0000 (17:09 +0000)
committerArun Thomas <arun@minix3.org>
Tue, 20 Jul 2010 17:09:44 +0000 (17:09 +0000)
-From DragonflyBSD with minor tweaks

etc/Makefile
etc/usr/Makefile [new file with mode: 0644]

index 6dd1f74a97abfbb41b116544f16f7556941988ab..a53319dbd8f3011aaeae7f82524c0e634c5de7d1 100644 (file)
@@ -5,7 +5,7 @@ FILES1=fstab group hostname.file inet.conf motd.install mtab passwd profile \
        binary_sizes.big binary_sizes.xxl syslog.conf rc.daemons.dist \
        rs.inet rs.single make.conf system.conf 
 FILES2=shadow
-FILES3=daily dhcptags.conf rc
+FILES3=daily dhcptags.conf rc Makefile
 
 clean::
 
diff --git a/etc/usr/Makefile b/etc/usr/Makefile
new file mode 100644 (file)
index 0000000..e46c066
--- /dev/null
@@ -0,0 +1,39 @@
+# Makefile - installed as /usr/Makefile
+#
+# Provides simple targets to download and maintain /usr/pkgsrc etc.
+
+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 ""
+
+pkgsrc-create:
+       @echo "If problems occur you may have to rm -rf pkgsrc and try again."
+       @echo ""
+       mkdir -p ${.CURDIR}/pkgsrc
+       cd ${.CURDIR}/pkgsrc && git init
+       cd ${.CURDIR}/pkgsrc && \
+               git remote add origin http://github.com/gautambt/Pkgsrc-Minix.git
+       cd ${.CURDIR}/pkgsrc && git fetch origin
+       cd ${.CURDIR}/pkgsrc && git branch minix origin/minix
+       cd ${.CURDIR}/pkgsrc && git checkout minix
+       cd ${.CURDIR}/pkgsrc && git pull
+
+pkgsrc-checkout:
+       cd ${.CURDIR}/pkgsrc && git checkout minix
+
+pkgsrc-update:
+       cd ${.CURDIR}/pkgsrc && git pull