summaryrefslogtreecommitdiff
path: root/comms/uarduno/Makefile
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2014-06-22 21:11:41 +0000
committerRene Ladan <rene@FreeBSD.org>2014-06-22 21:11:41 +0000
commitf6d3acfe3c19311662aa67cffd56f54b495ce1af (patch)
treeb59e60a00bf404bf007bf040ae1179618aabfec8 /comms/uarduno/Makefile
parentAdd --strip-debug to STRIP_CMD to avoid removing kernel symbols from the (diff)
comms/uarduno: modernize Makefile and add device IDs.
- Use kmod, so add staging support. - Fix license support (BSD2CLAUSE) - Fix packaging as user - Add support for device IDs 0x0010, 0x0042, 0x0043 - Remove superfluous Makefile variables (NO_PACKAGE, SSP_UNSAFE, MAKE_ENV, PREFIX, SRCPREFIX, NO_MTREE) - Remove support for FreeBSD < 8 - Fix WWW line in pkg-descr - Bump PORTREVISION PR: ports/189621 Submitted by: maintainer (Bob Frazier, <bobf@mrp3.com>)
Notes
Notes: svn path=/head/; revision=358829
Diffstat (limited to 'comms/uarduno/Makefile')
-rw-r--r--comms/uarduno/Makefile55
1 files changed, 10 insertions, 45 deletions
diff --git a/comms/uarduno/Makefile b/comms/uarduno/Makefile
index 4f10c17598a7..2ea3c25bc724 100644
--- a/comms/uarduno/Makefile
+++ b/comms/uarduno/Makefile
@@ -3,70 +3,35 @@
PORTNAME= uarduno
PORTVERSION= 1.02
-CATEGORIES= comms kld
+PORTREVISION= 1
+CATEGORIES= comms
MASTER_SITES= http://mrp3.com/
MAINTAINER= bobf@mrp3.com
COMMENT= FreeBSD Kernel Driver for the Arduino Uno USB interface
-NO_PACKAGE= You must (re)build this port with your kernel source
-
-SSP_UNSAFE= kernel module does not support ssp
-
-# need to enforce installation into kernel module directory
-MAKE_ENV+= KMODDIR=${KMODDIR}
-PREFIX= ${KMODDIR}
-
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
+# no license required
+LICENSE= BSD2CLAUSE
-SRCPREFIX?= ${SRC_BASE}
+NO_LICENSES_INSTALL= yes
+NO_LICENSES_DIALOGS= yes
-# disable mtree or you'll get a /boot/kernel/... directory hierarchy put there
-NO_MTREE= yes
+USES= kmod uidfix
# some test targets need a predictable source directory
WRKSRC= ${WRKDIR}/uarduno
-PLIST_FILES= uarduno.ko \
- "@unexec kldxref ${KMODDIR}"
-
-# no license required
-LICENSE= BSD
-NO_LICENSES_INSTALL= yes
-NO_LICENSES_DIALOGS= yes
+PLIST_FILES= "${KMODDIR}/uarduno.ko"
#
-# version 7xxxx and 8xxxx are very different
-# so make sure I correctly identify them
+# make sure I correctly identify the OS version
#
CFLAGS+= -DKERNELVER=${OSVERSION}
-.if ${OSVERSION} < 800000
-# Simple check for 7.x kernel source (find usb.c)
-.if ! exists(${SRCPREFIX}/sys/dev/usb/usb.c)
-IGNORE= this port will not build without the latest 7.x kernel source
-.endif
-.else
-# 8.x and later kernels (partially tested in 9.x, mabye add to kernel?)
-# simple check for 8.x and later kernel source (find usb_core.c)
-.if ! exists(${SRCPREFIX}/sys/dev/usb/usb_core.c)
-IGNORE= this port will not build without the latest kernel source
-.endif
-.endif
-
# post-patch target, copy 'ids.txt' as 'ids.h' (user-modifiable file)
post-patch:
@${CP} ${FILESDIR}/ids.txt ${WRKSRC}/ids.h
-# post-install target, make sure kernel module is unloaded
-post-install:
- @if kldstat -q -m uhub/uarduno ; then \
- echo "" ; echo " +++ Unloading uarduno.ko (related devices will need to be re-attached)" ; kldunload uarduno ; fi
- @${ECHO_MSG}
- @${CAT} ${PKGMESSAGE}
- @${ECHO_MSG}
-
#
# these next 2 targets are for developer use
#
@@ -86,4 +51,4 @@ uarduno-part-clean:
${MAKE} -C ${WRKSRC} my-clean
${MAKE} patch
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>