function getBuildSystem()
 {
     // create archive from package
     //
     $archive = new Archive($this->getPackagePath());
     $buildPath = Archive::concatPaths($this->source_path, $this->build_dir);
     // check for ant
     //
     if ($archive->found($buildPath, 'build.xml')) {
         return Response::make("ant", 200);
         // check for maven
         //
     } else {
         if ($archive->found($buildPath, 'pom.xml')) {
             return Response::make("maven", 200);
             // default case
             //
         } else {
             return Response::make("Could not determine build system.", 404);
         }
     }
 }
Пример #2
0
 function getBuildSystem()
 {
     // create archive from package
     //
     $archive = new Archive($this->getPackagePath());
     // check for configure
     //
     $configPath = Archive::concatPaths($this->source_path, $this->config_dir);
     if ($archive->found($configPath, 'configure')) {
         // configure + make
         //
         return Response::make("configure+make", 200);
     } else {
         // make
         //
         $buildPath = Archive::concatPaths($this->source_path, $this->build_dir);
         if ($archive->found($buildPath, 'makefile') || $archive->found($buildPath, 'Makefile')) {
             return Response::make("make", 200);
         } else {
             return Response::make("Could not determine build system.", 404);
         }
     }
 }