diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/matrix-kmod/Makefile | 15 | ||||
-rw-r--r-- | misc/matrix-kmod/files/matrix_saver.sh | 22 | ||||
-rw-r--r-- | misc/matrix-kmod/pkg-plist | 6 |
3 files changed, 32 insertions, 11 deletions
diff --git a/misc/matrix-kmod/Makefile b/misc/matrix-kmod/Makefile index 85596c834fa6..2aaeff2f3010 100644 --- a/misc/matrix-kmod/Makefile +++ b/misc/matrix-kmod/Makefile @@ -7,14 +7,15 @@ PORTNAME= matrix PORTVERSION= 1.2 +PORTREVISION= 1 CATEGORIES= misc MASTER_SITES= http://www.belousov.com/download/ PKGNAMESUFFIX= -kmod -MAINTAINER= strijar@urai.ru +MAINTAINER= strijar@urai.ru COMMENT= Screensaver for console (matrix_saver.ko) "Matrix" like -MAKE_ENV= DESTDIR="${PREFIX}/lib/matrix" +KMODDIR= ${PREFIX}/modules .include <bsd.port.pre.mk> @@ -22,11 +23,9 @@ MAKE_ENV= DESTDIR="${PREFIX}/lib/matrix" BROKEN= "Need FreeBSD 4.0 or above" .endif -.if ${OSVERSION} >= 500113 -BROKEN= "Installation fails" -.endif - -pre-install: - ${MKDIR} ${PREFIX}/lib/matrix/modules +do-install: + @${MKDIR} ${KMODDIR} + ${INSTALL_SCRIPT} ${FILESDIR}/matrix_saver.sh ${PREFIX}/etc/rc.d + ${INSTALL_SCRIPT} ${WRKSRC}/*.ko ${KMODDIR} .include <bsd.port.post.mk> diff --git a/misc/matrix-kmod/files/matrix_saver.sh b/misc/matrix-kmod/files/matrix_saver.sh new file mode 100644 index 000000000000..0665113cdb02 --- /dev/null +++ b/misc/matrix-kmod/files/matrix_saver.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in +start) + if [ -x ${PREFIX}/modules/matrix_saver.ko ]; then + echo -n ' matrix_saver' + kldload ${PREFIX}/modules/matrix_saver.ko + fi + ;; +stop) + kldunload -v -n matrix_saver && echo -n ' matrix_saver' + ;; +*) + echo "Usage: $0 {start|stop}" >&2 + exit 1 + ;; +esac diff --git a/misc/matrix-kmod/pkg-plist b/misc/matrix-kmod/pkg-plist index 511fc2cafb1f..1f6b26e5877d 100644 --- a/misc/matrix-kmod/pkg-plist +++ b/misc/matrix-kmod/pkg-plist @@ -1,3 +1,3 @@ -lib/matrix/modules/matrix_saver.ko -@dirrm lib/matrix/modules -@dirrm lib/matrix +etc/rc.d/matrix_saver.sh +modules/matrix_saver.ko +@unexec rmdir -p %D/modules 2>/dev/null || true |