Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 2016 21:49:53 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r408901 - head/x11-wm/swm
Message-ID:  <201602142149.u1ELnrw6006579@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Sun Feb 14 21:49:52 2016
New Revision: 408901
URL: https://svnweb.freebsd.org/changeset/ports/408901

Log:
  - Switch to options helpers
  - Simplify wrksrc and plist handling

Added:
  head/x11-wm/swm/pkg-plist   (contents, props changed)
Modified:
  head/x11-wm/swm/Makefile

Modified: head/x11-wm/swm/Makefile
==============================================================================
--- head/x11-wm/swm/Makefile	Sun Feb 14 21:47:29 2016	(r408900)
+++ head/x11-wm/swm/Makefile	Sun Feb 14 21:49:52 2016	(r408901)
@@ -3,6 +3,7 @@
 
 PORTNAME=	swm
 PORTVERSION=	1.3.4c
+PORTREVISION=	1
 CATEGORIES=	x11-wm
 MASTER_SITES=	http://www.small-window-manager.de/
 EXTRACT_SUFX=	-src.tgz
@@ -11,60 +12,55 @@ MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Window manager for low-memory systems, with title bars and shading
 
 LICENSE=	GPLv2
-LICENSE_FILE=	${WRKSRC}/../doc/COPYING
+LICENSE_FILE=	${WRKSRC}/doc/COPYING
 
-WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:S,c,,}/src
+WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:S,c,,}
+BUILD_WRKSRC=	${WRKSRC}/src
 
 USE_XORG=	xpm
 USES=		gmake
 MAKEFILE=	Makefile-xpm
 MAKE_ARGS=	CFLAGS="${CFLAGS}" LDFLAGS="" CC="${CC}" XROOT="${LOCALBASE}"
 
-OPTIONS_DEFINE=	DOCS EXAMPLES
-
 PORTDOCS=	*
-PORTEXAMPLES=	* .swm
-PLIST_FILES=	${BINS:S,^,bin/,} ${SCRIPTS:S,^,bin/,} \
-		${DATA:S,^,%%DATADIR%%/pixmaps/,} \
-		man/man1/swm.1.gz man/man1/swmbg.1.gz man/man1/swmswitch.1.gz \
-		man/de/man1/swm.1.gz man/de/man1/swmbg.1.gz man/de/man1/swmswitch.1.gz
-
-BINS=		swm swmbg swmswitch
-SCRIPTS=	startswm
-DATA=		background.xpm closebox.xpm maxbox.xpm stickybox.xpm \
-		swm.colors unstickybox.xpm
+PORTEXAMPLES=	*
 
 MAKE_JOBS_UNSAFE=	yes
 
+OPTIONS_DEFINE=	DOCS EXAMPLES
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|monotype|fixed|g ; \
-		 s|/usr/share/swm|${DATADIR}|g' ${WRKSRC}/swm.conf
+		 s|/usr/share/swm|${DATADIR}|g' ${WRKSRC}/src/swm.conf
 
 post-build:
-	cd ${WRKSRC}/../swmbg && ${CC} ${CFLAGS} -I${LOCALBASE}/include \
-		*.c -o ${WRKSRC}/swmbg -lX11 -lXext -lXpm -L${LOCALBASE}/lib
-	cd ${WRKSRC}/../swmswitch && ${CC} ${CFLAGS} -I${LOCALBASE}/include \
-		*.c -o ${WRKSRC}/swmswitch -lX11 -L${LOCALBASE}/lib
+	cd ${WRKSRC}/swmbg && ${CC} ${CFLAGS} -I${LOCALBASE}/include \
+		*.c -o ${WRKSRC}/src/swmbg -lX11 -lXext -lXpm -L${LOCALBASE}/lib
+	cd ${WRKSRC}/swmswitch && ${CC} ${CFLAGS} -I${LOCALBASE}/include \
+		*.c -o ${WRKSRC}/src/swmswitch -lX11 -L${LOCALBASE}/lib
 
 do-install:
-.for f in ${BINS}
-	${INSTALL_PROGRAM} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin
+.for f in swm swmbg swmswitch
+	${INSTALL_PROGRAM} ${WRKSRC}/src/${f} ${STAGEDIR}${PREFIX}/bin
 .endfor
-.for f in ${SCRIPTS}
-	${INSTALL_SCRIPT} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin
-.endfor
-	${INSTALL_MAN} ${WRKSRC}/swm.1x ${STAGEDIR}${MANPREFIX}/man/man1/swm.1
-	${INSTALL_MAN} ${WRKSRC}/../swmbg/swmbg.1x ${STAGEDIR}${MANPREFIX}/man/man1/swmbg.1
-	${INSTALL_MAN} ${WRKSRC}/../swmswitch/swmswitch.1x ${STAGEDIR}${MANPREFIX}/man/man1/swmswitch.1
+	${INSTALL_SCRIPT} ${WRKSRC}/src/startswm ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_MAN} ${WRKSRC}/src/swm.1x ${STAGEDIR}${MANPREFIX}/man/man1/swm.1
+	${INSTALL_MAN} ${WRKSRC}/swmbg/swmbg.1x ${STAGEDIR}${MANPREFIX}/man/man1/swmbg.1
+	${INSTALL_MAN} ${WRKSRC}/swmswitch/swmswitch.1x ${STAGEDIR}${MANPREFIX}/man/man1/swmswitch.1
 	@${MKDIR} ${STAGEDIR}${MANPREFIX}/man/de/man1
-	${INSTALL_MAN} ${WRKSRC}/swm-de.1x ${STAGEDIR}${MANPREFIX}/man/de/man1/swm.1
-	${INSTALL_MAN} ${WRKSRC}/../swmbg/swmbg-de.1x ${STAGEDIR}${MANPREFIX}/man/de/man1/swmbg.1
-	${INSTALL_MAN} ${WRKSRC}/../swmswitch/swmswitch-de.1x ${STAGEDIR}${MANPREFIX}/man/de/man1/swmswitch.1
+	${INSTALL_MAN} ${WRKSRC}/src/swm-de.1x ${STAGEDIR}${MANPREFIX}/man/de/man1/swm.1
+	${INSTALL_MAN} ${WRKSRC}/swmbg/swmbg-de.1x ${STAGEDIR}${MANPREFIX}/man/de/man1/swmbg.1
+	${INSTALL_MAN} ${WRKSRC}/swmswitch/swmswitch-de.1x ${STAGEDIR}${MANPREFIX}/man/de/man1/swmswitch.1
 	@${MKDIR} ${STAGEDIR}${DATADIR}
-	cd ${WRKSRC}/../share/swm && ${COPYTREE_SHARE} pixmaps ${STAGEDIR}${DATADIR}
+	cd ${WRKSRC}/share/swm && ${COPYTREE_SHARE} pixmaps ${STAGEDIR}${DATADIR}
+
+do-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-	cd ${WRKSRC}/../doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
+
+do-install-EXAMPLES-on:
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
-	cd ${WRKSRC}/../examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
+	cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
+	cd ${STAGEDIR}${EXAMPLESDIR} && ${MV} .swm dot.swm
 
 .include <bsd.port.mk>

Added: head/x11-wm/swm/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/swm/pkg-plist	Sun Feb 14 21:49:52 2016	(r408901)
@@ -0,0 +1,16 @@
+bin/startswm
+bin/swm
+bin/swmbg
+bin/swmswitch
+man/de/man1/swm.1.gz
+man/de/man1/swmbg.1.gz
+man/de/man1/swmswitch.1.gz
+man/man1/swm.1.gz
+man/man1/swmbg.1.gz
+man/man1/swmswitch.1.gz
+%%DATADIR%%/pixmaps/background.xpm
+%%DATADIR%%/pixmaps/closebox.xpm
+%%DATADIR%%/pixmaps/maxbox.xpm
+%%DATADIR%%/pixmaps/stickybox.xpm
+%%DATADIR%%/pixmaps/swm.colors
+%%DATADIR%%/pixmaps/unstickybox.xpm



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602142149.u1ELnrw6006579>