function checkBuildSystem() { switch ($this->build_system) { case 'none': return Response::make("Python package ok for no build.", 200); break; case 'distutils': // create archive from package // $archive = new Archive($this->getPackagePath()); $buildPath = Archive::concatPaths($this->source_path, $this->build_dir); $buildFile = $this->build_file; // search archive for build file in build path // if ($buildFile != NULL) { if ($archive->contains($buildPath, $buildFile)) { return Response::make("Python package build system ok for build with distutils.", 200); } else { return Response::make("Could not find a build file called '" . $buildFile . "' within the '" . $buildPath . "' directory. You may need to set your build path or the path to your build file.", 404); } } break; case 'other': return Response::make("Python package ok for no build.", 200); break; } }
function checkBuildSystem() { switch ($this->build_system) { case 'make': // create archive from package // $archive = new Archive($this->getPackagePath()); $buildPath = Archive::concatPaths($this->source_path, $this->build_dir); $buildFile = $this->build_file; // search archive for build file in build path // if ($buildFile != NULL) { if ($archive->contains($buildPath, $buildFile)) { return Response::make("C/C++ package build system ok for make.", 200); } else { return Response::make("Could not find a build file called '" . $buildFile . "' within the '" . $buildPath . "' directory. You may need to set your build path or the path to your build file.", 404); } } // search archive for default build file in build path // if ($archive->contains($buildPath, 'makefile') || $archive->contains($buildPath, 'Makefile')) { return Response::make("C/C++ package build system ok for make.", 200); } else { return Response::make("Could not find a build file called 'makefile' or 'Makefile' within '" . $this->source_path . "' directory. You may need to set your build path or the path to your build file.", 404); } break; case 'configure+make': // create archive from package // $archive = new Archive($this->getPackagePath()); // find config file and path // $configPath = Archive::concatPaths($this->source_path, $this->config_dir); $configFile = str_replace("./", "", $this->config_cmd); // search archive for config file in config path // if ($archive->contains($configPath, $configFile)) { return Response::make("C/C++ package build system ok for configure+make.", 200); } else { return Response::make("Could not find a configuration file called '" . $configFile . "' within directory '" . $configPath . "'.", 404); } break; case 'cmake+make': return Response::make("C/C++ package build system ok for cmake+make.", 200); break; } }
function checkBuildSystem() { switch ($this->build_system) { case 'android+ant': // create archive from package // $archive = new Archive($this->getPackagePath()); // find build path and file // $buildPath = Archive::concatPaths($this->source_path, $this->build_dir); $buildFile = $this->build_file; if ($buildFile == NULL) { $buildFile = 'build.xml'; } // search archive for build file in build path // if ($archive->contains($buildPath, $buildFile)) { return Response::make("Java source package version is ok for ant.", 200); } else { return Response::make("Could not find a build file called '" . $buildFile . "' within the '" . $buildPath . "' directory. You may need to set your build path or the path to your build file.", 404); } break; } }
public function getDirectoryInfoTree($dirname, $filter) { $archive = new Archive($this->getPackagePath()); return $archive->getDirectoryInfoTree($dirname, $filter); }