From 9250841fb6a80d97c0d77c7827101cc2e176ad4d Mon Sep 17 00:00:00 2001 From: Doug Barton Date: Sun, 10 Jun 2012 22:02:00 +0000 Subject: [PATCH] I missed the fact that the Cmake stuff was installing the man page to ${PREFIX}/share/man/ instead of ${PREFIX}/man. Correct that, and add some code to the Makefile and the pkg-plist to remove the spurious file. Bump PORTREVISION so that users who've already installed this version can pick up the file removal fix sooner rather than later. --- x11/slim/Makefile | 8 ++++++++ x11/slim/pkg-plist | 3 +++ 2 files changed, 11 insertions(+) diff --git a/x11/slim/Makefile b/x11/slim/Makefile index 4b4c1b112bad..818c6259a51a 100644 --- a/x11/slim/Makefile +++ b/x11/slim/Makefile @@ -6,6 +6,7 @@ PORTNAME= slim PORTVERSION= 1.3.3 +PORTREVISION= 1 CATEGORIES= x11 MASTER_SITES= http://slim.berlios.de/releases/ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}${EXTRACT_SUFX}.release.asc @@ -41,10 +42,17 @@ post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/${PORTNAME}.conf @${REINPLACE_CMD} -e 's|"/etc"|"${PREFIX}/etc"|' \ -e 's|slim.conf|slim.conf.sample|' \ + -e 's|set(MANDIR "$${CMAKE_INSTALL_PREFIX}/share/man")|set(MANDIR "${PREFIX}/man")|' \ ${WRKSRC}/CMakeLists.txt @${MV} ${WRKSRC}/slim.conf ${WRKSRC}/slim.conf.sample @${REINPLACE_CMD} -e 's|std::snprintf|snprintf|' ${WRKSRC}/Ck.cpp +# Fix a previous bad install +pre-install: + @/bin/rm -f ${LOCALBASE}/share/man/man1/slim.1 + @/bin/rmdir ${LOCALBASE}/share/man/man1 2>/dev/null + @/bin/rmdir ${LOCALBASE}/share/man 2>/dev/null + post-install: @${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MAN1PREFIX}/man/man1 @if [ ! -f ${PREFIX}/etc/slim.conf ]; then \ diff --git a/x11/slim/pkg-plist b/x11/slim/pkg-plist index 759ecbbb4f07..279827a78b62 100644 --- a/x11/slim/pkg-plist +++ b/x11/slim/pkg-plist @@ -8,3 +8,6 @@ bin/slim @unexec if cmp -s %D/etc/slim.conf.sample %D/etc/slim.conf; then rm -f %D/etc/slim.conf; fi etc/slim.conf.sample @exec if [ ! -f %D/etc/slim.conf ] ; then cp -p %D/%F %B/slim.conf; fi +@exec /bin/rm -f %D/share/man/man1/slim.1 +@exec rmdir "%D/share/man/man1" 2>/dev/null || true +@exec rmdir "%D/share/man" 2>/dev/null || true