Solved Need some help with porting

driesm

Developer
Hello guys,

I've been working on a port recently but I'm having some issues.
Porbably because of my inexperience with ports.
I have the latter in the Makefile:

Code:
obvious things

do-install:
        ${MKDIR} ${STAGEDIR}${WWWDIR}
        cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}

post-install:
        # Make PHP files executable
        ${FIND} ${STAGEDIR}${WWWDIR} -name '*.php' -exec ${CHMOD} +x {} \;
        # Make WWW group owner of files
        ${CHOWN} -R :${WWWGRP} ${STAGEDIR}${WWWDIR}
        # Make WWW user and group owner of writable directories
        ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${STAGEDIR}${WWWDIR}/logs

This creates the stagedir perfectly by issuing make stage with correct permissions and such of the installed files.
Altough when installing the port on the system by issuing make install nothing gets installed.
 
Hi Duffyx,

the idea behind a stagedir is to be able to build packages as regular user (see 6.1 Staging). Hence, using chown is not the correct way. Use pkg-plist instead:
Code:
@(,www,755) bin/some-executable
From https://www.freebsd.org/doc/en/books/porters-handbook/install.html
Set ownership directly in pkg-plist with the corresponding entries, such as @(owner,group,), @owner owner, and @group group. These operators work until overridden, or until the end of pkg-plist, so remember to reset them after they are no longer needed. The default ownership is root:wheel. See Section 8.6.13, “Base Keywords” for more information.
Altough when installing the port on the system by issuing make install nothing gets installed.
Is every file you intend to install listed in pkg-plist? See 3.2.2 and
 
Oh, I don't have a pkg-plist... maybe this explains why... :)
I thought it would take some time to adjust per file permissions in such a list. Altough if this is the way to go, I will!

How should one interpret the concept of a dynamic pkg-plist then? I thought that the system creates this list on its own based on the stagedir.
I took some example lines from the LibreNMS port Makefile which is also PHP based software. LibreNMS port doesn't have a pkg-plist.
Why does it work for that specific port but not for the port in my case?
 
Back
Top