From owner-freebsd-ports@FreeBSD.ORG Sun Dec 2 23:46:51 2007 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D7D616A476 for ; Sun, 2 Dec 2007 23:46:51 +0000 (UTC) (envelope-from mezz7@cox.net) Received: from eastrmmtao104.cox.net (eastrmmtao104.cox.net [68.230.240.46]) by mx1.freebsd.org (Postfix) with ESMTP id D3E1C13C4D9 for ; Sun, 2 Dec 2007 23:46:50 +0000 (UTC) (envelope-from mezz7@cox.net) Received: from eastrmimpo02.cox.net ([68.1.16.120]) by eastrmmtao104.cox.net (InterMail vM.7.08.02.01 201-2186-121-102-20070209) with ESMTP id <20071202234648.JDUA21580.eastrmmtao104.cox.net@eastrmimpo02.cox.net>; Sun, 2 Dec 2007 18:46:48 -0500 Received: from mezz.mezzweb.com ([24.255.149.218]) by eastrmimpo02.cox.net with bizsmtp id Kzma1Y0054iy4EG0000000; Sun, 02 Dec 2007 18:46:34 -0500 Date: Sun, 02 Dec 2007 17:51:44 -0600 To: GP From: "Jeremy Messenger" Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 References: <002401c8352b$9ba33750$6300000a@pi> Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: <002401c8352b$9ba33750$6300000a@pi> User-Agent: Opera Mail/9.24 (Linux) Cc: freebsd-ports@freebsd.org Subject: Re: HELP needed by experienced porter for simple review X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Dec 2007 23:46:51 -0000 On Sun, 02 Dec 2007 15:37:57 -0600, GP wrote: > Ok. thanks. > Its simple so I will just put in in this mail. > I hope to have the ability to make changes in the source, so I've > included > the proposed application > Makefile as well. > Its all working, but I would like to know if the concepts are sound? > > Portlint throws a warning, but I don't se any reasonable way arrount > that: > > /usr/ports/distfiles>portlint > WARN: Makefile: possible use of absolute pathname "/etc/rc.conf.bak". > 0 fatal errors and 1 warning found. Follow Doug's suggest, this will disappear. I agree with him about never edit rc.conf without our knowledge. You can see in x11/gdm/Makefile for PKGMESSAGE and x11/gdm/pkg-message to get idea for how to warn users to add in rc.conf. See below for more feedbacks: > Root > Makefile: > -------------------------------------------------------------------------------------- > > # New ports collection makefile for: kissdx > # Date created: 20. November 2007 > # Whom: Simon I. Rigét > # > # $FreeBSD$ > > PORTNAME= kissdx > PORTVERSION= 0.13.10a > CATEGORIES= multimedia net > MASTER_SITES= http://freebsd.paragi.dk/kissdx/ \ > http://kissdx.vidartysse.net/ > DISTNAME= ${PORTNAME}-${PORTVERSION} You can remove DISTNAME; it's not need and it is on what you want by default. > MAINTAINER= freebsd@paragi.dk > COMMENT= A multimedia streaming server for KiSS/Linksys player > > USE_ICONV= yes > > # Dependencies of other packeges > LIB_DEPENDS= libdvdread:${PORTSDIR}/multimedia/libdvdread \ > libiconv:${PORTSDIR}/converters/libiconv \ Remove libiconv, since the USE_ICONV=yes takes care of that. > gd-2:${PORTSDIR}/graphics/gd It should be 'gd.4' or just 'gd'. > jpeg-6b_4:${PORTSDIR}/graphics/jpeg It should be 'jpeg.9' or just 'jpeg'. See here: http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-depend.html#AEN2056 > # Man pages > MAN1= kissdx.1 > MANCOMPRESSED= yes Remove MANCOMPRESSED; it is turn on by default. > # RC start and stop service > USE_RC_SUBR= kissdx > > # set enviroment variables for port makefile > MAKE_ENV= FreeBSD=defined > > # Convert CR/LF to LF in source files > USE_DOS2UNIX= yes > > post-patch: > ${REINPLACE_CMD} -e 's|Linux|Unix|g' ${WRKSRC}/kissdx.1 > ${REINPLACE_CMD} -e 's|/etc/|/usr/local/etc/|' ${WRKSRC}/kissdx.1 > $(GZIP_CMD) -c ${INSTALL_WRKSRC}/kissdx.1 >${INSTALL_WRKSRC}/kissdx.1.gz Remove this GZIP_CMD line, it will compressing manpage by default unless user has MANCOMPRESSED sets to no or set to bzip2 rather than gzip. > $(MKDIR) $(FILESDIR) > $(CP) ${WRKSRC}/kissdx.in ${FILESDIR} I don't really like to create FILESDIR and move from WRKSRC to FILESDIR. The WRKDIR/WRKSRC are the place where you work anything inside. However, move from WRKSRC to FILESDIR might create problem in future so avoid that. > do-install: all > $(INSTALL_PROGRAM) ${INSTALL_WRKSRC}/kissdx ${TARGETDIR}/sbin/kissdx > $(INSTALL_DATA) ${INSTALL_WRKSRC}/kissdx.conf > ${TARGETDIR}/etc/kissdx.conf > $(INSTALL_MAN) ${INSTALL_WRKSRC}/kissdx.1.gz > ${TARGETDIR}/man/man1/kissdx.1.gz s/kissdx.1.gz/kissdx.1/g after you modify above, then change from TARGETDIR to MANPREFIX. > echo "kissdx_enabled=\"YES\"" >> /etc/rc.conf > > do-deinstall: > $(RM) ${TARGETDIR}/sbin/kissdx > $(RM) ${TARGETDIR}/etc/kissdx.conf > $(RM) ${TARGETDIR}/man/man1/kissdx.* > $(RM) ${TARGETDIR}/etc/rc.d/kissdx > $(CP) ${/etc/rc.conf} ${/etc/rc.conf}.bak > ${GREP} -v kissdx_ /etc/rc.conf.bak >/etc/rc.conf We don't need the do-deinstall target, so remove all of that. We have 'pkg_delete' and 'make deinstall'. > .include > > > > pkg-plist: > ------------------------------------------------------------------------------------ > > sbin/kissdx > etc/kissdx.conf > etc/rc.d/kissdx Remove 'etc/rc.d/kissdx' since that USE_RC_SUBR takes care of it. So it will be two lines in pkg-plist, so I suggest you to remove pkg-plist and use PLIST_FILES in Makefile to take care of these files. I think that's all for now. Most of answers are in the porter handbook. http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/ Cheers, Mezz > Application > Makefile: > ------------------------------------------------------------------------------------ -- mezz7@cox.net - mezz@FreeBSD.org FreeBSD GNOME Team - FreeBSD Multimedia Hat (ports, not src) http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org http://wiki.freebsd.org/multimedia - multimedia@FreeBSD.org