ports/157242: Updating port sysutils/swapexd for legacy compatibility

Jesse jessefrgsmith at yahoo.ca
Sat May 21 23:00:21 UTC 2011


>Number:         157242
>Category:       ports
>Synopsis:       Updating port sysutils/swapexd for legacy compatibility
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 21 23:00:19 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Jesse
>Release:        8.1
>Organization:
RM
>Environment:
FreeBSD 8.1 32-bit
>Description:
Please find attached a patch which should allow swapexd to build and install on FreeBSD legacy (7.x). The attached patch also prevents new installs from over-writing swapexd's configuration file.

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN /usr/ports/sysutils/swapexd/Makefile swapexd/Makefile
--- /usr/ports/sysutils/swapexd/Makefile	2011-04-27 07:54:11.000000000 -0300
+++ swapexd/Makefile	2011-05-21 16:45:58.000000000 -0300
@@ -15,15 +15,22 @@
 
 WRKSRC=	${WRKDIR}/${PORTNAME}
 
-PLIST_FILES=	sbin/${PORTNAME} etc/${PORTNAME}.conf etc/rc.d/swapexd
+PLIST_FILES=	sbin/${PORTNAME} etc/${PORTNAME}.conf.sample etc/rc.d/swapexd
+
+.include <bsd.port.pre.mk>
 
 post-patch:
 	@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/rc.d/swapexd
 	@${REINPLACE_CMD} -e "s,/etc/,${PREFIX}/etc/,g" ${WRKSRC}/swapexd.h
+.if ${OSVERSION} < 800076
+	@${REINPLACE_CMD} -e "s,swapctl -s -m ,swapctl -s -h ,g" ${WRKSRC}/swapexd.c
+.endif
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/sbin/
-	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}.conf
+	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}.conf.sample
 	${INSTALL_SCRIPT} ${WRKSRC}/rc.d/swapexd ${PREFIX}/etc/rc.d
 
-.include <bsd.port.mk>
+# .include <bsd.port.mk>
+.include <bsd.port.post.mk>
+


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list