There's this section in the porters handbook: https://www.freebsd.org/doc/en/books/porters-handbook/porting-prefix.html
this line of code just never seems to work I've tried not only on the ports that I am testing but many simpler ports all around the ports tree and they always fail because they're missing something. Can someone explain this: make clean; make package PREFIX=/var/tmp/`make -V PORTNAME` I mean I understand it's trying to make a package of x port in a tmp directory but how could you actually get this type of tests to pass? The value of PREFIX will be set to LOCALBASE (defaulting to /usr/local). If USE_LINUX_PREFIX is set, PREFIX will be LINUXBASE (defaulting to /compat/linux). Avoiding hard-coded /usr/local paths in the source makes the port much more flexible and able to cater to the needs of other sites. Often, this can be accomplished by replacing occurrences of /usr/local in the port's various Makefiles with ${PREFIX}. This variable is automatically passed down to every stage of the build and install processes. Make sure the application is not installing things in /usr/local instead of PREFIX. A quick test for such hard-coded paths is: % make clean; make package PREFIX=/var/tmp/`make -V PORTNAME` If anything is installed outside of PREFIX, the package creation process will complain that it cannot find the files. In addition, it is worth checking the same with the stage directory support (see Section 6.1, “Staging” <https://www.freebsd.org/doc/en/books/porters-handbook/special.html#staging> ): % make stage && make check-plist && make stage-qa && make package - check-plist checks for files missing from the plist, and files in the plist that are not installed by the port. - stage-qa checks for common problems like bad shebang, symlinks pointing outside the stage directory, setuid files, and non-stripped libraries... These tests will not find hard-coded paths inside the port's files, nor will it verify that LOCALBASE is being used to correctly refer to files from other ports. The temporarily-installed port in /var/tmp/`make -V PORTNAME` must be tested for proper operation to make sure there are no problems with paths. _______________________________________________ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"