aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/virtio-kmod
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2012-01-09 22:58:27 +0800
committerkuriyama <kuriyama@FreeBSD.org>2012-01-09 22:58:27 +0800
commita4c474e9843a8048558501df0e7f35d57c9d3163 (patch)
tree2eea09b106e7101af7fde57715c70652940baa26 /emulators/virtio-kmod
parent89fa748bd173e36ab125fc3d0072211159329c77 (diff)
downloadfreebsd-ports-gnome-a4c474e9843a8048558501df0e7f35d57c9d3163.tar.gz
freebsd-ports-gnome-a4c474e9843a8048558501df0e7f35d57c9d3163.tar.zst
freebsd-ports-gnome-a4c474e9843a8048558501df0e7f35d57c9d3163.zip
- Update to r228301.
- Use /boot/modules like as other KLD ports [1]. - Create tarball to build on pointyhat cluster. Submitted by: beat [1]
Diffstat (limited to 'emulators/virtio-kmod')
-rw-r--r--emulators/virtio-kmod/Makefile43
-rw-r--r--emulators/virtio-kmod/distinfo2
-rw-r--r--emulators/virtio-kmod/pkg-message9
-rw-r--r--emulators/virtio-kmod/pkg-plist4
4 files changed, 32 insertions, 26 deletions
diff --git a/emulators/virtio-kmod/Makefile b/emulators/virtio-kmod/Makefile
index 9afccfbba803..2d743a3ee440 100644
--- a/emulators/virtio-kmod/Makefile
+++ b/emulators/virtio-kmod/Makefile
@@ -8,53 +8,60 @@
PORTNAME= virtio
PORTVERSION= 0.${SVN_REV}
CATEGORIES= emulators
-MASTER_SITES= # none
+MASTER_SITES= ${MASTER_SITE_LOCAL}
+MASTER_SITE_SUBDIR= kuriyama
PKGNAMESUFFIX= -kmod
-DISTFILES= # none
MAINTAINER= kuriyama@FreeBSD.org
COMMENT= virtio kernel modules port for 8.2/9.0
-FETCH_DEPENDS= svn:${PORTSDIR}/devel/subversion
-
ONLY_FOR_ARCHS= amd64 i386
WRKSRC= ${WRKDIR}
-SVN_REV= 227652
-SVN_MIRROR?= http://svn.freebsd.org/base
-KMODDIR?= modules
-PLIST_SUB= KMODDIR=${KMODDIR}
-SVN= ${LOCALBASE}/bin/svn
+SVN_REV= 228301
+KMODDIR?= /boot/modules
+PLIST_SUB= KMODDIR=${KMODDIR:C,^/,,}
.if !exists(${SRC_BASE}/sys/Makefile)
IGNORE= requires kernel source to be installed
.endif
-MANUAL_PACKAGE_BUILD= pointyhat prohibits internet traffic outside fetch stage
-
.include <bsd.port.pre.mk>
.if ${OSREL} != "8.2" && ${OSREL} != "9.0"
IGNORE= not supported $${OSREL} (${OSREL})
.endif
-do-extract:
- ${MKDIR} ${WRKSRC}
+post-extract:
+ cd ${WRKSRC} && ${MKDIR} tmp && ${MV} dev modules tmp/
${CP} -Rp ${SRC_BASE}/sys ${WRKSRC}/
- cd ${WRKSRC}/sys/dev && ${SVN} co -r ${SVN_REV} ${SVN_MIRROR}/head/sys/dev/virtio
- cd ${WRKSRC}/sys/modules && ${SVN} co -r ${SVN_REV} ${SVN_MIRROR}/head/sys/modules/virtio
+ ${CP} -Rp ${WRKSRC}/tmp/* ${WRKSRC}/sys/
do-build:
cd ${WRKSRC}/sys/modules/virtio; ${MAKE} DEBUG_FLAGS=-g
do-install:
- ${MKDIR} ${PREFIX}/${KMODDIR}
.for f in pci/virtio_pci virtio/virtio block/virtio_blk balloon/virtio_balloon network/if_vtnet
- ${INSTALL_KLD} ${WRKSRC}/sys/modules/virtio/${f}.ko ${PREFIX}/${KMODDIR}/
- ${INSTALL_KLD} ${WRKSRC}/sys/modules/virtio/${f}.ko.symbols ${PREFIX}/${KMODDIR}/
+ ${INSTALL_KLD} ${WRKSRC}/sys/modules/virtio/${f}.ko ${KMODDIR}
+ ${INSTALL_KLD} ${WRKSRC}/sys/modules/virtio/${f}.ko.symbols ${KMODDIR}
.endfor
+ /usr/sbin/kldxref ${KMODDIR}
post-install:
${CAT} ${PKGMESSAGE}
+# For maintainer only.
+SVN_MIRROR?= http://svn.freebsd.org/base
+EXPDIR= ${WRKSRC}/src/sys
+maintainer-tar:
+ ${MKDIR} ${EXPDIR}
+ cd ${EXPDIR} && svn export -r ${SVN_REV} ${SVN_MIRROR}/head/sys/dev/virtio dev/virtio
+ cd ${EXPDIR} && svn export -r ${SVN_REV} ${SVN_MIRROR}/head/sys/modules/virtio modules/virtio
+ cd ${EXPDIR} && ${TAR} cfvz ${DISTDIR}/${DISTFILES} dev modules
+
+maintainer-check:
+ @new=`svn log -ql 1 ${SVN_MIRROR}@HEAD head/sys/dev/virtio | ${GREP} -v ^- | ${SED} -e 's| .*||'`;\
+ old="r${SVN_REV}";\
+ if [ "$${new}" != "$${old}" ]; then ${ECHO_MSG} "New virtio rev: $${new}"; fi
+
.include <bsd.port.post.mk>
diff --git a/emulators/virtio-kmod/distinfo b/emulators/virtio-kmod/distinfo
new file mode 100644
index 000000000000..d36eb9d5ab37
--- /dev/null
+++ b/emulators/virtio-kmod/distinfo
@@ -0,0 +1,2 @@
+SHA256 (virtio-0.228301.tar.gz) = 022b05ce98a88096aacc331fb7ba122d935432a87100fcba6a3b3d7e9e9aa0d6
+SIZE (virtio-0.228301.tar.gz) = 47262
diff --git a/emulators/virtio-kmod/pkg-message b/emulators/virtio-kmod/pkg-message
index 91eba778a71f..7db5130c888f 100644
--- a/emulators/virtio-kmod/pkg-message
+++ b/emulators/virtio-kmod/pkg-message
@@ -1,9 +1,4 @@
-To use these modules, copy into /boot/kernel directory:
-
-# cp -Rp ${PREFIX}/modules/* /boot/kernel/
-# kldxref /boot/kernel
-
-and add loading lines in /boot/loader.conf:
+To use these modules, add loading lines in /boot/loader.conf:
virtio_load="YES"
virtio_pci_load="YES"
@@ -13,7 +8,7 @@ virtio_balloon_load="YES"
and edit fstab and interface config in rc.conf:
-# sed -i.bak -e 's|/dev/ada?/|/dev/vtbd/|' /etc/fstab
+# sed -i.bak -Ee 's|/dev/ada?|/dev/vtbd|' /etc/fstab
# sed -i.bak -e 's|em0|vtnet0|' /etc/rc.conf
and enable virtio devices in host's domain.xml:
diff --git a/emulators/virtio-kmod/pkg-plist b/emulators/virtio-kmod/pkg-plist
index c8f9621f8383..f97a5d7616da 100644
--- a/emulators/virtio-kmod/pkg-plist
+++ b/emulators/virtio-kmod/pkg-plist
@@ -1,3 +1,4 @@
+@cwd /
%%KMODDIR%%/if_vtnet.ko
%%KMODDIR%%/if_vtnet.ko.symbols
%%KMODDIR%%/virtio.ko
@@ -8,4 +9,5 @@
%%KMODDIR%%/virtio_blk.ko.symbols
%%KMODDIR%%/virtio_pci.ko
%%KMODDIR%%/virtio_pci.ko.symbols
-@dirrmtry %%KMODDIR%%
+@exec /usr/sbin/kldxref /%%KMODDIR%%
+@unexec /usr/sbin/kldxref /%%KMODDIR%%