Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jan 2012 22:11:15 +0100
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Da Rock <freebsd-ports@herveybayaustralia.com.au>
Cc:        Chris Rees <crees@freebsd.org>, freebsd-ports@freebsd.org, gljennjohn@googlemail.com
Subject:   Re: linux-f10-nss_ldap: my first port - be gentle :)
Message-ID:  <20120110221115.00007dc1@unknown>
In-Reply-To: <4F0A8164.9090502@herveybayaustralia.com.au>
References:  <4F0446B7.4090703@herveybayaustralia.com.au> <20120104142757.1c77c347@ernst.jennejohn.org> <4F04E648.9090206@herveybayaustralia.com.au> <20120105121825.656677e4@ernst.jennejohn.org> <20120106221610.00005fbe@unknown> <CADLo83-YUtUgAw_r2QNpB2mPxbvPfV0vCRMih-ncAQBCWj73LQ@mail.gmail.com> <20120108160316.00003d59@unknown> <4F0A8164.9090502@herveybayaustralia.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 09 Jan 2012 15:55:48 +1000 Da Rock
<freebsd-ports@herveybayaustralia.com.au> wrote:

> Now my Makefile looks like this:
> 
> # New ports collection makefile for:    linux-f10-nss_ldap
> # Date created:                         2012-01-04
> # Whom:                                 da porta 
> port_maintainer@herveybayaustralia.com.au
> #
> # $FreeBSD$
> #
> 
> PORTNAME=        nss_ldap
> PORTVERSION=    0.01

The PORTVERSION looks a little bit off to me. I would use something
like ${NSS_LDAP_VERSION} or ${NSS_LDAP_VERSION}.${RPMVERSION} (the
later may look a little bit strange... or not) to make it easy to
compare what is installed on a system with what is available on linux.

> CATEGORIES=        net linux
> MASTER_SITES=   
> ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora/linux/updates/testing/10/i386/ 
> \
>                  
> http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/10/Everything/i386/os/Packages/ 
> \
>                  http://herveybayaustralia.com.au/ports/distfiles/

I can't remember if we have the fedora archives in bsd.sites.mk (if
not, it would be worth to add it), and I'm too lazy ATM to search for
it. If we have them (and they are OK), it would be better to use the
bsd.sites.mk shortcodes for them. This would change automatically the
master sites for this port if they are changed/improved in bsd.sites.mk.

> PKGNAMEPREFIX=    linux-f10-
> DISTNAME=        ${PORTNAME}-${NSS_LDAP_VERSION}-${RPMVERSION}
> 
> MAINTAINER=        port_maintainer@herveybayaustralia.com.au
> COMMENT=        RFC 2307 NSS Module (Linux Fedora 10)
> 
> LICENSE=        GPLv2
> 
> NSS_LDAP_VERSION=264
> 
> USE_LINUX_RPM=  yes
> USE_LINUX_PREFIX=yes

Hmmm... I would expect that USE_LINUX_RPM automatically sets
USE_LINUX_PREFIX... to be verified.

> LINUX_DIST_VER= 10
> RPMVERSION=     6.fc10
> USE_LDCONFIG=    yes
> 
> PLIST_FILES=    usr/lib/libnss_ldap.so.2 usr/lib/libnss_ldap.so 
> usr/lib/libnss_ldap-264.so
> DOCSDIR=        
> ${PREFIX}/usr/share/doc/${PKGNAMEPREFIX}-${PORTNAME}-${PORTVERSION}
> PORTDOCS=        COPYING NEWS README THANKS TODO
> DESCR=            ${.CURDIR}/../${PORTNAME}/pkg-descr
> 
> post-extract:
>                  .if !defined(WITH_PAM)
>                      @if [ -f ${WRKDIR}/lib/security/pam_ldap.so ];
> then \ rm -rf ${WRKDIR}/lib/
>                      fi
>                      @if [ -f 
> ${WRKDIR}/usr/share/doc/nss_ldap-264/COPYING.pam_ldap ]; then \
>                          rm -rf
> ${WRKDIR}/usr/share/doc/nss_ldap-264/*.pam* fi
>                  .else
>                      PLIST_FILES+=lib/security/pam_ldap.so \
>                          usr/share/doc/nss_ldap-264/AUTHORS.pam_ldap \
>                          usr/share/doc/nss_ldap-264/COPYING.LIB.pam_ldap
> \ usr/share/doc/nss_ldap-264/COPYING.pam_ldap \
>                          usr/share/doc/nss_ldap-264/ChangeLog.pam_ldap
> \ usr/share/doc/nss_ldap-264/NEWS.pam_ldap \
>                          usr/share/doc/nss_ldap-264/README.pam_ldap \
>                          usr/share/doc/nss_ldap-264/ldap.conf.pma_ldap
>                  .endif
>                  @if [ -f ${WRKDIR}/etc/ldap.conf ]; then \
>                      ${MV} -p ${WRKDIR}/etc/ldap.conf 
> ${WRKDIR}/etc/ldap.conf.dist;
>                  fi
>                  PLIST_FILES+=usr/share/doc
> 
> post-install:
>                  @${CAT} ${PKGMESSAGE}
> 
> .include <bsd.port.mk>

> The man pages under the linux chroot, but the docs I thought would go 
> into the /usr/share/doc/as linux-f10-nss_ldap?

If you are talking about the FreeBSD location /usr/share/doc and not
the linux location /compat/linux/usr/share/doc:
Linux ports are special to this. In the linux base we do not "bend the
install" to put some stuff outside of /compat/linux.

If you talk about the linux location: we do not bend the stuff
inside /compat/linux to complay to the FreeBSD hier-man-page.

Or short: let the RPM install the files where it wants to have them. Do
not move them around.

> On an aside I noticed that there is a better site to use straight up
> for linux dist rpms- see the MASTER_SITES list in the Makefile. Might
> be a good idea to update the list under MASTER_SITE_FEDORA_LINUX to
> include these first? The others seem rather empty.

My comment above for bsd.sites.mk was something like you suggest here,
just that it should be MASTER_SITE_FEDORA_LINUX_ARCHIVE or similar (I
hope that the MASTER_SITE_FEDORA_LINUX could be useful as it is for an
hypothetic (= nobody works on something like this ATM) update of the
default linux_base port).

Bye,
Alexander.

-- 
http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137



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