Unbreak port and make it a little bit more package friendly.

Approved by:	portmgr (kris)
This commit is contained in:
Alexander Leidinger 2006-02-25 23:39:06 +00:00
parent 4d74136dd7
commit 0ac537d77c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=156811
2 changed files with 13 additions and 6 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= rtc PORTNAME= rtc
PORTVERSION= 2004.02.24.1 PORTVERSION= 2004.02.24.1
PORTREVISION= 7 PORTREVISION= 8
CATEGORIES= emulators linux CATEGORIES= emulators linux
MASTER_SITES= # none MASTER_SITES= # none
DISTFILES= # none DISTFILES= # none
@ -15,8 +15,6 @@ DISTFILES= # none
MAINTAINER= freebsd-emulation@FreeBSD.org MAINTAINER= freebsd-emulation@FreeBSD.org
COMMENT= Kernel module which provides /dev/rtc device support COMMENT= Kernel module which provides /dev/rtc device support
BROKEN= Incomplete pkg-plist
WRKSRC= ${WRKDIR}/files WRKSRC= ${WRKDIR}/files
NO_FETCH= yes NO_FETCH= yes
@ -29,7 +27,8 @@ DEVDIR= ${LINUXBASE}/dev
STARTUP= rtc.sh STARTUP= rtc.sh
MAKE_ARGS= KMODDIR="${KMODDIR}" CDEV_MAJOR="${CDEV_MAJOR}" MAKE_ARGS= KMODDIR="${KMODDIR}" CDEV_MAJOR="${CDEV_MAJOR}"
PLIST_SUB= DEVDIR="${DEVDIR}" CDEV_MAJOR="${CDEV_MAJOR}" RTC_H_DIR="${RTC_H_DIR}" PLIST_SUB= DEVDIR="${DEVDIR}" CDEV_MAJOR="${CDEV_MAJOR}" \
RTC_H_DIR="${RTC_H_DIR}"
SRC_BASE?= /usr/src SRC_BASE?= /usr/src
@ -39,6 +38,12 @@ SRC_BASE?= /usr/src
IGNORE= needs a system more recent than 400013 IGNORE= needs a system more recent than 400013
.endif .endif
.if ${OSVERSION} < 500104
PLIST_SUB+= MAKEDEV=""
.else
PLIST_SUB+= MAKEDEV="@comment "
.endif
.if !exists(${SRC_BASE}/sys/Makefile) .if !exists(${SRC_BASE}/sys/Makefile)
IGNORE= needs kernel source files IGNORE= needs kernel source files
.endif .endif
@ -53,8 +58,6 @@ pre-install:
${MKDIR} ${KMODDIR} ${MKDIR} ${KMODDIR}
post-install: post-install:
${RM} -f ${DEVDIR}/rtc
-mknod /dev/rtc c ${CDEV_MAJOR} 0
${INSTALL_DATA} ${WRKSRC}/rtc.h ${PREFIX}/include/ ${INSTALL_DATA} ${WRKSRC}/rtc.h ${PREFIX}/include/
${MKDIR} ${PREFIX}/share/examples/rtc ${MKDIR} ${PREFIX}/share/examples/rtc
${INSTALL_DATA} ${WRKSRC}/test.c ${PREFIX}/share/examples/rtc/ ${INSTALL_DATA} ${WRKSRC}/test.c ${PREFIX}/share/examples/rtc/

View file

@ -2,6 +2,10 @@ etc/rc.d/rtc.sh
include/rtc.h include/rtc.h
modules/rtc.ko modules/rtc.ko
%%EXAMPLESDIR%%/test.c %%EXAMPLESDIR%%/test.c
%%MAKEDEV%%@exec mknod /dev/rtc c %%CDEV_MAJOR%% 0
@exec rm -f %%DEVDIR%%/rtc
@exec /usr/sbin/kldxref %D/modules
@unexec /usr/sbin/kldxref %D/modules
@dirrm %%EXAMPLESDIR%% @dirrm %%EXAMPLESDIR%%
@dirrmtry modules @dirrmtry modules
@unexec rm -f /dev/rtc @unexec rm -f /dev/rtc