ports/108788: [patch] sysutils/fusefs-kmod: Add BASE option
Alex Kozlov
spam at rm-rf.kiev.ua
Mon Feb 5 08:50:24 UTC 2007
>Number: 108788
>Category: ports
>Synopsis: [patch] sysutils/fusefs-kmod: Add BASE option
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Feb 05 08:50:19 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Alex Kozlov
>Release: FreeBSD 6.2
>Organization:
private
>Environment:
>Description:
Add option BASE which allows to install kld in /boot/modules. That will permit load fuse-kmod from loader.conf if /usr on a separate partition.
>How-To-Repeat:
>Fix:
--- sysutils/fusefs-kmod/Makefile Fri Sep 29 13:16:49 2006
+++ Makefile.new Mon Feb 4 18:20:55 2007
@@ -23,7 +23,6 @@
SRC_BASE?= /usr/src
KMODDIR= ${PREFIX}/modules
-MAKE_ARGS= KMODDIR=${KMODDIR}
MODULE_PATH= `/sbin/sysctl -n kern.module_path`;${KMODDIR}
USE_RC_SUBR= fusefs
SETUP= setup.sh
@@ -46,7 +45,8 @@
serif.css \
tabbar-right.css
-OPTIONS= AUTOSETUP "Automatic global config file setup" off
+OPTIONS= AUTOSETUP "Automatic global config file setup" off\
+ BASE "Install to the base system" off
.include <bsd.port.pre.mk>
@@ -58,11 +58,31 @@
IGNORE= requires the Kernel source to be installed. Set SRC_BASE if it is not in /usr/src
.endif
+.if defined(WITH_BASE)
+.if defined(WITH_AUTOSETUP)
+IGNORE= cannot install: the WITH_BASE and WITH_AUTOSETUP are not compatible
+.endif
+KMODDIR= /boot/modules
+PLIST_FILES+= "@cwd /"
+.endif
+
+MAKE_ENV+= KMODDIR="${KMODDIR}"
+
+.if defined(WITH_BASE)
+PLIST_FILES+= ${KMODDIR:C,^/,,}/fuse.ko
+.else
+PLIST_FILES+= "modules/fuse.ko"
+.endif
+PLIST_FILES+= "@unexec kldxref ${KMODDIR}"
+PLIST_FILES+= "@cwd ${PREFIX}"
+
post-configure:
@${CP} ${LOCALBASE}/include/fuse/fuse_kernel.h ${WRKSRC}/fuse_module
pre-install:
+.if !defined(WITH_BASE)
@${MKDIR} ${KMODDIR}
+.endif
post-install:
.if (defined(WITH_AUTOSETUP) && !defined(BATCH) && !defined(PACKAGE_BUILDING)) \
@@ -71,7 +91,7 @@
${FILESDIR}/${SETUP} > ${WRKDIR}/${SETUP}
@${ECHO} "Modifying global startup config files and loading module...";
${SH} ${WRKDIR}/${SETUP}
-.else
+.elif !defined(WITH_BASE)
@${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \
-e "s|%%MODULE_PATH%%|${MODULE_PATH}|g" ${PKGMESSAGE}
.endif
--- sysutils/fusefs-kmod/pkg-plist Thu Apr 6 00:52:17 2006
+++ pkg-plist.new Mon Feb 4 18:17:32 2007
@@ -1,6 +1,4 @@
-modules/fuse.ko
sbin/mount_fusefs
- at unexec kldxref %D/modules
@dirrmtry modules
%%PORTDOCS%%%%DOCSDIR%%/kmod/doc.txt
%%PORTDOCS%%%%DOCSDIR%%/kmod/html/Faq.html
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list