diff --git a/builder_scripts/rebuild_package_binaries_pbi.php b/builder_scripts/rebuild_package_binaries_pbi.php index f0d5aed36..4ff213088 100755 --- a/builder_scripts/rebuild_package_binaries_pbi.php +++ b/builder_scripts/rebuild_package_binaries_pbi.php @@ -83,6 +83,11 @@ function create_pbi_conf($port_path,$MAKEOPTS="") { $PROGNAME=trim(`grep ^PORTNAME= /usr/ports/$port_path/Makefile | cut -d'=' -f2`); + // $port_path Format should be, e.g. www/squid so we can grab the port name there if the makefile is empty. + $PROGNAME = empty($PROGNAME) ? substr($port_path, strpos($port_path, '/')+1) : $PROGNAME; + // If it's still empty, comment it out + $usepn = empty($PROGNAME) ? "#" : ""; + $MAINTAINER=trim(`grep ^MAINTAINER= /usr/ports/$port_path/Makefile | cut -d'=' -f2`); // $PROGWEB=trim(`grep ^MASTER_SITES= /usr/ports/$port_path/Makefile | cut -d'=' -f2`); @@ -91,7 +96,7 @@ function create_pbi_conf($port_path,$MAKEOPTS="") { $PBI_CONF = <<