linux-f10-nss_ldap: my first port - be gentle :)

Matthew Seaman m.seaman at infracaninophile.co.uk
Wed Jan 11 16:24:00 UTC 2012


On 11/01/2012 16:10, Eitan Adler wrote:
>>> post-extract:
>>> >>                 .if defined(WITH_PAM)
>>> >>                     PLIST_FILES+=lib/security/pam_ldap.so
>>> >>
>>> >>
>>> >>                 .else
>>> >>                     @if [ -f ${WRKDIR}/lib/security/pam_ldap.so ]; then \
>>> >>                         ${RM} ${WRKDIR}/lib/security/pam_ldap.so
>>> >>                         ${DIRRM} ${WRKDIR}/lib/;
>>> >>                     fi
>> >
>> >                    ^^^^^

>> > This is what's wrong.  In port Makefiles, it's .if, .else, .endif not fi.

> You need both: .endif and fi in this case (the 'fi' is part of the shell script)

Also the shell script part needs to be backslashed, and statements
separated by semi-colons, like so:

      @if [ -f ${WRKDIR}/lib/security/pam_ldap.so ]; then \
          ${RM} ${WRKDIR}/lib/security/pam_ldap.so ; \
          ${DIRRM} ${WRKDIR}/lib/ ; \
      fi

Looking back at the OP's previous posts, it's this backslashing thing
which is missing: the (make) .if is properly closed with a .endif, which
unfortunately got cropped in one of the replies upthread.

Another point: its not usual to modify variables like PLIST_FILES or
PORTDOCS as part of the post-extract target.  Usually that's done
earlier in the Makefile before any of the actual make targets.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew at infracaninophile.co.uk               Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20120111/64c4b27a/signature.pgp


More information about the freebsd-ports mailing list