diff options
-rw-r--r-- | emulators/rtc/Makefile | 15 | ||||
-rw-r--r-- | emulators/rtc/pkg-plist | 4 |
2 files changed, 13 insertions, 6 deletions
diff --git a/emulators/rtc/Makefile b/emulators/rtc/Makefile index 985e97796457..c55816096f29 100644 --- a/emulators/rtc/Makefile +++ b/emulators/rtc/Makefile @@ -7,7 +7,7 @@ PORTNAME= rtc PORTVERSION= 2004.02.24.1 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= emulators linux MASTER_SITES= # none DISTFILES= # none @@ -15,8 +15,6 @@ DISTFILES= # none MAINTAINER= freebsd-emulation@FreeBSD.org COMMENT= Kernel module which provides /dev/rtc device support -BROKEN= Incomplete pkg-plist - WRKSRC= ${WRKDIR}/files NO_FETCH= yes @@ -29,7 +27,8 @@ DEVDIR= ${LINUXBASE}/dev STARTUP= rtc.sh 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 @@ -39,6 +38,12 @@ SRC_BASE?= /usr/src IGNORE= needs a system more recent than 400013 .endif +.if ${OSVERSION} < 500104 +PLIST_SUB+= MAKEDEV="" +.else +PLIST_SUB+= MAKEDEV="@comment " +.endif + .if !exists(${SRC_BASE}/sys/Makefile) IGNORE= needs kernel source files .endif @@ -53,8 +58,6 @@ pre-install: ${MKDIR} ${KMODDIR} post-install: - ${RM} -f ${DEVDIR}/rtc - -mknod /dev/rtc c ${CDEV_MAJOR} 0 ${INSTALL_DATA} ${WRKSRC}/rtc.h ${PREFIX}/include/ ${MKDIR} ${PREFIX}/share/examples/rtc ${INSTALL_DATA} ${WRKSRC}/test.c ${PREFIX}/share/examples/rtc/ diff --git a/emulators/rtc/pkg-plist b/emulators/rtc/pkg-plist index 3126aac78695..fc31ceb62337 100644 --- a/emulators/rtc/pkg-plist +++ b/emulators/rtc/pkg-plist @@ -2,6 +2,10 @@ etc/rc.d/rtc.sh include/rtc.h modules/rtc.ko %%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%% @dirrmtry modules @unexec rm -f /dev/rtc |