freebsd-ports/devel/linux-kmod-compat/Makefile
Luigi Rizzo 2892f3e420 Add new port for linux-kmod-compat - emulation layer to build
linux device drivers as FreeBSD kld modules. Details at

	http://info.iet.unipi.it/~luigi/FreeBSD/linux_bsd_kld.html

Two ports for webcam drivers that use this package are coming in
a matter of minutes.

NOTES:
+ This is only for 6.x and 7.x, no support planned for earlier versions.
+ At the moment only i386 but have patches for 64-bit architectures
  that should be committed soon.
+ This port installs a file in /usr/share/mk . After some discussion
  on the ports list this seems, to be the most reasonable thing to do.
  portlint complains about it.
+ portlint also complains because the url in pkg-descr does not contain
  'www'. Can't help it, the url really does not contain 'www'.
+ The emulation code is under active development so expect frequent
  updates to the portversion and related entries.
+ For the same reason, at this time i prefer not to list all individual
  files in pkg-plist. When the thing has settled a bit more, I will reconsider
  this choice.
+ Documentation is a bit lacking - hopefully it is coming too, as part
  of the ongoing development.

And finally - i have almost spent more time to prepare the port
(including discussing choices, location and studying the ports
infrastructure) than writing the linux emulation code. If some of
the ports guru wants to help cleaning up mistakes that i may have
made, i''l be grateful (but please don't set up a static pkg-plist,
for the reasons above).
2007-02-02 18:08:20 +00:00

53 lines
1.5 KiB
Makefile

# New ports collection makefile for: linux-bsd-kmod
# Date created: 1 February 2007
# Whom: luigi
#
# $FreeBSD$
PORTNAME= linux-kmod-compat
PORTVERSION= 20070202
CATEGORIES= emulators linux multimedia
MASTER_SITES= http://info.iet.unipi.it/~luigi/FreeBSD/
EXTRACT_SUFX= .tgz
MAINTAINER= luigi@FreeBSD.org
COMMENT= Adaptation layer to build linux drivers on FreeBSD
WRKSRC= ${WRKDIR}/linux_compat
NO_PACKAGE= depends on kernel sources
# At the moment, emulation is only partial, but amd64 is coming
ONLY_FOR_ARCHS= i386
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 602100
BROKEN= Requires a recent USB stack. you have ${OSVERSION}
.endif
# Here is where install most things except the .mk file
MY_DST= ${DESTDIR}${PREFIX}/share/${PORTNAME}/linux_compat
MY_MK= bsd.linux_kmod.mk
# Update the header location in the .mk
post-patch:
@${REINPLACE_CMD} -e 's|^KLINPATH.*|KLINPATH?= ${MY_DST}|' \
${WRKSRC}/${MY_MK}
do-build: # nothing to build here, just a chance to update the source.
# Install bsd.linux_kmod.mk into /usr/share/mk so it can be found without
# extra arguments. All other files go into ${MY_DST}, with proper updating
# of owner and permissions. INSTALL is not recursive so we simulate it
# with cp -r/chmod/chown
do-install:
${INSTALL_DATA} ${WRKSRC}/bsd.linux_kmod.mk /usr/share/mk
${MKDIR} ${MY_DST}
${CP} -Rp ${WRKSRC}/* ${MY_DST}
${FIND} ${MY_DST} -type f -exec ${CHMOD} ${SHAREMODE} \{\} \;
# XXX TODO: fix modes on directories
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${MY_DST}
.include <bsd.port.post.mk>