HELP needed by experienced porter for simple review

Jeremy Messenger mezz7 at cox.net
Sun Dec 2 15:46:51 PST 2007


On Sun, 02 Dec 2007 15:37:57 -0600, GP <godpost at gmail.com> wrote:

<snip>
>  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 at 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 <bsd.port.mk>
>
>
>
>  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:  
> ------------------------------------------------------------------------------------
<snip>


-- 
mezz7 at cox.net  -  mezz at FreeBSD.org
FreeBSD GNOME Team  -  FreeBSD Multimedia Hat (ports, not src)
http://www.FreeBSD.org/gnome/  -  gnome at FreeBSD.org
http://wiki.freebsd.org/multimedia  -  multimedia at FreeBSD.org


More information about the freebsd-ports mailing list