From owner-freebsd-ports@FreeBSD.ORG Wed Jan 11 00:48:10 2012 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 8E8C2106566B for ; Wed, 11 Jan 2012 00:48:10 +0000 (UTC) (envelope-from freebsd-ports@herveybayaustralia.com.au) Received: from mail.unitedinsong.com.au (mail.unitedinsong.com.au [150.101.178.33]) by mx1.freebsd.org (Postfix) with ESMTP id 4F8408FC12 for ; Wed, 11 Jan 2012 00:48:09 +0000 (UTC) Received: from laptop1.herveybayaustralia.com.au (laptop1.herveybayaustralia.com.au [192.168.0.179]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.unitedinsong.com.au (Postfix) with ESMTPSA id 1345C5C26 for ; Wed, 11 Jan 2012 11:00:37 +1000 (EST) Message-ID: <4F0CDB5B.9030402@herveybayaustralia.com.au> Date: Wed, 11 Jan 2012 10:44:11 +1000 From: Da Rock User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111109 Thunderbird/7.0.1 MIME-Version: 1.0 To: freebsd-ports@freebsd.org References: <4F0446B7.4090703@herveybayaustralia.com.au> <20120104142757.1c77c347@ernst.jennejohn.org> <4F04E648.9090206@herveybayaustralia.com.au> <20120105121825.656677e4@ernst.jennejohn.org> <20120106221610.00005fbe@unknown> <20120108160316.00003d59@unknown> <4F0A8164.9090502@herveybayaustralia.com.au> <20120110221115.00007dc1@unknown> In-Reply-To: <20120110221115.00007dc1@unknown> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: linux-f10-nss_ldap: my first port - be gentle :) 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: Wed, 11 Jan 2012 00:48:10 -0000 On 01/11/12 07:11, Alexander Leidinger wrote: > On Mon, 09 Jan 2012 15:55:48 +1000 Da Rock > 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. Yeah, I'm still stuck on that - trying to find more info on what to use there. I've checked the handbook cover to cover, but still haven't discovered anything. I've left it till last to work out. >> 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. I'm not 100% sure about the fedora archives, but I don't think they're exactly right. I keep getting (in most linux ports) a hunt through the MASTER_SITES for the file, starting with the archives. The other pbone.net is definitely not in the sites list. I did check that file thoroughly using grep and by manual sighting. One thing to note though is that when I tried with MASTER_SITES set to the FEDORA_LINUX set it failed to find the files. Also the files I need are only on pbone.net- they are more recent than the original. Or can I set the rpm version to "float" a bit? >> 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. Possibly. I just wanted to be sure. I'll try it with it removed once I get it working correctly. >> 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 >> 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. Ok, ok, I'll leave them alone :) I did mention that I was over-thinking things before... I am pedantic enough to stick by the rules though. >> 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). My last problem is with the define knobs. I have an .if defined(WITH_PAM) .else ... .endif statement, but it keeps giving me trouble. I can't quite figure what I've got wrong. The statement looks like this: 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= usr/share/doc/nss_ldap-264/ANNOUNCE.nss_ldap \ usr/share/doc/nss_ldap-264/AUTHORS.nss_ldap \ usr/share/doc/nss_ldap-264/COPYING.nss_ldap \ usr/share/doc/nss_ldap-264/ChangeLog.nss_ldap \ usr/share/doc/nss_ldap-264/NEWS.nss_ldap \ usr/share/doc/nss_ldap-264/README.nss_ldap \ usr/share/doc/nss_ldap-264/README.TLS \ usr/share/doc/nss_ldap-264/ldap.conf.nss_ldap \ usr/share/doc/nss_ldap-264/ldapns.schema \ usr/share/doc/nss_ldap-264/ns-pwd-policy.schema \ usr/share/doc/nss_ldap-264/nsswitch.ldap MAN5= usr/share/man/man5/nss_ldap.5.gz DESCR= ${.CURDIR}/../${PORTNAME}/pkg-descr pre-fetch: @${ECHO_MSG} "Use WITH_PAM if you require more advanced ldap support in the linuxulator" post-extract: .if defined(WITH_PAM) PLIST_FILES+=lib/security/pam_ldap.so PORTDOCS+=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 \ usr/share/doc/nss_ldap-264/pam.d/chfn \ usr/share/doc/nss_ldap-264/pam.d/kde \ usr/share/doc/nss_ldap-264/pam.d/passwd \ usr/share/doc/nss_ldap-264/pam.d/rlogin \ usr/share/doc/nss_ldap-264/pam.d/vlock \ usr/share/doc/nss_ldap-264/pam.d/chsh \ usr/share/doc/nss_ldap-264/pam.d/linuxconf \ usr/share/doc/nss_ldap-264/pam.d/pop \ usr/share/doc/nss_ldap-264/pam.d/rsh \ usr/share/doc/nss_ldap-264/pam.d/xdm \ usr/share/doc/nss_ldap-264/pam.d/ftp \ usr/share/doc/nss_ldap-264/pam.d/linuxconf-pair \ usr/share/doc/nss_ldap-264/pam.d/poweroff \ usr/share/doc/nss_ldap-264/pam.d/samba \ usr/share/doc/nss_ldap-264/pam.d/xlock \ usr/share/doc/nss_ldap-264/pam.d/gdm \ usr/share/doc/nss_ldap-264/pam.d/login \ usr/share/doc/nss_ldap-264/pam.d/ppp \ usr/share/doc/nss_ldap-264/pam.d/shutdown \ usr/share/doc/nss_ldap-264/pam.d/xscreensaver \ usr/share/doc/nss_ldap-264/pam.d/halt \ usr/share/doc/nss_ldap-264/pam.d/mcserv \ usr/share/doc/nss_ldap-264/pam.d/reboot \ usr/share/doc/nss_ldap-264/pam.d/ssh \ usr/share/doc/nss_ldap-264/pam.d/xserver \ usr/share/doc/nss_ldap-264/pam.d/imap \ usr/share/doc/nss_ldap-264/pam.d/other \ usr/share/doc/nss_ldap-264/pam.d/rexec \ usr/share/doc/nss_ldap-264/pam.d/su PLIST_DIRS+=@dirrmtry usr/share/doc/pam.d MAN5+=usr/share/man/man5/pam_ldap.5.gz .else @if [ -f ${WRKDIR}/lib/security/pam_ldap.so ]; then \ ${RM} ${WRKDIR}/lib/security/pam_ldap.so ${DIRRM} ${WRKDIR}/lib/; fi @if [ -f ${WRKDIR}/usr/share/doc/nss_ldap-264/COPYING.pam_ldap ]; then \ ${RM} ${WRKDIR}/usr/share/doc/nss_ldap-264/*pam*; fi @if [ -f ${WRKDIR}/usr/share/man/man5/pam_ldap.5.gz ]; then \ ${RM} ${WRKDIR}/usr/share/man/man5/pam_ldap.5.gz; fi .endif @if [ -f ${WRKDIR}/etc/ldap.conf ]; then \ ${MV} -p ${WRKDIR}/etc/ldap.conf ${WRKDIR}/etc/ldap.conf.dist; fi The errors are unexpected "(". What am I doing wrong? Only one more thing: do I need USE_LDCONFIG?