def unpack( self ):
        svnpath = self.kdeSvnPath()
        utils.cleanDirectory( self.workdir )

        if svnpath:
            if not self.kdeSvnUnpack( svnpath, "scripts" ):
                return False

            for pkg in self.subinfo.languages.split():
                if not self.kdeSvnUnpack( svnpath, pkg ):
                    return False
            autogen = os.path.join( self.packagedir , "autogen.py" )
            svnpath = os.path.join( self.kdesvndir, svnpath )


            # execute autogen.py and generate the CMakeLists.txt files
            cmd = [ "python", autogen, self.subinfo.languages ]
            # FIXME comment out once libxslt works again
            cmd.append( "--disable-docs" )
            utils.system( cmd )

        else:
            filenames = []
            for pkg in self.subinfo.languages.split():
                if not self.subinfo.buildTarget in self.subinfo.targets.keys():
                    return False
                tgt = self.subinfo.buildTarget
                filenames.append( 'kde-l10n-' + pkg + '-' + tgt + '.tar.bz2' )
            if not utils.unpackFiles( self.downloaddir, filenames, self.workdir ):
                return False
            # no need for autogen.py - CMake scripts are already created
        return True
Esempio n. 2
0
    def unpack( self ):
        svnpath = self.kdeSvnPath()
        utils.cleanDirectory( self.workdir )

        if svnpath:
            if not self.kdeSvnUnpack( svnpath, "scripts" ):
                return False

            for pkg in self.subinfo.languages.split():
                if not self.kdeSvnUnpack( svnpath, pkg ):
                    return False
                else:
                    print "Unpacked %s" % pkg
            autogen = os.path.join( self.packagedir , "autogen.py" )
            svnpath = os.path.join( self.kdesvndir, svnpath )


            # execute autogen.py and generate the CMakeLists.txt files
            cmd = "cd %s && python %s %s" % \
                  (svnpath , autogen, self.subinfo.languages )
            utils.system( cmd )

        else:
            filenames = []
            for pkg in self.subinfo.languages.split():
                if not self.subinfo.buildTarget in self.subinfo.targets.keys():
                    return False
                tgt = self.subinfo.buildTarget
                filenames.append( 'kde-l10n-' + pkg + '-' + tgt + '.tar.bz2' )
            if not utils.unpackFiles( self.downloaddir, filenames, self.workdir ):
                return False
            # no need for autogen.py - CMake scripts are already created
        return True
Esempio n. 3
0
 def kdeSvnUnpack( self, svnpath=None, packagedir=None ):
     if self.kde.kdeSvnPath():
         return self.kde.kdeSvnUnpack( svnpath, packagedir )
     else:
         if not utils.unpackFiles( self.downloaddir, self._filenames, self.workdir ):
             return False
         if len( self.subinfo.targets ) and self.subinfo.buildTarget in self.subinfo.patchToApply.keys():
             ( fileName, patchdepth ) = self.subinfo.patchToApply[ self.subinfo.buildTarget ]
             utils.debug( "patchesToApply: %s" % fileName, 0 )
             patchfile = os.path.join ( self.packagedir, fileName )
             srcdir = os.path.join ( self.workdir, self.instsrcdir )
             return utils.applyPatch( srcdir, patchfile, patchdepth )
         return True
Esempio n. 4
0
    def unpack( self ):
        """unpacking all zipped(gz, zip, bz2) tarballs"""
        raise Exception('This function is deprecated. It calls undefined utils.applyPatches.')
        # pylint: disable=W0101
        # pylint should not warn about unreachable code here

        utils.debug( "base unpack called", 1 )

        if self.subinfo.buildTarget in self.subinfo.svnTargets.keys():
            if self.subinfo.svnTargets[ self.subinfo.buildTarget ] and utils.isGitUrl( self.subinfo.svnTargets[ self.subinfo.buildTarget ] ):
                if ( not os.path.exists( self.workdir ) ):
                    os.makedirs( self.workdir )
                return self.git_unpack( self.subinfo.svnTargets[ self.subinfo.buildTarget ] )

        if not utils.unpackFiles( self.downloaddir, self._filenames, self.workdir ):
            return False
        # if len( self.subinfo.targets ) and self.subinfo.buildTarget in self.subinfo.patchToApply.keys():
        #     srcdir = os.path.join ( self.workdir, self.instsrcdir )
        #     TODO: this would fail return utils.applyPatches(srcdir, self.subinfo.patchToApply[self.subinfo.buildTarget])
        return True
Esempio n. 5
0
 def unpack( self ):
     return utils.unpackFiles( self.downloadDir(), [ os.path.basename( self.subinfo.target() ) ], self.imageDir() )