|
|||||||||||
|
ports/3326: Fetching packages is harder than needed
From: <S(at)mSmith.net>
Date: Fri Jun 20 2003 - 17:09:11 EDT
System : OpenBSD 3.3 Architecture: OpenBSD.i386 Machine : i386 >Description: To install a package; you must know what the version of the software the package is for. The ports tree already knows this.
I'm lazy.
ftp to your local friendly ftp mirror and try to download a package.
The below set of diffs allow you to type
FROM_PACKAGE=yes make install
This makes testing packages very easy.
If you want a snapshot build of ports, you'll want to define
SNAPSHOT=rightyroo
This allows you to do
cd /usr/ports/www/mozilla
You can put FROM_PACKAGE into /etc/mk.conf and use FROM_SOURCE to override it when you want a source build. Index: infrastructure/templates/network.conf.template RCS file: /library/OpenBSD/ports/infrastructure/templates/network.conf.template,v retrieving revision 1.62 diff -u -r1.62 network.conf.template
--- infrastructure/templates/network.conf.template 13 May 2003 10:52:11 -0000 1.62
+++ infrastructure/templates/network.conf.template 20 May 2003 20:57:31 -0000
@@ -262,6 +264,20 @@
http://packetstorm.dyn.org/ \
http://packetstorm.blackroute.net/ \
http://packetstorm.trustica.cz/
+
+
+.if defined (SNAPSHOT)
+PACKAGE_SUBDIR=snapshots
+.else
+PACKAGE_SUBDIR=`uname -r`
+.endif
+
+# Sites with the packages
+MASTER_SITE_OPENBSD_PACKAGES+= \
+ ftp://ftp.uk.openbsd.org/pub/OpenBSD/${PACKAGE_SUBDIR}/packages/${MACHINE_ARCH}/ \
+ ftp://ftp.openbsd.org/pub/OpenBSD/${PACKAGE_SUBDIR}/packages/${MACHINE_ARCH}/ \
+ ftp://ftp.usa.openbsd.org/pub/OpenBSD/${PACKAGE_SUBDIR}/packages/${MACHINE_ARCH}/
+
MASTER_SITE_HORDE+= \
ftp://ftp.horde.org/pub/ \
Index: infrastructure/mk/bsd.port.mk RCS file: /library/OpenBSD/ports/infrastructure/mk/bsd.port.mk,v retrieving revision 1.544 diff -u -r1.544 bsd.port.mk @@ -1533,10 +1583,25 @@ ${_CONFIGURE_COOKIE}
${_BUILD_COOKIE}
+.if defined(FROM_SOURCE) || !defined(FROM_PACKAGE) +install: ${_INSTALL_DEPS} +.else +FILE=${FULLPKGNAME${SUB PACKAGE}}${_MASTER}${PKG_SUFX} +install: +. if ${PERMIT_PACKAGE_FTP:L} == "yes" + @for site in ${MASTER_SITE_OPENBSD_PACKAGES}; do\ + ${ECHO_MSG} ">> Attempting to fetch ${FILE} from $${site}."; \ + if ${SUDO} /usr/sbin/pkg_add $${site}${FILE}; then \ + exit 0; \ + fi; \ + done; +. else + @echo "This package must be built from source as we may not distribute packages." +. endif +.endif
. if defined(_IGNORE_REGRESS)
>Release-Note:
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:58 EDT |
||||||||||
|
|||||||||||