1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-03 06:04:53 +00:00

- Add automatic pkg-plist generation

- Remove NO_PACKAGE (for the above reason)
- Add NO_BUILD
- Various fixes (also for portlint)

This commit doesn't change which files are installed and where
(the port is still not PREFIX clean).
This commit is contained in:
Alex Dupre 2007-02-02 22:38:38 +00:00
parent b6db5f4acb
commit 77d80f066b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=183987
3 changed files with 21 additions and 24 deletions

View File

@ -14,40 +14,43 @@ MAINTAINER= luigi@FreeBSD.org
COMMENT= Adaptation layer to build linux drivers on FreeBSD
WRKSRC= ${WRKDIR}/linux_compat
NO_PACKAGE= The author does not want packages for this port.
NO_BUILD= yes
# At the moment, emulation is only partial, but amd64 is coming
ONLY_FOR_ARCHS= i386
ONLY_FOR_ARCHS= i386
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 602100
BROKEN= Requires a recent USB stack. you have ${OSVERSION}
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_DST= ${DATADIR}/linux_compat
MY_MK= bsd.linux_kmod.mk
PLIST= ${WRKDIR}/pkg-plist
post-extract:
@${FIND} -s -d ${WRKSRC} -type f | ${SED} "s|${WRKSRC}|%%DATADIR%%/linux_compat|" >${PLIST}
@${FIND} -s -d ${WRKSRC} -type d | ${SED} "s|${WRKSRC}|@dirrm %%DATADIR%%/linux_compat|" >> ${PLIST}
@${ECHO_CMD} "@dirrm %%DATADIR%%" >> ${PLIST}
@${ECHO_CMD} "@cwd /usr/share/mk" >> ${PLIST}
@${ECHO_CMD} "bsd.linux_kmod.mk" >> ${PLIST}
# Update the header location in the .mk
post-patch:
@${REINPLACE_CMD} -e 's|^KLINPATH.*|KLINPATH?= ${MY_DST}|' \
@@${REINPLACE_CMD} -i '' -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
# extra arguments.
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}
@${MKDIR} ${MY_DST}
@${CP} -Rp ${WRKSRC}/* ${MY_DST}
@${FIND} ${MY_DST} -type f -exec ${CHMOD} ${SHAREMODE} \{\} \;
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${MY_DST}
.include <bsd.port.post.mk>

View File

@ -8,5 +8,5 @@ It contains:
Ideally, the porting of a linux driver should be as simple as downloading
the linux driver sources, writing a simple Makefile.kmod, and running
"make -f Makefile.kld" to produce your driver.ko.
Full details at
http://info.iet.unipi.it/~luigi/FreeBSD/linux_bsd_kld.html
WWW: http://info.iet.unipi.it/~luigi/FreeBSD/linux_bsd_kld.html

View File

@ -1,6 +0,0 @@
@comment All files but one are in the (private) directory share/linux-bsd-kmod
@unexec echo "Uninstalling from %D/share/linux-bsd-kmod"
@unexec rm -rf %D/share/linux-bsd-kmod
@comment This .mk really goes into /usr/share/mk
@cwd /usr/share/mk
bsd.linux_kmod.mk