Bug 183738 - [PATCH] sysutils/3dm: Convert to staging
Summary: [PATCH] sysutils/3dm: Convert to staging
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Rene Ladan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-07 04:40 UTC by takefu
Modified: 2014-04-06 14:30 UTC (History)
1 user (show)

See Also:


Attachments
3dm-2.11.00.019,1.patch (4.46 KB, patch)
2013-11-07 04:40 UTC, takefu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description takefu 2013-11-07 04:40:00 UTC
fix
  Convert to staging

Port maintainer (ports.maintainer@evilphi.com) is cc'd.
Comment 1 Edwin Groothuis freebsd_committer 2013-11-07 04:40:11 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer 2013-11-07 04:40:11 UTC
Maintainer of sysutils/3dm,

Please note that PR ports/183738 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/183738

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Rin Morningstar 2013-11-10 20:06:56 UTC
Actually, are you interested in taking maintainership?
Comment 4 takefu 2014-03-10 02:19:13 UTC
There is no interest.
Comment 5 Rene Ladan freebsd_committer 2014-04-06 13:53:37 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rene

Take
Comment 6 Rene Ladan freebsd_committer 2014-04-06 14:26:28 UTC
State Changed
From-To: feedback->closed

Committed with additional cleanups, thanks
Comment 7 dfilter service freebsd_committer 2014-04-06 14:26:30 UTC
Author: rene
Date: Sun Apr  6 13:26:24 2014
New Revision: 350355
URL: http://svnweb.freebsd.org/changeset/ports/350355
QAT: https://qat.redports.org/buildarchive/r350355/

Log:
  - Stage support (hopefully got the /etc/3dm2/* files correct) [1]
  - Simplify BINSUFFIX handling [1]
  - Silence post-extract [1]
  - Convert pkg-message to pkg-message.in, move the display part of the
    post-install target here
  - Drop support for FreeBSD < 7.0
  - Convert to bsd.port.options.mk
  
  Files seem unfetchable except from the FreeBSD mirror, and maintainer seems
  to have lost interest.
  
  PR:		ports/183738 [1]
  Submitted by:	Takefu <takefu@airport.fm>
  Reviewed by:	maintainer
  Approved by:	portmgr (blanket infrastructure)

Added:
  head/sysutils/3dm/files/pkg-message.in
     - copied, changed from r350348, head/sysutils/3dm/pkg-message
Deleted:
  head/sysutils/3dm/pkg-message
Modified:
  head/sysutils/3dm/Makefile
  head/sysutils/3dm/pkg-plist

Modified: head/sysutils/3dm/Makefile
==============================================================================
--- head/sysutils/3dm/Makefile	Sun Apr  6 12:08:30 2014	(r350354)
+++ head/sysutils/3dm/Makefile	Sun Apr  6 13:26:24 2014	(r350355)
@@ -15,12 +15,12 @@ COMMENT=	3ware RAID controller monitorin
 
 USE_RC_SUBR=	3dm2
 
+SUB_FILES=	pkg-message
+
 OPTIONS_DEFINE=	SSLFIX
 SSLFIX_DESC=	Install KB16625-patched binaries
-
 OPTIONS_DEFAULT=	SSLFIX
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if !empty(PORT_OPTIONS:MSSLFIX)
@@ -30,84 +30,48 @@ BINPREFIX=	${WRKSRC}/kb16625
 BINPREFIX=	${WRKSRC}
 .endif
 
-.include <bsd.port.pre.mk>
-
 ONLY_FOR_ARCHS=	i386 amd64
 NO_BUILD=	yes
-
 NO_WRKSUBDIR=	yes
 
-.if ${OSVERSION} > 700000
 BINSRC=		${BINPREFIX}/7x
-.else
-BINSRC=		${BINPREFIX}/6x
-.endif
-
-.if ${ARCH} == "i386"
-BINSUFFIX=	x86
-.elif ${ARCH} == "amd64"
-BINSUFFIX=	x86_64
-.endif
-
 HELPSRC=	${WRKSRC}/en
-
 HELPDIR=	${PREFIX}/share/3dm2/help/en
 ETCDIR=		${PREFIX}/etc/3dm2
 MSGDIR=		${ETCDIR}/msg
 
 post-extract:
-	${TAR} zxf ${WRKSRC}/tdm2Help.tgz -C ${WRKSRC}
-	${TAR} zxf ${WRKSRC}/tdm2Msg.tgz -C ${WRKSRC}
+	@${TAR} zxf ${WRKSRC}/tdm2Help.tgz -C ${WRKSRC}
+	@${TAR} zxf ${WRKSRC}/tdm2Msg.tgz -C ${WRKSRC}
 
 post-configure:
 	@${SED} -e 's,%%PREFIX%%,${PREFIX},g' \
 	< ${FILESDIR}/3dm2.conf.sample > ${WRKSRC}/3dm2.conf.sample
 
 do-install:
-.for i in ${ETCDIR} ${MSGDIR} ${HELPDIR}/css ${HELPDIR}/images ${HELPDIR}/scripts
-.if !exists(${i})
-	${MKDIR} ${i}
-.endif
+.for i in ${ETCDIR} ${MSGDIR} ${HELPDIR} \
+    ${HELPDIR}/css ${HELPDIR}/images ${HELPDIR}/scripts
+	${MKDIR} ${STAGEDIR}${PREFIX}${i}
+	# XXX rene not sure why ${PREFIX} is ommitted from ${i} here
 .endfor
-
-	${INSTALL_DATA} ${HELPSRC}/*.html ${HELPDIR}
-	${INSTALL_DATA} ${HELPSRC}/*.gif ${HELPDIR}
-	${INSTALL_DATA} ${HELPSRC}/*.jpg ${HELPDIR}
-	${INSTALL_DATA} ${HELPSRC}/css/* ${HELPDIR}/css
-	${INSTALL_DATA} ${HELPSRC}/images/* ${HELPDIR}/images
-	${INSTALL_DATA} ${HELPSRC}/scripts/* ${HELPDIR}/scripts
-
-	${INSTALL_PROGRAM} ${BINSRC}/3dm2.${BINSUFFIX} ${PREFIX}/sbin/3dm2
-
-	${INSTALL_DATA} ${WRKSRC}/tdm_msg_en ${MSGDIR}
-	${INSTALL_DATA} ${WRKSRC}/tw_msg_en ${MSGDIR}
-
-	${INSTALL_DATA} ${WRKSRC}/3dm2.conf.sample ${ETCDIR}
-	${CHMOD} 400 ${ETCDIR}/3dm2.conf.sample
-
-post-install:
-.if !exists(${PREFIX}/etc/3dm2/3dm2.conf)
-	${INSTALL_DATA} ${WRKSRC}/3dm2.conf.sample ${PREFIX}/etc/3dm2/3dm2.conf
-	${CHMOD} 600 ${PREFIX}/etc/3dm2/3dm2.conf
-	@${ECHO} ""
-	@${ECHO} ""
-	@${ECHO} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-	@${ECHO} "        Don't forget to edit '${PREFIX}/etc/3dm2/3dm2.conf'"
-	@${ECHO} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-	@${ECHO} "             Visit https://`hostname`:888/"
-	@${ECHO} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-	@${ECHO} ""
-	@${ECHO} ""
-.endif
+	${INSTALL_DATA} ${HELPSRC}/*.html ${STAGEDIR}${HELPDIR}
+	${INSTALL_DATA} ${HELPSRC}/*.gif ${STAGEDIR}${HELPDIR}
+	${INSTALL_DATA} ${HELPSRC}/*.jpg ${STAGEDIR}${HELPDIR}
+	${INSTALL_DATA} ${HELPSRC}/css/* ${STAGEDIR}${HELPDIR}/css
+	${INSTALL_DATA} ${HELPSRC}/images/* ${STAGEDIR}${HELPDIR}/images
+	${INSTALL_DATA} ${HELPSRC}/scripts/* ${STAGEDIR}${HELPDIR}/scripts
+
+	${INSTALL_PROGRAM} ${BINSRC}/3dm2.${ARCH:S,i386,x86,:S,amd64,x86_64,}\
+		${STAGEDIR}${PREFIX}/sbin/3dm2
+
+	${INSTALL_DATA} ${WRKSRC}/tdm_msg_en ${STAGEDIR}${MSGDIR}
+	${INSTALL_DATA} ${WRKSRC}/tw_msg_en ${STAGEDIR}${MSGDIR}
+	${INSTALL_DATA} ${WRKSRC}/3dm2.conf.sample ${STAGEDIR}${ETCDIR}
 
 # 3ware uses a hardcoded config dir location that doesn't match hier(9)
 
-.if !exists(/etc/3dm2)
-	@${MKDIR} /etc/3dm2
-.endif
-	@${LN} -s ${PREFIX}/etc/3dm2/3dm2.conf /etc/3dm2/3dm2.conf
-	@${LN} -s ${PREFIX}/etc/3dm2/3dm2.pem /etc/3dm2/3dm2.pem
-
-	@${CAT} ${PKGMESSAGE}
+	${MKDIR} ${STAGEDIR}/etc/3dm2
+	(cd ${STAGEDIR} && ${LN} -s ${PREFIX}/etc/3dm2/3dm2.conf etc/3dm2/3dm2.conf)
+	(cd ${STAGEDIR} && ${LN} -s ${PREFIX}/etc/3dm2/3dm2.pem etc/3dm2/3dm2.pem)
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Copied and modified: head/sysutils/3dm/files/pkg-message.in (from r350348, head/sysutils/3dm/pkg-message)
==============================================================================
--- head/sysutils/3dm/pkg-message	Sun Apr  6 10:07:13 2014	(r350348, copy source)
+++ head/sysutils/3dm/files/pkg-message.in	Sun Apr  6 13:26:24 2014	(r350355)
@@ -1,3 +1,5 @@
 
 To run 3DM2 at startup, add twdm2_enable="YES" to your /etc/rc.conf.
 
+        Do not forget to edit '%%PREFIX%%/etc/3dm2/3dm2.conf'
+        Visit https://`hostname`:888/

Modified: head/sysutils/3dm/pkg-plist
==============================================================================
--- head/sysutils/3dm/pkg-plist	Sun Apr  6 12:08:30 2014	(r350354)
+++ head/sysutils/3dm/pkg-plist	Sun Apr  6 13:26:24 2014	(r350355)
@@ -1,7 +1,9 @@
 @stopdaemon 3dm2
 @unexec if cmp -s %D/etc/3dm2/3dm2.conf.sample %D/etc/3dm2/3dm2.conf; then rm -f %D/etc/3dm2/3dm2.conf; fi
+@mode 0400
 etc/3dm2/3dm2.conf.sample
-@exec if [ ! -f %B/3dm2.conf ] ; then cp -p %D/%F %B/3dm2.conf && chmod 600 %B/3dm2.conf; fi
+@mode
+@exec if [ ! -f %B/3dm2.conf ] ; then cp -p %D/%F %B/3dm2.conf && chmod 0600 %B/3dm2.conf; fi
 etc/3dm2/msg/tdm_msg_en
 etc/3dm2/msg/tw_msg_en
 sbin/3dm2
@@ -378,8 +380,10 @@ share/3dm2/help/en/scripts/expand.js
 share/3dm2/help/en/scripts/seealso.js
 share/3dm2/help/en/sqbullet.gif
 share/3dm2/help/en/toc.html
-@unexec unlink /etc/3dm2/3dm2.conf
-@unexec unlink /etc/3dm2/3dm2.pem
+@cwd /
+etc/3dm2/3dm2.conf
+etc/3dm2/3dm2.pem
+@cwd
 @unexec rmdir /etc/3dm2 2>/dev/null || true
 @dirrmtry etc/3dm2/msg
 @dirrmtry etc/3dm2
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"