示例#1
0
def setup():
    if not shelltools.can_access_directory("tools/clang"):
        shelltools.system("tar xf ../cfe-%s.src.tar.xz -C tools" %
                          get.srcVERSION())
        shelltools.move("tools/cfe-%s.src" % get.srcVERSION(), "tools/clang")
    if not shelltools.can_access_directory("projects/compiler-rt"):
        shelltools.system("tar xf ../compiler-rt-%s.src.tar.xz -C projects" %
                          get.srcVERSION())
        shelltools.move("projects/compiler-rt-%s.src" % get.srcVERSION(),
                        "projects/compiler-rt")

    shelltools.export("LD_LIBRARY_PATH", "%s/Release/lib/" % os.getcwd())

    shelltools.export("CC", "gcc")
    shelltools.export("CXX", "g++")
    autotools.rawConfigure("--prefix=/usr              \
                            --sysconfdir=/etc          \
                            --libdir=/usr/lib/llvm     \
                            --enable-libffi            \
                            --enable-optimized         \
                            --enable-shared            \
                            --disable-assertions       \
                            --disable-debug-runtime    \
                            --host=%s \
                            --build=%s \
                            --with-gcc-toolchain=/usr \
                            --disable-expensive-checks" %
                           (get.HOST(), get.HOST()))
示例#2
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls(get.workDIR()):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    # copy config file to texmf-config
    pisitools.dodir("/etc/texmf/tex/context/config")
    shelltools.copy("%s/usr/share/texmf-dist/tex/context/config/cont-usr.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/context/config/cont-usr.tex" % get.installDIR())

    # old packages, we will not provide them
    pisitools.remove("/usr/share/texmf-dist/tex/plain/config/omega.ini")
    pisitools.remove("/usr/share/texmf-dist/tex/plain/config/aleph.ini")
    pisitools.removeDir("/usr/share/texmf-dist/scripts/context/stubs/mswin/")
示例#3
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls('.'):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    pisitools.dosym("/usr/share/texmf-dist/scripts/bibexport/bibexport.sh", "/usr/bin/bibexport")
    pisitools.removeDir("/usr/bin")
    pisitools.remove("/usr/share/texmf-dist/scripts/urlbst/urlbst")
    pisitools.remove("/usr/share/texmf-dist/scripts/multibibliography/multibibliography.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/listbib/listbib")
    pisitools.remove("/usr/share/texmf-dist/scripts/bibexport/bibexport.sh")
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls('.'):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    pisitools.remove("/usr/share/texmf-dist/scripts/m-tx/m-tx.lua")
    pisitools.remove("/usr/share/texmf-dist/scripts/musixtex/musixtex.lua")
    pisitools.remove("/usr/share/texmf-dist/scripts/musixtex/musixflx.lua")
    pisitools.remove("/usr/share/texmf-dist/scripts/pmx/pmx2pdf.lua")
示例#5
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls('.'):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    pisitools.dosym("/usr/share/texmf-dist/scripts/authorindex/authorindex" ,"/usr/bin/authorindex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/glossaries/makeglossaries" ,"/usr/bin/makeglossaries")
    pisitools.dosym("/usr/share/texmf-dist/scripts/pax/pdfannotextractor.pl" ,"/usr/bin/pdfannotextractor")
    pisitools.dosym("/usr/share/texmf-dist/scripts/ppower4/pdfthumb.tlu" ,"/usr/bin/pdfthumb")
    pisitools.dosym("/usr/share/texmf-dist/scripts/perltex/perltex.pl" ,"/usr/bin/perltex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/pst-pdf/ps4pdf" ,"/usr/bin/ps4pdf")
    pisitools.dosym("/usr/share/texmf-dist/scripts/splitindex/perl/splitindex.pl" ,"/usr/bin/splitindex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/svn-multi/svn-multi.pl" ,"/usr/bin/svn-multi")
    pisitools.dosym("/usr/share/texmf-dist/scripts/vpe/vpe.pl" ,"/usr/bin/vpe")

    pisitools.remove("/usr/share/texmf-dist/scripts/glossaries/makeglossaries.bat")
    pisitools.remove("/usr/share/texmf-dist/scripts/pst-pdf/ps4pdf.bat*")
    pisitools.remove("/usr/share/texmf-dist/scripts/shipunov/biokey2html.bat")
示例#6
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls('.'):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    pisitools.remove("/usr/share/texmf-dist/scripts/splitindex/splitindex.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/authorindex/authorindex")
    pisitools.remove("/usr/share/texmf-dist/scripts/glossaries/makeglossaries")
    pisitools.remove("/usr/share/texmf-dist/scripts/pax/pdfannotextractor.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/pst-pdf/ps4pdf")
    pisitools.remove("/usr/share/texmf-dist/scripts/perltex/perltex.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/svn-multi/svn-multi.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/vpe/vpe.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/exceltex/exceltex")
示例#7
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls(get.workDIR()):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    # copy config file to texmf-config
    pisitools.dodir("/etc/texmf/tex/context/config")
    shelltools.copy("%s/usr/share/texmf-dist/tex/context/config/cont-usr.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/context/config/cont-usr.tex" % get.installDIR())

    # old packages, we will not provide them
    pisitools.remove("/usr/share/texmf-dist/tex/plain/config/omega.ini")
    pisitools.remove("/usr/share/texmf-dist/tex/plain/config/aleph.ini")
    pisitools.removeDir("/usr/share/texmf-dist/scripts/context/stubs/mswin/")
示例#8
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls('.'):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    pisitools.dosym("/usr/share/texmf-dist/scripts/bibexport/bibexport.sh",
                    "/usr/bin/bibexport")
    pisitools.removeDir("/usr/bin")
    pisitools.remove("/usr/share/texmf-dist/scripts/urlbst/urlbst")
    pisitools.remove(
        "/usr/share/texmf-dist/scripts/multibibliography/multibibliography.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/listbib/listbib")
    pisitools.remove("/usr/share/texmf-dist/scripts/bibexport/bibexport.sh")
示例#9
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls('.'):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/ht.sh" ,"/usr/bin/ht")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/htcontext.sh" ,"/usr/bin/htcontext")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/htlatex.sh" ,"/usr/bin/htlatex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/htmex.sh" ,"/usr/bin/htmex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/httex.sh" ,"/usr/bin/httex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/httexi.sh" ,"/usr/bin/httexi")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/htxelatex.sh" ,"/usr/bin/htxelatex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/htxetex.sh" ,"/usr/bin/htxetex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/mk4ht.pl" ,"/usr/bin/mk4ht")
示例#10
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls('.'):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    pisitools.dosym("/usr/share/texmf-dist/scripts/cachepic/cachepic.tlu", "/usr/bin/cachepic")
    pisitools.dosym("/usr/share/texmf-dist/scripts/epspdf/epspdftk", "/usr/bin/epspdftk")
    pisitools.dosym("/usr/share/texmf-dist/scripts/epspdf/epspdf", "/usr/bin/epspdf")
    pisitools.dosym("/usr/share/texmf-dist/scripts/fig4latex/fig4latex", "/usr/bin/fig4latex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/mathspic/mathspic.pl", "/usr/bin/mathspic")
示例#11
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls('.'):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    pisitools.remove("/usr/share/texmf-dist/scripts/m-tx/m-tx.lua")
    pisitools.remove("/usr/share/texmf-dist/scripts/musixtex/musixtex.lua")
    pisitools.remove("/usr/share/texmf-dist/scripts/musixtex/musixflx.lua")
    pisitools.remove("/usr/share/texmf-dist/scripts/pmx/pmx2pdf.lua")
示例#12
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls('.'):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    pisitools.dosym("/usr/share/texmf-dist/scripts/cachepic/cachepic.tlu", "/usr/bin/cachepic")
    pisitools.dosym("/usr/share/texmf-dist/scripts/epspdf/epspdftk", "/usr/bin/epspdftk")
    pisitools.dosym("/usr/share/texmf-dist/scripts/epspdf/epspdf", "/usr/bin/epspdf")
    pisitools.dosym("/usr/share/texmf-dist/scripts/fig4latex/fig4latex", "/usr/bin/fig4latex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/mathspic/mathspic.pl", "/usr/bin/mathspic")
示例#13
0
    def testShelltoolsCanAccessDir(self):
        from pisi.actionsapi.shelltools import can_access_directory

        self.assert_(can_access_directory('tests/actionsapitests/adirectory'))
        self.assert_(
            not can_access_directory('tests/actionsapitests/adirectoryX'))
        self.assert_(
            can_access_directory('tests/actionsapitests/linktoadirectory'))
示例#14
0
def setup():        
    if get.buildTYPE() != "emul32":
            if not shelltools.can_access_directory("tools/clang"):
                shelltools.system("tar xf ../cfe-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/cfe-%s.src" % get.srcVERSION(), "tools/clang")

                shelltools.system("tar xf ../clang-tools-extra-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/clang-tools-extra-*", "tools/clang/extra")
                
                shelltools.system("tar xf ../lldb-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/lldb-*", "tools/lldb")

            if not shelltools.can_access_directory("projects/compiler-rt"):
                shelltools.system("tar xf ../compiler-rt-%s.src.tar.xz -C projects" % get.srcVERSION())
                shelltools.move("projects/compiler-rt-%s.src" % get.srcVERSION(), "projects/compiler-rt")    
        
        
                shelltools.export("CC", "gcc")
                shelltools.export("CXX", "g++")
                
    
    if get.buildTYPE() == "emul32":
        shelltools.export("CC", "gcc -m32")
        shelltools.export("CXX", "g++ -m32")
        shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
    
    shelltools.makedirs("build")
    
    shelltools.cd("build")
    
    if get.buildTYPE() != "emul32":
        options = "-DCMAKE_C_FLAGS:STRING=-m64 \
                              -DCMAKE_INSTALL_PREFIX=/usr \
                            -DCMAKE_CXX_FLAGS:STRING=-m64 \
                            -DLLVM_TARGET_ARCH:STRING=x86_64 \
                            -DLLVM_DEFAULT_TARGET_TRIPLE=%s " % get.HOST()
                          
    
    if get.buildTYPE() == "emul32":
        options = "  -DCMAKE_C_FLAGS:STRING=-m32 \
                            -DCMAKE_INSTALL_PREFIX=/emul32 \
                            -DLLVM_TARGET_ARCH:STRING=i686  \
                            -DLLVM_LIBDIR_SUFFIX=32 \
                            -DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu' \
                            -DCMAKE_CXX_FLAGS:STRING=-m32"
    
    
    cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \
                                        %s \
                                        -DLLVM_ENABLE_FFI=ON \
                                        -DLLVM_BUILD_DOCS=OFF \
                                        -DLLVM_BUILD_LLVM_DYLIB=ON \
                                        -DLLVM_LINK_LLVM_DYLIB=ON \
                                        -DLLVM_ENABLE_RTTI=ON \
                                        -DLLVM_INCLUDEDIR=/usr/include \
                                        -DLLVM_ENABLE_ASSERTIONS=OFF \
                                        -DFFI_INCLUDE_DIR=/usr/lib/libffi-3.2.1/include \
                                        -DENABLE_SHARED=ON" % options, sourceDir=".." ) 
示例#15
0
文件: actions.py 项目: aligulle1/main
def setup():        
    if get.buildTYPE() != "emul32":
            if not shelltools.can_access_directory("tools/clang"):
                shelltools.system("tar xf ../cfe-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/cfe-%s.src" % get.srcVERSION(), "tools/clang")

                shelltools.system("tar xf ../clang-tools-extra-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/clang-tools-extra-*", "tools/clang/extra")
                
                shelltools.system("tar xf ../lldb-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/lldb-*", "tools/lldb")

            if not shelltools.can_access_directory("projects/compiler-rt"):
                shelltools.system("tar xf ../compiler-rt-%s.src.tar.xz -C projects" % get.srcVERSION())
                shelltools.move("projects/compiler-rt-%s.src" % get.srcVERSION(), "projects/compiler-rt")    
        
        
                shelltools.export("CC", "gcc")
                shelltools.export("CXX", "g++")
                
    
    if get.buildTYPE() == "emul32":
        shelltools.export("CC", "gcc -m32")
        shelltools.export("CXX", "g++ -m32")
        shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
    
    shelltools.makedirs("build")
    
    shelltools.cd("build")
    
    if get.buildTYPE() != "emul32":
        options = "-DCMAKE_C_FLAGS:STRING=-m64 \
                              -DCMAKE_INSTALL_PREFIX=/usr \
                            -DCMAKE_CXX_FLAGS:STRING=-m64 \
                            -DLLVM_TARGET_ARCH:STRING=x86_64 \
                            -DLLVM_DEFAULT_TARGET_TRIPLE=%s " % get.HOST()
                          
    
    if get.buildTYPE() == "emul32":
        options = "  -DCMAKE_C_FLAGS:STRING=-m32 \
                            -DCMAKE_INSTALL_PREFIX=/emul32 \
                            -DLLVM_TARGET_ARCH:STRING=i686  \
                            -DLLVM_LIBDIR_SUFFIX=32 \
                            -DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu' \
                            -DCMAKE_CXX_FLAGS:STRING=-m32"
    
    
    cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \
                                        %s \
                                        -DLLVM_ENABLE_FFI=ON \
                                        -DLLVM_BUILD_DOCS=OFF \
                                        -DBUILD_SHARED_LIBS=ON \
                                        -DLLVM_ENABLE_RTTI=ON \
                                        -DLLVM_INCLUDEDIR=/usr/include \
                                        -DLLVM_ENABLE_ASSERTIONS=OFF \
                                        -DFFI_INCLUDE_DIR=/usr/lib/libffi-3.2.1/include \
                                        -DENABLE_SHARED=ON" % options, sourceDir=".." ) 
示例#16
0
def setup():
    # Don't clone it over and over again
    if shelltools.can_access_directory(gitname):
        shelltools.cd(gitname)
        shelltools.system("git pull origin")
        shelltools.cd("..")
    else:
        shelltools.system("git clone %s" % gitroot)

    # Create seperate build dir. Don't mess up with original git repo
    if shelltools.can_access_directory(gitbuild):
        shelltools.unlinkDir(gitbuild)
    shelltools.copytree(gitname, gitbuild)
示例#17
0
def setup():
    # Don't clone it over and over again
    if shelltools.can_access_directory(gitname):
        shelltools.cd(gitname)
        shelltools.system("git pull origin")
        shelltools.cd("..")
    else:
        shelltools.system("git clone %s" % gitroot)

    # Create seperate build dir. Don't mess up with original git repo
    if shelltools.can_access_directory(gitbuild):
        shelltools.unlinkDir(gitbuild)
    shelltools.copytree(gitname, gitbuild)
示例#18
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls('.'):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/ht.sh",
                    "/usr/bin/ht")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/htcontext.sh",
                    "/usr/bin/htcontext")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/htlatex.sh",
                    "/usr/bin/htlatex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/htmex.sh",
                    "/usr/bin/htmex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/httex.sh",
                    "/usr/bin/httex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/httexi.sh",
                    "/usr/bin/httexi")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/htxelatex.sh",
                    "/usr/bin/htxelatex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/htxetex.sh",
                    "/usr/bin/htxetex")
    pisitools.dosym("/usr/share/texmf-dist/scripts/tex4ht/mk4ht.pl",
                    "/usr/bin/mk4ht")

    pisitools.remove("/usr/bin/htlatex")
    pisitools.remove("/usr/bin/httexi")
    pisitools.remove("/usr/bin/ht")
    pisitools.remove("/usr/bin/htcontext")
    pisitools.remove("/usr/bin/htxelatex")
    pisitools.remove("/usr/bin/mk4ht")
    pisitools.remove("/usr/bin/httex")
    pisitools.remove("/usr/bin/htxetex")
    pisitools.remove("/usr/bin/htmex")
示例#19
0
def install():
    pisitools.dobin("linux-boot-prober")
    pisitools.dobin("os-prober")
    pisitools.insinto(
        "/usr/lib/os-prober",
        "newns",
    )
    pisitools.insinto(
        "/usr/share/os-prober",
        "common.sh",
    )

    for d in [
            "os-probes", "os-probes/mounted", "os-probes/init",
            "linux-boot-probes", "linux-boot-probes/mounted"
    ]:
        pisitools.insinto("/usr/lib/%s" % d, "%s/common/*" % d)

        fpath = "%s/x86" % (d)
        print fpath
        if shelltools.can_access_directory(fpath):
            pisitools.insinto("/usr/lib/%s" % d, "%s/x86/*" % d)

    pisitools.insinto("/usr/lib/os-probes/mounted",
                      "os-probes/mounted/powerpc/20macosx")

    pisitools.dodoc("debian/copyright")
示例#20
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls('.'):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    pisitools.remove("/usr/share/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/ksso17.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/j2so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/scripts/convbkmk/convbkmk.rb")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c1so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/b5ka12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c4so12.cfg")
    pisitools.remove(
        "/usr/share/texmf-dist/scripts/jfontmaps/kanji-config-updmap.pl")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/b5so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/csso12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c7so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/jsso12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c3so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c6so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/b5kr12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c5so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c2so12.cfg")
    pisitools.remove(
        "/usr/share/texmf-dist/scripts/jfontmaps/kanji-config-updmap-sys.sh")
    pisitools.remove(
        "/usr/share/texmf-dist/scripts/jfontmaps/kanji-fontmap-creator.pl")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/gsfs14.cfg")
示例#21
0
def install():
    if shelltools.can_access_directory("/usr/kde/3.5/share/apps/dolphin/servicemenus/"):
        pisitools.insinto("/usr/kde/3.5/share/apps/dolphin/servicemenus/",""+get.workDIR()+"/dolphin-KDE3/*.desktop")


    if shelltools.can_access_directory("/usr/kde/3.5/share/apps/konqueror/servicemenus/"):
        pisitools.insinto("/usr/kde/3.5/share/apps/konqueror/servicemenus/",""+get.workDIR()+"/konqueror-KDE3/*.desktop")


    if shelltools.can_access_directory("/usr/kde/4/share/apps/krusader/"):
        pisitools.insinto("/usr/kde/4/share/apps/krusader/",""+get.workDIR()+"/krusader-KDE4/*.xml")


    if shelltools.can_access_directory("/usr/kde/4/share/kde4/services/ServiceMenus/"):
        pisitools.insinto("/usr/kde/4/share/kde4/services/ServiceMenus/",""+get.workDIR()+"/dolphin-konqueror-KDE4/*.desktop")

    pisitools.dobin("rootactions-servicemenu.pl")
    pisitools.dodoc("README","changelog","GPL-2")
示例#22
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls('.'):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    i = "/usr/share/texmf-dist/scripts"

    pisitools.dosym("%s/authorindex/authorindex" % i, "/usr/bin/authorindex")
    pisitools.dosym("%s/exceltex/exceltex" % i, "/usr/bin/exceltex")
    pisitools.dosym("%s/glossaries/makeglossaries" % i,
                    "/usr/bin/makeglossaries")
    pisitools.dosym("%s/glossaries/makeglossaries-lite.lua" % i,
                    "/usr/bin/makeglossaries-lite")
    pisitools.dosym("%s/l3build/l3build.lua" % i, "/usr/bin/l3build")
    pisitools.dosym("%s/makedtx/makedtx.pl" % i, "/usr/bin/makedtx")
    pisitools.dosym("%s/pax/pdfannotextractor.pl" % i,
                    "/usr/bin/pdfannotextractor")
    pisitools.dosym("%s/perltex/perltex.pl" % i, "/usr/bin/perltex")
    pisitools.dosym("%s/pygmentex/pygmentex.py" % i, "/usr/bin/pygmentex")
    pisitools.dosym("%s/splitindex/splitindex.pl" % i, "/usr/bin/splitindex")
    pisitools.dosym("%s/svn-multi/svn-multi.pl" % i, "/usr/bin/svn-multi")
    pisitools.dosym("%s/vpe/vpe.pl" % i, "/usr/bin/vpe")
    pisitools.dosym("%s/webquiz/webquiz.py" % i, "/usr/bin/webquiz")
    pisitools.dosym("%s/wordcount/wordcount.sh" % i, "/usr/bin/wordcount")
    pisitools.dosym("%s/yplan/yplan" % i, "/usr/bin/yplan")
示例#23
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls('.'):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)
 
    pisitools.remove("/usr/share/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/ksso17.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/j2so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/scripts/convbkmk/convbkmk.rb")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c1so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/b5ka12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c4so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/scripts/jfontmaps/kanji-config-updmap.pl")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/b5so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/csso12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c7so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/jsso12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c3so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c6so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/b5kr12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c5so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/c2so12.cfg")
    pisitools.remove("/usr/share/texmf-dist/scripts/jfontmaps/kanji-config-updmap-sys.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/jfontmaps/kanji-fontmap-creator.pl")
    pisitools.remove("/usr/share/texmf-dist/hbf2gf/gsfs14.cfg")
示例#24
0
def install():
    if shelltools.can_access_directory(
            "/usr/kde/3.5/share/apps/dolphin/servicemenus/"):
        pisitools.insinto("/usr/kde/3.5/share/apps/dolphin/servicemenus/",
                          "" + get.workDIR() + "/dolphin-KDE3/*.desktop")

    if shelltools.can_access_directory(
            "/usr/kde/3.5/share/apps/konqueror/servicemenus/"):
        pisitools.insinto("/usr/kde/3.5/share/apps/konqueror/servicemenus/",
                          "" + get.workDIR() + "/konqueror-KDE3/*.desktop")

    if shelltools.can_access_directory("/usr/kde/4/share/apps/krusader/"):
        pisitools.insinto("/usr/kde/4/share/apps/krusader/",
                          "" + get.workDIR() + "/krusader-KDE4/*.xml")

    if shelltools.can_access_directory(
            "/usr/kde/4/share/kde4/services/ServiceMenus/"):
        pisitools.insinto(
            "/usr/kde/4/share/kde4/services/ServiceMenus/",
            "" + get.workDIR() + "/dolphin-konqueror-KDE4/*.desktop")

    pisitools.dobin("rootactions-servicemenu.pl")
    pisitools.dodoc("README", "changelog", "GPL-2")
示例#25
0
def setup():
    if not shelltools.can_access_directory("tools/clang"):
        shelltools.system("tar xf ../cfe-%s.src.tar.xz -C tools" % get.srcVERSION())
        shelltools.move("tools/cfe-%s.src" % get.srcVERSION(), "tools/clang")
    if not shelltools.can_access_directory("projects/compiler-rt"):
        shelltools.system("tar xf ../compiler-rt-%s.src.tar.xz -C projects" % get.srcVERSION())
        shelltools.move("projects/compiler-rt-%s.src" % get.srcVERSION(), "projects/compiler-rt")

    shelltools.export("LD_LIBRARY_PATH", "%s/Release/lib/" % os.getcwd())

    shelltools.export("CC", "gcc")
    shelltools.export("CXX", "g++")
    autotools.rawConfigure("--prefix=/usr              \
                            --sysconfdir=/etc          \
                            --libdir=/usr/lib/llvm     \
                            --enable-libffi            \
                            --enable-optimized         \
                            --enable-shared            \
                            --disable-assertions       \
                            --disable-debug-runtime    \
                            --host=%s \
                            --build=%s \
                            --with-gcc-toolchain=/usr \
                            --disable-expensive-checks" % (get.HOST(), get.HOST()))
示例#26
0
def presetup():
    # Because f*****g *dash*
    shelltools.export("CONFIG_SHELL", "/bin/bash")
    ballpath = "%s/external/tarballs" % OurWorkDir
    if not shelltools.can_access_directory(ballpath):
        shelltools.makedirs(ballpath)

        for comp in [ "dictionaries", "help", "translations"]:
            name = "libreoffice-%s-%s.tar.xz" % (comp, LoVersion)
            shelltools.sym("../../../%s" % name, "%s/%s" % (ballpath, name))


    shelltools.chmod("%s/bin/unpack-sources" % OurWorkDir)
    shelltools.export("LO_PREFIX", "/usr")
    shelltools.cd(OurWorkDir)
示例#27
0
def install():
    pisitools.dobin("linux-boot-prober")
    pisitools.dobin("os-prober")
    pisitools.insinto("/usr/lib/os-prober", "newns", )
    pisitools.insinto("/usr/share/os-prober", "common.sh", )

    for d in ["os-probes",  "os-probes/mounted", "os-probes/init", "linux-boot-probes", "linux-boot-probes/mounted"]:
        pisitools.insinto("/usr/lib/%s" % d, "%s/common/*" % d)

        fpath = "%s/x86" % (d)
        print fpath
        if shelltools.can_access_directory(fpath):
            pisitools.insinto("/usr/lib/%s" % d, "%s/x86/*" % d)

    pisitools.insinto("/usr/lib/os-probes/mounted", "os-probes/mounted/powerpc/20macosx")

    pisitools.dodoc("debian/copyright")
示例#28
0
 def testCanAccessDirectory(self):
     from pisi.actionsapi.shelltools import can_access_directory
     assert can_access_directory('/boot')
     assert can_access_directory('/usr/bin')
     assert not can_access_directory('/tests/mirrors.conf')
示例#29
0
    def testShelltoolsCanAccessDir(self):
        from pisi.actionsapi.shelltools import can_access_directory

        self.assert_(can_access_directory('tests/actionsapitests/adirectory'))
        self.assert_(not can_access_directory('tests/actionsapitests/adirectoryX'))
        self.assert_(can_access_directory('tests/actionsapitests/linktoadirectory'))
示例#30
0
def setup():
    #pisitools.ldflags.add("-fuse-ld=lld")

    if get.buildTYPE() != "emul32":
            if not shelltools.can_access_directory("tools/clang"):
                shelltools.system("tar xf ../clang-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/clang-%s.src" % get.srcVERSION(), "tools/clang")

                shelltools.system("tar xf ../clang-tools-extra-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/clang-tools-extra-*", "tools/clang/tools/extra")
                
                shelltools.system("tar xf ../lldb-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/lldb-*", "tools/lldb")
                
                shelltools.system("tar xf ../lld-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/lld-*", "tools/lld")
                
                shelltools.system("tar xf ../polly-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/polly-*", "tools/polly")

            if not shelltools.can_access_directory("projects/compiler-rt"):
                shelltools.system("tar xf ../compiler-rt-%s.src.tar.xz -C projects" % get.srcVERSION())
                shelltools.move("projects/compiler-rt-%s.src" % get.srcVERSION(), "projects/compiler-rt")
                
                #clang patch
                #shelltools.cd("tools")
                #shelltools.system("patch -p1 < enable-SSP-and-PIE-by-default.patch")
                #shelltools.cd("..")
        
                #shelltools.export("CC", "clang")
                #shelltools.export("CXX", "clang++")
                shelltools.export("CC", "gcc")
                shelltools.export("CXX", "g++")
    else:
        shelltools.system("tar xf ../clang-%s.src.tar.xz -C tools" % get.srcVERSION())
        shelltools.move("tools/clang-%s.src" % get.srcVERSION(), "tools/clang")
    
    if get.buildTYPE() == "emul32":
        #shelltools.export("CC", "clang -m32")
        #shelltools.export("CXX", "clang++ -m32")
        shelltools.export("CC", "gcc -m32")
        shelltools.export("CXX", "g++ -m32")
        shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
        
        #clang patch
        #shelltools.cd("tools")
        #shelltools.system("patch -p1 < enable-SSP-and-PIE-by-default.patch")
        #shelltools.cd("..")
    
    shelltools.makedirs("build")
    
    shelltools.cd("build")
    
    if get.buildTYPE() != "emul32":
        options = "-DCMAKE_C_FLAGS:STRING=-m64 \
                              -DCMAKE_INSTALL_PREFIX=/usr \
                            -DCMAKE_CXX_FLAGS:STRING=-m64 \
                            -DLLVM_TARGET_ARCH:STRING=x86_64 \
                            -DLLDB_ENABLE_LUA=OFF \
                            -DLLVM_DEFAULT_TARGET_TRIPLE=%s " % get.HOST()
                          
    
    if get.buildTYPE() == "emul32":
        options = "  -DCMAKE_C_FLAGS:STRING=-m32 \
                            -DCMAKE_INSTALL_PREFIX=/emul32 \
                            -DLLVM_TARGET_ARCH:STRING=i686  \
                            -DLLVM_LIBDIR_SUFFIX=32 \
                            -DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu' \
                            -DCMAKE_CXX_FLAGS:STRING=-m32"
    
    
    cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \
                                        %s \
                                        -DLLVM_ENABLE_FFI=ON \
                                        -DLLVM_BUILD_DOCS=OFF \
                                        -DLLVM_ENABLE_RTTI=ON \
                                        -DLLVM_ENABLE_EH=ON \
                                        -DBUILD_SHARED_LIBS=ON \
                                        -DLLVM_INCLUDEDIR=/usr/include \
                                        -DLLVM_ENABLE_ASSERTIONS=OFF \
                                        -DFFI_INCLUDE_DIR=/usr/lib/libffi-3.2.1/include \
                                        -DCOMPILER_RT_USE_LIBCXX=OFF \
                                        -DLIBOMP_USE_HIER_SCHED=ON" % (options), sourceDir=".." ) 
示例#31
0
def install():
    #install
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls(get.workDIR()):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

#    # copy config file to texmf-config
#    pisitools.dodir("/etc/texmf/tex/context/config")
#    shelltools.copy("%s/usr/share/texmf-dist/tex/context/config/cont-usr.tex" % get.installDIR(), \
#                    "%s/etc/texmf/tex/context/config/cont-usr.tex" % get.installDIR())

    # old packages, we will not provide them
    pisitools.remove("/usr/share/texmf-dist/tex/plain/config/omega.ini")
    pisitools.remove("/usr/share/texmf-dist/tex/plain/config/aleph.ini")
    pisitools.removeDir("/usr/share/texmf-dist/scripts/context/stubs/mswin/")
    
    # install texmf tree
    folders = ["/usr/share",
               "/etc/texmf/web2c",
               "/etc/texmf/chktex",
               "/etc/texmf/dvips/config",
               "/etc/texmf/dvipdfm/config",
               "/etc/texmf/dvipdfmx",
               "/etc/texmf/tex/generic/config",
               "/etc/texmf/ttf2pk",
               "/etc/texmf/xdvi",
               "/etc/fonts/conf.avail"]

    for dirs in folders:
        pisitools.dodir(dirs)

    #pisitools.insinto("/usr/share", "texmf")
    pisitools.insinto("/etc/fonts/conf.avail/", "09-texlive-fonts.conf")

    # replace upstream texmf.cnf with ours
    pisitools.remove("/usr/share/texmf-dist/web2c/texmf.cnf")
    pisitools.insinto("/etc/texmf/web2c/", "texmf.cnf")

    # the location of texmf.cnf is hard-wired to be under /usr/share/texmf/web2c
    # we make a symlink from /etc/texmf/web2c/texmf.cnf to the latter
    pisitools.dosym("/etc/texmf/web2c/texmf.cnf", "/usr/share/texmf-dist/web2c/texmf.cnf")
    
    # copy config files to $TEXMFSYSCONFIG tree (defined in texmf.cnf)
    config_files = [ "/usr/share/texmf-dist/chktex/chktexrc",
                     "/usr/share/texmf-dist/web2c/mktex.cnf",
                     "/usr/share/texmf-dist/web2c/updmap.cfg",
                     "/usr/share/texmf-dist/web2c/fmtutil.cnf",
                     "/usr/share/texmf-dist/dvips/config/config.ps",
                     "/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg",
                     "/usr/share/texmf-dist/tex/generic/config/pdftexconfig.tex",
                     "/usr/share/texmf-dist/tex/generic/config/language.dat",
                     "/usr/share/texmf-dist/tex/generic/config/language.def",
                     "/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg",
                     "/usr/share/texmf-dist/xdvi/XDvi"]

    for share_file in config_files:
        etc_file = share_file.replace("/usr/share/texmf-dist", "/etc/texmf")
        shelltools.copy("%s/%s" % (get.installDIR(), share_file) , "%s/%s" % (get.installDIR(), etc_file))

    # clean updmap.cfg
    pisitools.dosed("%s/etc/texmf/web2c/updmap.cfg" % get.installDIR(), "^(Map|MixedMap).*$")
    pisitools.dosed("%s/etc/texmf/web2c/updmap.cfg" % get.installDIR(), "^#! (Map|MixedMap).*$")
    
    # remove aleph from fmtutil.cnf
    pisitools.dosed("%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(), "^.*aleph.*$")
示例#32
0
文件: actions.py 项目: hasankaan/main
def setup():        
    if get.buildTYPE() != "emul32":
            if not shelltools.can_access_directory("tools/clang"):
                shelltools.system("tar xf ../cfe-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/cfe-%s.src" % get.srcVERSION(), "tools/clang")

                shelltools.system("tar xf ../clang-tools-extra-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/clang-tools-extra-*", "tools/clang/extra")
                
                shelltools.system("tar xf ../lldb-%s.src.tar.xz -C tools" % get.srcVERSION())
                shelltools.move("tools/lldb-*", "tools/lldb")

            if not shelltools.can_access_directory("projects/compiler-rt"):
                shelltools.system("tar xf ../compiler-rt-%s.src.tar.xz -C projects" % get.srcVERSION())
                shelltools.move("projects/compiler-rt-%s.src" % get.srcVERSION(), "projects/compiler-rt")    
        
        
                shelltools.export("CC", "gcc")
                shelltools.export("CXX", "g++")
                
    shelltools.system("patch -Np0 -d projects/compiler-rt < msan-prevent-initialization-failure-with-newer-glibc.patch")
    shelltools.system("patch -Rp1 -i AMDGPU-Fix-an-interaction-between-WQM-and-polygon-stippling.patch")
    
    if get.buildTYPE() == "emul32":
        shelltools.export("CC", "gcc -m32")
        shelltools.export("CXX", "g++ -m32")
        shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
    
    shelltools.makedirs("build")
    
    shelltools.cd("build")
    
    if get.buildTYPE() != "emul32":
        options = "-DCMAKE_C_FLAGS:STRING=-m64 \
                              -DCMAKE_INSTALL_PREFIX=/usr \
                            -DCMAKE_CXX_FLAGS:STRING=-m64 \
                            -DLLVM_TARGET_ARCH:STRING=x86_64 \
                            -DLLVM_DEFAULT_TARGET_TRIPLE=%s " % get.HOST()
                          
    
    if get.buildTYPE() == "emul32":
        options = "  -DCMAKE_C_FLAGS:STRING=-m32 \
                            -DCMAKE_INSTALL_PREFIX=/emul32 \
                            -DLLVM_TARGET_ARCH:STRING=i686  \
                            -DLLVM_LIBDIR_SUFFIX=32 \
                            -DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu' \
                            -DCMAKE_CXX_FLAGS:STRING=-m32"
    
    
    cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \
                                        %s \
                                        -DCMAKE_BUILD_TYPE=Release           \
                                        -DCMAKE_INSTALL_PREFIX=/usr          \
                                        -DLLVM_BUILD_LLVM_DYLIB=ON           \
                                        -DLLVM_LINK_LLVM_DYLIB=ON            \
                                        -DLLVM_INSTALL_UTILS=ON              \
                                        -DLLVM_ENABLE_RTTI=ON                \
                                        -DLLVM_ENABLE_FFI=ON                 \
                                        -DLLDB_DISABLE_LIBEDIT=1             \
                                        -DLLVM_INCLUDEDIR=/usr/include       \
                                        -DFFI_INCLUDE_DIR=/usr/lib/libffi-3.2.1/include \
                                        -DLLVM_BINUTILS_INCDIR=/usr/include" % options, sourceDir=".." ) 
示例#33
0
def install():
    #install
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls(get.workDIR()):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

#    # copy config file to texmf-config
#    pisitools.dodir("/etc/texmf/tex/context/config")
#    shelltools.copy("%s/usr/share/texmf-dist/tex/context/config/cont-usr.tex" % get.installDIR(), \
#                    "%s/etc/texmf/tex/context/config/cont-usr.tex" % get.installDIR())

# old packages, we will not provide them
    pisitools.remove("/usr/share/texmf-dist/tex/plain/config/omega.ini")
    pisitools.remove("/usr/share/texmf-dist/tex/plain/config/aleph.ini")
    pisitools.removeDir("/usr/share/texmf-dist/scripts/context/stubs/mswin/")

    # install texmf tree
    folders = [
        "/usr/share", "/etc/texmf/web2c", "/etc/texmf/chktex",
        "/etc/texmf/dvips/config", "/etc/texmf/dvipdfm/config",
        "/etc/texmf/dvipdfmx", "/etc/texmf/tex/generic/config",
        "/etc/texmf/ttf2pk", "/etc/texmf/xdvi", "/etc/fonts/conf.avail"
    ]

    for dirs in folders:
        pisitools.dodir(dirs)

    #pisitools.insinto("/usr/share", "texmf")
    pisitools.insinto("/etc/fonts/conf.avail/", "09-texlive-fonts.conf")

    # replace upstream texmf.cnf with ours
    pisitools.remove("/usr/share/texmf-dist/web2c/texmf.cnf")
    pisitools.insinto("/etc/texmf/web2c/", "texmf.cnf")

    # the location of texmf.cnf is hard-wired to be under /usr/share/texmf/web2c
    # we make a symlink from /etc/texmf/web2c/texmf.cnf to the latter
    pisitools.dosym("/etc/texmf/web2c/texmf.cnf",
                    "/usr/share/texmf-dist/web2c/texmf.cnf")

    # copy config files to $TEXMFSYSCONFIG tree (defined in texmf.cnf)
    config_files = [
        "/usr/share/texmf-dist/chktex/chktexrc",
        "/usr/share/texmf-dist/web2c/mktex.cnf",
        "/usr/share/texmf-dist/web2c/updmap.cfg",
        "/usr/share/texmf-dist/web2c/fmtutil.cnf",
        "/usr/share/texmf-dist/dvips/config/config.ps",
        "/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg",
        "/usr/share/texmf-dist/tex/generic/config/pdftexconfig.tex",
        "/usr/share/texmf-dist/tex/generic/config/language.dat",
        "/usr/share/texmf-dist/tex/generic/config/language.def",
        "/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg",
        "/usr/share/texmf-dist/xdvi/XDvi"
    ]

    for share_file in config_files:
        etc_file = share_file.replace("/usr/share/texmf-dist", "/etc/texmf")
        shelltools.copy("%s/%s" % (get.installDIR(), share_file),
                        "%s/%s" % (get.installDIR(), etc_file))

    # clean updmap.cfg
    pisitools.dosed("%s/etc/texmf/web2c/updmap.cfg" % get.installDIR(),
                    "^(Map|MixedMap).*$")
    pisitools.dosed("%s/etc/texmf/web2c/updmap.cfg" % get.installDIR(),
                    "^#! (Map|MixedMap).*$")

    # remove aleph from fmtutil.cnf
    pisitools.dosed(
        "%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(),
        "^.*aleph.*$")
示例#34
0
def install():
    shelltools.cd("%s/texlive-core/" % get.workDIR())
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls(get.workDIR()):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)

    for folder in wanteddirs:
        pisitools.insinto("/usr/share/texmf-dist", folder)

    # fix sandbox violations
    #pisitools.dosed("texmf-dist/scripts/texlive/texlinks.sh", '"\$symlinkdir', r'"%s/$symlinkdir' % get.installDIR())

    # Recursively copy on directory on top of another, overwrite duplicate files too
    if shelltools.can_access_directory("texmf-dist"):
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    # copy TEXMFCONFIG tree
    pisitools.insinto("/etc/texmf/chktex/", "texmf-dist/chktex/chktexrc")
    pisitools.insinto("/etc/texmf/web2c/", "texmf-dist/web2c/mktex.cnf")
    pisitools.insinto("/etc/texmf/web2c/", "texmf-dist/web2c/updmap.cfg")
    pisitools.insinto("/etc/texmf/web2c/", "texmf-dist/web2c/fmtutil.cnf")
    pisitools.insinto("/etc/texmf/dvips/config/", "texmf-dist/dvips/config/config.ps")
    pisitools.insinto("/etc/texmf/dvipdfmx", "texmf-dist/dvipdfmx/dvipdfmx.cfg")
    pisitools.insinto("/etc/texmf/tex/generic/config/", "texmf-dist/tex/generic/config/pdftexconfig.tex")
    #pisitools.insinto("/etc/texmf/tex/generic/config/", "texmf-dist/tex/generic/config/language.dat")
    #pisitools.insinto("/etc/texmf/tex/generic/config/", "texmf-dist/tex/generic/config/language.def")
    pisitools.insinto("/etc/texmf/ttf2pk", "texmf-dist/ttf2pk/ttf2pk.cfg")
    pisitools.insinto("/etc/texmf/xdvi", "texmf-dist/xdvi/XDvi")
    
    # link programs from /usr/share/texmf-dist/scripts
    linked_scripts="""
a2ping/a2ping.pl
accfonts/mkt1font
accfonts/vpl2ovp
accfonts/vpl2vpl
adhocfilelist/adhocfilelist.sh
arara/arara.sh
bundledoc/arlatex
bundledoc/bundledoc
checkcites/checkcites.lua
chktex/chkweb.sh
chktex/deweb.pl
context/perl/mptopdf.pl
context/stubs/unix/context
context/stubs/unix/ctxtools
context/stubs/unix/luatools
context/stubs/unix/mtxrun
context/stubs/unix/pstopdf
context/stubs/unix/texexec
context/stubs/unix/texmfstart
ctanify/ctanify
ctanupload/ctanupload.pl
de-macro/de-macro
dosepsbin/dosepsbin.pl
dtxgen/dtxgen
dviasm/dviasm.py
epstopdf/epstopdf.pl
findhyph/findhyph
fontools/afm2afm
fontools/autoinst
fontools/ot2kpx
fragmaster/fragmaster.pl
installfont/installfont-tl
latex2man/latex2man
latexdiff/latexdiff-vc.pl
latexdiff/latexdiff.pl
latexdiff/latexrevise.pl
latexfileversion/latexfileversion
latexmk/latexmk.pl
latexpand/latexpand
ltxfileinfo/ltxfileinfo
lua2dox/lua2dox_filter
luaotfload/luaotfload-tool.lua
match_parens/match_parens
mf2pt1/mf2pt1.pl
mkjobtexmf/mkjobtexmf.pl
oberdiek/pdfatfi.pl
pdfcrop/pdfcrop.pl
pdfjam/pdf180
pdfjam/pdf270
pdfjam/pdf90
pdfjam/pdfbook
pdfjam/pdfflip
pdfjam/pdfjam
pdfjam/pdfjam-pocketmod
pdfjam/pdfjam-slides3up
pdfjam/pdfjam-slides6up
pdfjam/pdfjoin
pdfjam/pdfnup
pdfjam/pdfpun
pfarrei/a5toa4.tlu
pfarrei/pfarrei.tlu
pkfix-helper/pkfix-helper
pkfix/pkfix.pl
ps2eps/ps2eps.pl
purifyeps/purifyeps
simpdftex/simpdftex
sty2dtx/sty2dtx.pl
texcount/texcount.pl
texdef/texdef.pl
texdiff/texdiff
texdirflatten/texdirflatten
texdoc/texdoc.tlu
texdoctk/texdoctk.pl
texlive/allcm.sh
texlive/allneeded.sh
texlive/dvi2fax.sh
texlive/dvired.sh
texlive/e2pall.sh
texlive/fmtutil-sys.sh
texlive/fmtutil.sh
texlive/fontinst.sh
texlive/kpsetool.sh
texlive/kpsewhere.sh
texlive/ps2frag.sh
texlive/pslatex.sh
texlive/rungs.tlu
texlive/texconfig-dialog.sh
texlive/texconfig-sys.sh
texlive/texconfig.sh
texlive/texlinks.sh
texlive/updmap-sys.sh
texlive/updmap.pl
texliveonfly/texliveonfly.py
texloganalyser/texloganalyser
thumbpdf/thumbpdf.pl
typeoutfileinfo/typeoutfileinfo.sh
xindy/texindy.pl
xindy/xindy.pl
"""
    for p in linked_scripts.split():
        bn = shelltools.baseName(p).split(".")[0]
        if shelltools.isFile("%s/usr/share/texmf-dist/scripts/%s" % (get.installDIR(), p)):
            pisitools.dosym("/usr/share/texmf-dist/scripts/%s" % p, "/usr/bin/%s" % bn)

    #? pisitools.dosym("/usr/share/texmf-dist/scripts/listings-ext/listings-ext.sh", "/usr/bin/listings-ext.sh")
    pisitools.dosym("allcm", "/usr/bin/allec")
    pisitools.dosym("fmtutil", "/usr/bin/mktexfmt")
    pisitools.dosym("kpsetool", "/usr/bin/kpsexpand")
    pisitools.dosym("kpsetool", "/usr/bin/kpsepath")
    pisitools.dosym("epstopdf", "/usr/bin/repstopdf")
    pisitools.dosym("pdfcrop", "/usr/bin/rpdfcrop")
    pisitools.dosym("luaotfload-tool", "/usr/bin/mkluatexfontdb")

    #remove unneded
    pisitools.removeDir("/usr/share/texmf-dist/scripts/context/stubs/mswin")
    pisitools.removeDir("/usr/share/texmf-dist/scripts/context/stubs/win64")

    #remove conflicts files with texlive-bin
    pisitools.remove("/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/*.pro")
    pisitools.remove("/usr/share/texmf-dist/dvips/gsftopk/render.ps")
    pisitools.remove("/usr/share/texmf-dist/fonts/cmap/dvipdfmx/EUC-UCS2")
    pisitools.remove("/usr/share/texmf-dist/fonts/enc/dvips/base/7t.enc")
    pisitools.remove("/usr/share/texmf-dist/fonts/enc/ttf2pk/base/T1-WGL4.enc")
    pisitools.remove("/usr/share/texmf-dist/fonts/map/dvipdfmx/cid-x.map")
    pisitools.removeDir("/usr/share/texmf-dist/fonts/sfd/ttf2pk")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/*jit")
    pisitools.removeDir("/usr/share/texmf-dist/scripts/crossrefware")
    pisitools.remove("/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg")
    pisitools.remove("/usr/share/texmf-dist/ttf2pk/VPS.rpl")
    
    pisitools.remove("/usr/share/texmf-dist/web2c/mktex*")
    pisitools.removeDir("/usr/share/texmf-dist/xdvi")
    pisitools.removeDir("/usr/share/texmf-dist/bibtex/csf/base")
    pisitools.remove("/usr/share/texmf-dist/chktex/chktexrc")
示例#35
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls(get.workDIR()):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)
 
    pisitools.insinto("/usr/share/", "%s/texmf-dist" % get.workDIR())
    
 
 # copy config file to texmf-config
    pisitools.dodir("/etc/texmf/chktex")
    pisitools.dodir("/etc/texmf/web2c")
    pisitools.dodir("/etc/texmf/dvips/config")
    pisitools.dodir("/etc/texmf/dvipdfmx")
    pisitools.dodir("/etc/texmf/tex/generic/config")
    pisitools.dodir("/etc/texmf/ttf2pk")
    pisitools.dodir("/etc/texmf/xdvi")
    
    shelltools.copy("%s/usr/share/texmf-dist/chktex/chktexrc" % get.installDIR(), \
                    "%s/etc/texmf/chktex" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/mktex.cnf" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/mktex.cnf" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/updmap.cfg" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/dvips/config/config.ps" % get.installDIR(), \
                    "%s/etc/texmf/dvips/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg" % get.installDIR(), \
                    "%s/etc/texmf/dvipdfmx" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/tex/generic/config/pdftexconfig.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/generic/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/tex/generic/config/pdftex-dvi.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/generic/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/tex/generic/config/luatexiniconfig.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/generic/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg" % get.installDIR(), \
                    "%s/etc/texmf/ttf2pk" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/xdvi/XDvi" % get.installDIR(), \
                    "%s/etc/texmf/xdvi" % get.installDIR())
    pisitools.remove("/usr/share/texmf-dist/web2c/updmap.cfg")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/mswin")
    
    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    
    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    
    linked_scripts=[  "a2ping/a2ping.pl",
		      "accfonts/mkt1font",
		      "accfonts/vpl2ovp",
		      "accfonts/vpl2vpl",
		      "adhocfilelist/adhocfilelist.sh",
		      "arara/arara.sh",
		      "bundledoc/arlatex",
		      "bundledoc/bundledoc",
		      "checkcites/checkcites.lua",
		      "chktex/chkweb.sh",
		      "chktex/deweb.pl",
		      "context/perl/mptopdf.pl",
		      "ctanify/ctanify",
		      "ctanupload/ctanupload.pl",
		      "de-macro/de-macro",
		      "dosepsbin/dosepsbin.pl",
		      "dtxgen/dtxgen",
		      "dviasm/dviasm.py",
		      "epstopdf/epstopdf.pl",
		      "findhyph/findhyph",
		      "fontools/afm2afm",
		      "fontools/autoinst",
		      "fontools/ot2kpx",
		      "fragmaster/fragmaster.pl",
		      "installfont/installfont-tl",
		      "latex2man/latex2man",
		      "latexdiff/latexdiff-vc.pl",
		      "latexdiff/latexdiff.pl",
		      "latexdiff/latexrevise.pl",
		      "latexfileversion/latexfileversion",
		      "latexmk/latexmk.pl",
		      "latexpand/latexpand",
		      "ltxfileinfo/ltxfileinfo",
		      "lua2dox/lua2dox_filter",
		      "luaotfload/luaotfload-tool.lua",
		      "match_parens/match_parens",
		      "mf2pt1/mf2pt1.pl",
		      "mkjobtexmf/mkjobtexmf.pl",
		      "pdfcrop/pdfcrop.pl",
		      "pfarrei/a5toa4.tlu",
		      "pfarrei/pfarrei.tlu",
		      "pkfix-helper/pkfix-helper",
		      "pkfix/pkfix.pl",
		      "ps2eps/ps2eps.pl",
		      "purifyeps/purifyeps",
		      "simpdftex/simpdftex",
		      "sty2dtx/sty2dtx.pl",
		      "texcount/texcount.pl",
		      "texdef/texdef.pl",
		      "texdiff/texdiff",
		      "texdirflatten/texdirflatten",
		      "texdoc/texdoc.tlu",
		      "texdoctk/texdoctk.pl",
		      "texliveonfly/texliveonfly.py",
		      "texloganalyser/texloganalyser",
		      "thumbpdf/thumbpdf.pl",
		      "typeoutfileinfo/typeoutfileinfo.sh",
		      "xindy/texindy.pl",
		      "xindy/xindy.pl"]
 
    for folder in linked_scripts:
        #pisitools.insinto("/usr/bin/", "/usr/share/texmf-dist/scripts/%s" % folder, sym = True)
        split = re.split('[/]',folder)
        pisitools.dosym("/usr/share/texmf-dist/scripts/%s" % folder,"/usr/bin/%s" % split[1])
    pisitools.dosym("/usr/share/texmf-dist/scripts/listings-ext/listings-ext.sh", "/usr/bin/listings-ext.sh")
    
    texlive_scripts=[ "allcm.sh",
		      "allneeded.sh",
		      "dvi2fax.sh",
		      "dvired.sh",
		      "fmtutil-sys.sh",
		      "fmtutil.sh",
		      "fontinst.sh",
		      "kpsetool.sh",
		      "kpsewhere.sh",
		      "ps2frag.sh",
		      "pslatex.sh",
		      "rungs.tlu",
		      "texconfig-dialog.sh",
		      "texconfig-sys.sh",
		      "texconfig.sh",
		      "texlinks.sh",
		      "updmap-sys.sh",
		      "updmap.pl"]
    
    for folder in texlive_scripts:
        pisitools.dosym("/usr/share/texmf-dist/scripts/texlive/%s" % folder, "/usr/bin/%s" % folder)
        
    pdfjam_scripts=[  "pdf180",
		      "pdf270",
		      "pdf90",
		      "pdfbook",
		      "pdfflip",
		      "pdfjam",
		      "pdfjam-pocketmod",
		      "pdfjam-slides3up",
		      "pdfjam-slides6up",
		      "pdfjoin",
		      "pdfnup",
		      "pdfpun"]
    
    for folder in pdfjam_scripts:
        pisitools.dosym("/usr/share/texmf-dist/scripts/pdfjam/%s" % folder, "/usr/bin/%s" % folder)
        
    context_scripts=[ "context",
		      "ctxtools",
		      "luatools",
		      "mtxrun",
		      "pstopdf",
		      "texexec",
		      "texmfstart"]
    for folder in context_scripts:
        pisitools.dosym("/usr/share/texmf-dist/scripts/context/stubs/unix/%s" % folder, "/usr/bin/%s" % folder)
    # old packages, we will not provide them
    
    pisitools.remove("/usr/share/texmf-dist/web2c/texmf.cnf")
    pisitools.remove("/usr/bin/lua2dox_filter")
    pisitools.remove("/usr/bin/pkfix-helper")
    pisitools.remove("/usr/bin/latexfileversion") 
    pisitools.remove("/usr/bin/texloganalyser") 
    pisitools.remove("/usr/bin/luatools") 
    pisitools.remove("/usr/bin/pdfnup") 
    pisitools.remove("/usr/bin/mtxrun") 
    pisitools.remove("/etc/texmf/dvipdfmx/dvipdfmx.cfg") 
    pisitools.remove("/usr/bin/vpl2vpl") 
    pisitools.remove("/usr/bin/pdfjam") 
    pisitools.remove("/usr/bin/arlatex") 
    pisitools.remove("/usr/bin/latex2man") 
    pisitools.remove("/usr/bin/pstopdf") 
    pisitools.remove("/usr/bin/ctxtools") 
    pisitools.remove("/usr/bin/pdfjam-pocketmod")
    pisitools.remove("/usr/bin/pdfjam-slides6up") 
    pisitools.remove("/usr/bin/installfont-tl") 
    pisitools.remove("/usr/bin/pdfbook") 
    pisitools.remove("/usr/bin/pdf180") 
    pisitools.remove("/usr/bin/ctanify") 
    pisitools.remove("/etc/texmf/xdvi/XDvi") 
    pisitools.remove("/usr/bin/bundledoc") 
    pisitools.remove("/usr/bin/listings-ext.sh") 
    pisitools.remove("/etc/texmf/web2c/fmtutil.cnf") 
    pisitools.remove("/etc/texmf/chktex/chktexrc") 
    pisitools.remove("/usr/bin/perl")
    pisitools.remove("/usr/bin/pdfpun") 
    pisitools.remove("/usr/bin/ot2kpx") 
    pisitools.remove("/etc/texmf/ttf2pk/ttf2pk.cfg") 
    pisitools.remove("/usr/bin/vpl2ovp") 
    pisitools.remove("/usr/bin/afm2afm") 
    pisitools.remove("/usr/bin/pdfjam-slides3up") 
    pisitools.remove("/usr/bin/simpdftex") 
    pisitools.remove("/usr/bin/texexec") 
    pisitools.remove("/usr/bin/ltxfileinfo") 
    pisitools.remove("/usr/bin/findhyph") 
    pisitools.remove("/usr/bin/texdirflatten") 
    pisitools.remove("/usr/bin/pdfjoin") 
    pisitools.remove("/usr/bin/texmfstart") 
    pisitools.remove("/usr/bin/match_parens") 
    pisitools.remove("/usr/bin/pdf270") 
    pisitools.remove("/usr/bin/texdiff") 
    pisitools.remove("/usr/bin/dtxgen") 
    pisitools.remove("/usr/bin/mkt1font") 
    pisitools.remove("/usr/bin/context") 
    pisitools.remove("/usr/bin/autoinst") 
    pisitools.remove("/usr/bin/pdfflip") 
    pisitools.remove("/usr/bin/pdf90") 
    pisitools.remove("/usr/bin/purifyeps") 
    pisitools.remove("/usr/bin/latexpand") 
    pisitools.remove("/usr/bin/de-macro")
    pisitools.remove("/usr/share/texmf-dist/doc/man/")
    pisitools.remove("/usr/share/texmf-dist/web2c/updmap.cfg")
    pisitools.removeDir("/usr/share/texmf-dist/scripts/context/stubs/mswin/")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/lang/german/tex.xdy")
    pisitools.remove("/usr/share/texmf-dist/web2c/mktexdir")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/texmfstart")
    pisitools.remove("/usr/share/texmf-dist/scripts/a2ping/a2ping.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdf90")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/Big5.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/pkfix/pkfix.pl")
    pisitools.remove("/usr/share/texmf-dist/dvips/gsftopk/render.ps")
    pisitools.remove("/usr/share/texmf-dist/xdvi/pixmap/toolbar2.xpm")
    #pisitools.remove("/usr/share/texmf-dist/scripts/oberdiek/pdfatfi.pl")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/rules/isolatin1-exchange.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/ord/letorder.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/accfonts/mkt1font")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/word-order.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/texdirflatten/texdirflatten")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/dvi2fax.sh")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/rules/latin-exchange.xdy")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UGB.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/xindy/xindy.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfjam-slides3up")
    pisitools.remove("/usr/share/texmf-dist/scripts/latexdiff/latexrevise.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/ctanify/ctanify")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UBig5.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/texdoctk/texdoctk.pl")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/lang/german/din5007.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/accfonts/vpl2ovp")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/Unicode.sfd")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/lang/latin/caseisrt.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/mtxrun")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/fmtutil.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/fontools/ot2kpx")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/88591lat.csf")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdf180")
    pisitools.remove("/usr/share/texmf-dist/web2c/mktexdir.opt")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/ps2frag.sh")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/SJIS.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/texconfig-sys.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfcrop/pdfcrop.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/fontinst.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/perl/mptopdf.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/match_parens/match_parens")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UKS.sfd")
    pisitools.remove("/usr/share/texmf-dist/texconfig/tcfmgr.map")
    pisitools.remove("/usr/share/texmf-dist/scripts/fontools/autoinst")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/texps.pro")
    pisitools.remove("/usr/share/texmf-dist/xdvi/XDvi")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/texconfig-dialog.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/xindy/texindy.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/pstopdf")
    pisitools.remove("/usr/share/texmf-dist/scripts/mkjobtexmf/mkjobtexmf.pl")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/special.pro")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/letter-order.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/numeric-sort.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/tex.xdy")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/texc.pro")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/fmtutil-sys.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfflip")
    pisitools.remove("/usr/share/texmf-dist/scripts/checkcites/checkcites.lua")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/kpsewhere.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/luatools")
    pisitools.remove("/usr/share/texmf-dist/scripts/texdiff/texdiff")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/ff-ranges.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/sty2dtx/sty2dtx.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/pfarrei/pfarrei.tlu")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/tlmgr.pl")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/KS-HLaTeX.sfd")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/EUC.sfd")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UGBK.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/e2pall.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/dtxgen/dtxgen")
    pisitools.remove("/usr/share/texmf-dist/scripts/texdoc/texdoc.tlu")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/lang/german/duden.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/luaotfload/luaotfload-tool.lua")
    pisitools.remove("/usr/share/texmf-dist/scripts/pfarrei/a5toa4.tlu")
    pisitools.remove("/usr/share/texmf-dist/scripts/dosepsbin/dosepsbin.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfnup")
    pisitools.remove("/usr/share/texmf-dist/texconfig/tcfmgr")
    pisitools.remove("/usr/share/texmf-dist/scripts/latexdiff/latexdiff.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/fragmaster/fragmaster.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/findhyph/findhyph")
    pisitools.remove("/usr/share/texmf-dist/scripts/listings-ext/listings-ext.sh")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/rules/latin-tolower.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/german-sty.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/latexpand/latexpand")
    pisitools.remove("/usr/share/texmf-dist/scripts/simpdftex/simpdftex")
    pisitools.remove("/usr/share/texmf-dist/web2c/texmfcnf.lua")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/kpsetool.sh")
    pisitools.remove("/usr/share/texmf-dist/web2c/fmtutil.cnf")
    pisitools.remove("/usr/share/texmf-dist/scripts/thumbpdf/thumbpdf.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/texexec")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/hps.pro")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/ignore-punctuation.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/latex.xdy")
    pisitools.remove("/usr/share/texmf-dist/web2c/mktex.opt")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/cp850sca.csf")
    pisitools.remove("/usr/share/texmf-dist/fonts/enc/ttf2pk/base/T1-WGL4.enc")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/ignore-hyphen.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfjoin")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/keep-blanks.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/texloganalyser/texloganalyser")
    pisitools.remove("/usr/share/texmf-dist/scripts/bundledoc/bundledoc")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/ctxtools")
    pisitools.remove("/usr/share/texmf-dist/scripts/ltxfileinfo/ltxfileinfo")
    pisitools.remove("/usr/share/texmf-dist/web2c/mktexupd")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/class/pagenums.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/allneeded.sh")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/finclude.pro")
    pisitools.remove("/usr/share/texmf-dist/web2c/mktexnam")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/book-order.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/installfont/installfont-tl")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/texlinks.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/dviasm/dviasm.py")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/texconfig.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/epstopdf/epstopdf.pl")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UJIS.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/purifyeps/purifyeps")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/cp866rus.csf")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/styles/basic.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/latexdiff/latexdiff-vc.pl")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/page-ranges.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/rules/isolatin1-tolower.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/latex-loc-fmts.xdy")
    pisitools.remove("/usr/share/texmf-dist/ttf2pk/VPS.rpl")
    pisitools.remove("/usr/share/texmf-dist/scripts/typeoutfileinfo/typeoutfileinfo.sh")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/88591sca.csf")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/updmap.pl")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/texindy.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfjam-slides6up")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UKS-HLaTeX.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/de-macro/de-macro")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/updmap-sys.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfbook")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/cp437lat.csf")
    pisitools.remove("/usr/share/texmf-dist/scripts/latexmk/latexmk.pl")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/lang/latin/letgroup.xdy")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UBg5plus.sfd")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/makeindex.xdy")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/csfile.txt")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/rungs.tlu")
    pisitools.remove("/usr/share/texmf-dist/scripts/bundledoc/arlatex")
    pisitools.remove("/usr/share/texmf-dist/scripts/adhocfilelist/adhocfilelist.sh")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/color.pro")
    pisitools.remove("/usr/share/texmf-dist/scripts/latexfileversion/latexfileversion")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/pslatex.sh")
    pisitools.remove("/usr/share/texmf-dist/xdvi/pixmap/toolbar.xpm")
    #pisitools.remove("/usr/share/texmf-dist/scripts/lua2dox/lua2dox")
    pisitools.remove("/usr/share/texmf-dist/scripts/accfonts/vpl2vpl")
    pisitools.remove("/usr/share/texmf-dist/scripts/fontools/afm2afm")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/context")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/crop.pro")
    pisitools.remove("/usr/share/texmf-dist/scripts/texcount/texcount.pl")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/styles/makeidx.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfjam")
    pisitools.remove("/usr/share/texmf-dist/scripts/pkfix-helper/pkfix-helper")
    pisitools.remove("/usr/share/texmf-dist/scripts/texliveonfly/texliveonfly.py")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/cp850lat.csf")
    pisitools.remove("/usr/share/texmf-dist/web2c/mktexnam.opt")
    pisitools.remove("/usr/share/texmf-dist/xindy/VERSION")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/allcm.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/texdef/texdef.pl")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/ascii.csf")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfpun")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/ff-ranges-only.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/latex2man/latex2man")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/HKSCS.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/dvired.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/mf2pt1/mf2pt1.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/ctanupload/ctanupload.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfjam-pocketmod")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/tex.pro")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdf270")
    pisitools.remove("/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/latin-lettergroups.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/arara/arara.sh")
    
示例#36
0
 def testCanAccessDirectory(self):
     from pisi.actionsapi.shelltools import can_access_directory
     assert can_access_directory('/boot')
     assert can_access_directory('/usr/bin')
     assert not can_access_directory('/tests/mirrors.conf')
示例#37
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls(get.workDIR()):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)
 
    pisitools.insinto("/usr/share/", "%s/texmf-dist" % get.workDIR())
    
 
 # copy config file to texmf-config
    pisitools.dodir("/etc/texmf/chktex")
    pisitools.dodir("/etc/texmf/web2c")
    pisitools.dodir("/etc/texmf/dvips/config")
    pisitools.dodir("/etc/texmf/dvipdfmx")
    pisitools.dodir("/etc/texmf/tex/generic/config")
    pisitools.dodir("/etc/texmf/ttf2pk")
    pisitools.dodir("/etc/texmf/xdvi")
    
    shelltools.copy("%s/usr/share/texmf-dist/chktex/chktexrc" % get.installDIR(), \
                    "%s/etc/texmf/chktex" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/mktex.cnf" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/mktex.cnf" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/updmap.cfg" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/dvips/config/config.ps" % get.installDIR(), \
                    "%s/etc/texmf/dvips/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg" % get.installDIR(), \
                    "%s/etc/texmf/dvipdfmx" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/tex/generic/config/pdftexconfig.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/generic/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/tex/generic/config/pdftex-dvi.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/generic/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/tex/generic/config/luatexiniconfig.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/generic/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg" % get.installDIR(), \
                    "%s/etc/texmf/ttf2pk" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/xdvi/XDvi" % get.installDIR(), \
                    "%s/etc/texmf/xdvi" % get.installDIR())
    pisitools.remove("/usr/share/texmf-dist/web2c/updmap.cfg")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/mswin")
    
    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    
    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    
    linked_scripts=[  "a2ping/a2ping.pl",
		      "accfonts/mkt1font",
		      "accfonts/vpl2ovp",
		      "accfonts/vpl2vpl",
		      "adhocfilelist/adhocfilelist.sh",
		      "arara/arara.sh",
		      "bundledoc/arlatex",
		      "bundledoc/bundledoc",
		      "checkcites/checkcites.lua",
		      "chktex/chkweb.sh",
		      "chktex/deweb.pl",
		      "context/perl/mptopdf.pl",
		      "ctanify/ctanify",
		      "ctanupload/ctanupload.pl",
		      "de-macro/de-macro",
		      "dosepsbin/dosepsbin.pl",
		      "dtxgen/dtxgen",
		      "dviasm/dviasm.py",
		      "epstopdf/epstopdf.pl",
		      "findhyph/findhyph",
		      "fontools/afm2afm",
		      "fontools/autoinst",
		      "fontools/ot2kpx",
		      "fragmaster/fragmaster.pl",
		      "installfont/installfont-tl",
		      "latex2man/latex2man",
		      "latexdiff/latexdiff-vc.pl",
		      "latexdiff/latexdiff.pl",
		      "latexdiff/latexrevise.pl",
		      "latexfileversion/latexfileversion",
		      "latexmk/latexmk.pl",
		      "latexpand/latexpand",
		      "ltxfileinfo/ltxfileinfo",
		      "lua2dox/lua2dox_filter",
		      "luaotfload/luaotfload-tool.lua",
		      "match_parens/match_parens",
		      "mf2pt1/mf2pt1.pl",
		      "mkjobtexmf/mkjobtexmf.pl",
		      "pdfcrop/pdfcrop.pl",
		      "pfarrei/a5toa4.tlu",
		      "pfarrei/pfarrei.tlu",
		      "pkfix-helper/pkfix-helper",
		      "pkfix/pkfix.pl",
		      "ps2eps/ps2eps.pl",
		      "purifyeps/purifyeps",
		      "simpdftex/simpdftex",
		      "sty2dtx/sty2dtx.pl",
		      "texcount/texcount.pl",
		      "texdef/texdef.pl",
		      "texdiff/texdiff",
		      "texdirflatten/texdirflatten",
		      "texdoc/texdoc.tlu",
		      "texdoctk/texdoctk.pl",
		      "texliveonfly/texliveonfly.py",
		      "texloganalyser/texloganalyser",
		      "thumbpdf/thumbpdf.pl",
		      "typeoutfileinfo/typeoutfileinfo.sh",
		      "xindy/texindy.pl",
		      "xindy/xindy.pl"]
 
    for folder in linked_scripts:
        #pisitools.insinto("/usr/bin/", "/usr/share/texmf-dist/scripts/%s" % folder, sym = True)
        split = re.split('[/]',folder)
        pisitools.dosym("/usr/share/texmf-dist/scripts/%s" % folder,"/usr/bin/%s" % split[1])
    pisitools.dosym("/usr/share/texmf-dist/scripts/listings-ext/listings-ext.sh", "/usr/bin/listings-ext.sh")
    
    texlive_scripts=[ "allcm.sh",
		      "allneeded.sh",
		      "dvi2fax.sh",
		      "dvired.sh",
		      "fmtutil-sys.sh",
		      "fmtutil.sh",
		      "fontinst.sh",
		      "kpsetool.sh",
		      "kpsewhere.sh",
		      "ps2frag.sh",
		      "pslatex.sh",
		      "rungs.tlu",
		      "texconfig-dialog.sh",
		      "texconfig-sys.sh",
		      "texconfig.sh",
		      "texlinks.sh",
		      "updmap-sys.sh",
		      "updmap.pl"]
    
    for folder in texlive_scripts:
        pisitools.dosym("/usr/share/texmf-dist/scripts/texlive/%s" % folder, "/usr/bin/%s" % folder)
        
    pdfjam_scripts=[  "pdf180",
		      "pdf270",
		      "pdf90",
		      "pdfbook",
		      "pdfflip",
		      "pdfjam",
		      "pdfjam-pocketmod",
		      "pdfjam-slides3up",
		      "pdfjam-slides6up",
		      "pdfjoin",
		      "pdfnup",
		      "pdfpun"]
    
    for folder in pdfjam_scripts:
        pisitools.dosym("/usr/share/texmf-dist/scripts/pdfjam/%s" % folder, "/usr/bin/%s" % folder)
        
    context_scripts=[ "context",
		      "ctxtools",
		      "luatools",
		      "mtxrun",
		      "pstopdf",
		      "texexec",
		      "texmfstart"]
    for folder in context_scripts:
        pisitools.dosym("/usr/share/texmf-dist/scripts/context/stubs/unix/%s" % folder, "/usr/bin/%s" % folder)
    # old packages, we will not provide them
    
    pisitools.remove("/usr/share/texmf-dist/web2c/texmf.cnf")
    pisitools.remove("/usr/bin/lua2dox_filter")
    pisitools.remove("/usr/bin/pkfix-helper")
    pisitools.remove("/usr/bin/latexfileversion") 
    pisitools.remove("/usr/bin/texloganalyser") 
    pisitools.remove("/usr/bin/luatools") 
    pisitools.remove("/usr/bin/pdfnup") 
    pisitools.remove("/usr/bin/mtxrun") 
    pisitools.remove("/etc/texmf/dvipdfmx/dvipdfmx.cfg") 
    pisitools.remove("/usr/bin/vpl2vpl") 
    pisitools.remove("/usr/bin/pdfjam") 
    pisitools.remove("/usr/bin/arlatex") 
    pisitools.remove("/usr/bin/latex2man") 
    pisitools.remove("/usr/bin/pstopdf") 
    pisitools.remove("/usr/bin/ctxtools") 
    pisitools.remove("/usr/bin/pdfjam-pocketmod")
    pisitools.remove("/usr/bin/pdfjam-slides6up") 
    pisitools.remove("/usr/bin/installfont-tl") 
    pisitools.remove("/usr/bin/pdfbook") 
    pisitools.remove("/usr/bin/pdf180") 
    pisitools.remove("/usr/bin/ctanify") 
    pisitools.remove("/etc/texmf/xdvi/XDvi") 
    pisitools.remove("/usr/bin/bundledoc") 
    pisitools.remove("/usr/bin/listings-ext.sh") 
    pisitools.remove("/etc/texmf/web2c/fmtutil.cnf") 
    pisitools.remove("/etc/texmf/chktex/chktexrc") 
    pisitools.remove("/usr/bin/perl")
    pisitools.remove("/usr/bin/pdfpun") 
    pisitools.remove("/usr/bin/ot2kpx") 
    pisitools.remove("/etc/texmf/ttf2pk/ttf2pk.cfg") 
    pisitools.remove("/usr/bin/vpl2ovp") 
    pisitools.remove("/usr/bin/afm2afm") 
    pisitools.remove("/usr/bin/pdfjam-slides3up") 
    pisitools.remove("/usr/bin/simpdftex") 
    pisitools.remove("/usr/bin/texexec") 
    pisitools.remove("/usr/bin/ltxfileinfo") 
    pisitools.remove("/usr/bin/findhyph") 
    pisitools.remove("/usr/bin/texdirflatten") 
    pisitools.remove("/usr/bin/pdfjoin") 
    pisitools.remove("/usr/bin/texmfstart") 
    pisitools.remove("/usr/bin/match_parens") 
    pisitools.remove("/usr/bin/pdf270") 
    pisitools.remove("/usr/bin/texdiff") 
    pisitools.remove("/usr/bin/dtxgen") 
    pisitools.remove("/usr/bin/mkt1font") 
    pisitools.remove("/usr/bin/context") 
    pisitools.remove("/usr/bin/autoinst") 
    pisitools.remove("/usr/bin/pdfflip") 
    pisitools.remove("/usr/bin/pdf90") 
    pisitools.remove("/usr/bin/purifyeps") 
    pisitools.remove("/usr/bin/latexpand") 
    pisitools.remove("/usr/bin/de-macro")
    pisitools.remove("/usr/share/texmf-dist/doc/man/")
    pisitools.remove("/usr/share/texmf-dist/web2c/updmap.cfg")
    pisitools.removeDir("/usr/share/texmf-dist/scripts/context/stubs/mswin/")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/lang/german/tex.xdy")
    pisitools.remove("/usr/share/texmf-dist/web2c/mktexdir")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/texmfstart")
    pisitools.remove("/usr/share/texmf-dist/scripts/a2ping/a2ping.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdf90")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/Big5.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/pkfix/pkfix.pl")
    pisitools.remove("/usr/share/texmf-dist/dvips/gsftopk/render.ps")
    pisitools.remove("/usr/share/texmf-dist/xdvi/pixmap/toolbar2.xpm")
    #pisitools.remove("/usr/share/texmf-dist/scripts/oberdiek/pdfatfi.pl")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/rules/isolatin1-exchange.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/ord/letorder.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/accfonts/mkt1font")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/word-order.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/texdirflatten/texdirflatten")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/dvi2fax.sh")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/rules/latin-exchange.xdy")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UGB.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/xindy/xindy.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfjam-slides3up")
    pisitools.remove("/usr/share/texmf-dist/scripts/latexdiff/latexrevise.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/ctanify/ctanify")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UBig5.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/texdoctk/texdoctk.pl")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/lang/german/din5007.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/accfonts/vpl2ovp")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/Unicode.sfd")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/lang/latin/caseisrt.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/mtxrun")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/fmtutil.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/fontools/ot2kpx")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/88591lat.csf")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdf180")
    pisitools.remove("/usr/share/texmf-dist/web2c/mktexdir.opt")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/ps2frag.sh")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/SJIS.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/texconfig-sys.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfcrop/pdfcrop.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/fontinst.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/perl/mptopdf.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/match_parens/match_parens")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UKS.sfd")
    pisitools.remove("/usr/share/texmf-dist/texconfig/tcfmgr.map")
    pisitools.remove("/usr/share/texmf-dist/scripts/fontools/autoinst")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/texps.pro")
    pisitools.remove("/usr/share/texmf-dist/xdvi/XDvi")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/texconfig-dialog.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/xindy/texindy.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/pstopdf")
    pisitools.remove("/usr/share/texmf-dist/scripts/mkjobtexmf/mkjobtexmf.pl")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/special.pro")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/letter-order.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/numeric-sort.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/tex.xdy")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/texc.pro")
    #pisitools.remove("/usr/share/texmf-dist/scripts/texlive/fmtutil-sys.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfflip")
    pisitools.remove("/usr/share/texmf-dist/scripts/checkcites/checkcites.lua")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/kpsewhere.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/luatools")
    pisitools.remove("/usr/share/texmf-dist/scripts/texdiff/texdiff")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/ff-ranges.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/sty2dtx/sty2dtx.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/pfarrei/pfarrei.tlu")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/tlmgr.pl")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/KS-HLaTeX.sfd")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/EUC.sfd")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UGBK.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/e2pall.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/dtxgen/dtxgen")
    pisitools.remove("/usr/share/texmf-dist/scripts/texdoc/texdoc.tlu")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/lang/german/duden.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/luaotfload/luaotfload-tool.lua")
    pisitools.remove("/usr/share/texmf-dist/scripts/pfarrei/a5toa4.tlu")
    pisitools.remove("/usr/share/texmf-dist/scripts/dosepsbin/dosepsbin.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfnup")
    pisitools.remove("/usr/share/texmf-dist/texconfig/tcfmgr")
    pisitools.remove("/usr/share/texmf-dist/scripts/latexdiff/latexdiff.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/fragmaster/fragmaster.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/findhyph/findhyph")
    pisitools.remove("/usr/share/texmf-dist/scripts/listings-ext/listings-ext.sh")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/rules/latin-tolower.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/german-sty.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/latexpand/latexpand")
    pisitools.remove("/usr/share/texmf-dist/scripts/simpdftex/simpdftex")
    pisitools.remove("/usr/share/texmf-dist/web2c/texmfcnf.lua")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/kpsetool.sh")
    pisitools.remove("/usr/share/texmf-dist/web2c/fmtutil.cnf")
    pisitools.remove("/usr/share/texmf-dist/scripts/thumbpdf/thumbpdf.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/texexec")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/hps.pro")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/ignore-punctuation.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/latex.xdy")
    pisitools.remove("/usr/share/texmf-dist/web2c/mktex.opt")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/cp850sca.csf")
    pisitools.remove("/usr/share/texmf-dist/fonts/enc/ttf2pk/base/T1-WGL4.enc")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/ignore-hyphen.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfjoin")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/keep-blanks.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/texloganalyser/texloganalyser")
    pisitools.remove("/usr/share/texmf-dist/scripts/bundledoc/bundledoc")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/ctxtools")
    pisitools.remove("/usr/share/texmf-dist/scripts/ltxfileinfo/ltxfileinfo")
    pisitools.remove("/usr/share/texmf-dist/web2c/mktexupd")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/class/pagenums.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/allneeded.sh")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/finclude.pro")
    pisitools.remove("/usr/share/texmf-dist/web2c/mktexnam")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/book-order.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/installfont/installfont-tl")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/texlinks.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/dviasm/dviasm.py")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/texconfig.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/epstopdf/epstopdf.pl")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UJIS.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/purifyeps/purifyeps")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/cp866rus.csf")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/styles/basic.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/latexdiff/latexdiff-vc.pl")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/page-ranges.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/rules/isolatin1-tolower.xdy")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/latex-loc-fmts.xdy")
    pisitools.remove("/usr/share/texmf-dist/ttf2pk/VPS.rpl")
    pisitools.remove("/usr/share/texmf-dist/scripts/typeoutfileinfo/typeoutfileinfo.sh")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/88591sca.csf")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/updmap.pl")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/texindy.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfjam-slides6up")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UKS-HLaTeX.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/de-macro/de-macro")
    #pisitools.remove("/usr/share/texmf-dist/scripts/texlive/updmap-sys.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfbook")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/cp437lat.csf")
    pisitools.remove("/usr/share/texmf-dist/scripts/latexmk/latexmk.pl")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/lang/latin/letgroup.xdy")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/UBg5plus.sfd")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/makeindex.xdy")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/csfile.txt")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/rungs.tlu")
    pisitools.remove("/usr/share/texmf-dist/scripts/bundledoc/arlatex")
    pisitools.remove("/usr/share/texmf-dist/scripts/adhocfilelist/adhocfilelist.sh")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/color.pro")
    pisitools.remove("/usr/share/texmf-dist/scripts/latexfileversion/latexfileversion")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/pslatex.sh")
    pisitools.remove("/usr/share/texmf-dist/xdvi/pixmap/toolbar.xpm")
    #pisitools.remove("/usr/share/texmf-dist/scripts/lua2dox/lua2dox")
    pisitools.remove("/usr/share/texmf-dist/scripts/accfonts/vpl2vpl")
    pisitools.remove("/usr/share/texmf-dist/scripts/fontools/afm2afm")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/context")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/crop.pro")
    pisitools.remove("/usr/share/texmf-dist/scripts/texcount/texcount.pl")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/styles/makeidx.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfjam")
    pisitools.remove("/usr/share/texmf-dist/scripts/pkfix-helper/pkfix-helper")
    pisitools.remove("/usr/share/texmf-dist/scripts/texliveonfly/texliveonfly.py")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/cp850lat.csf")
    pisitools.remove("/usr/share/texmf-dist/web2c/mktexnam.opt")
    pisitools.remove("/usr/share/texmf-dist/xindy/VERSION")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/allcm.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/texdef/texdef.pl")
    pisitools.remove("/usr/share/texmf-dist/bibtex/csf/base/ascii.csf")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfpun")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/ff-ranges-only.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/latex2man/latex2man")
    pisitools.remove("/usr/share/texmf-dist/fonts/sfd/ttf2pk/HKSCS.sfd")
    pisitools.remove("/usr/share/texmf-dist/scripts/texlive/dvired.sh")
    pisitools.remove("/usr/share/texmf-dist/scripts/mf2pt1/mf2pt1.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/ctanupload/ctanupload.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdfjam-pocketmod")
    pisitools.remove("/usr/share/texmf-dist/dvips/base/tex.pro")
    pisitools.remove("/usr/share/texmf-dist/scripts/pdfjam/pdf270")
    pisitools.remove("/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg")
    pisitools.remove("/usr/share/texmf-dist/xindy/modules/base/latin-lettergroups.xdy")
    pisitools.remove("/usr/share/texmf-dist/scripts/arara/arara.sh")
    
示例#38
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls(get.workDIR()):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)
 
    pisitools.insinto("/usr/share/", "%s/texmf-dist" % get.workDIR())
    
 
 # copy config file to texmf-config
    pisitools.dodir("/etc/texmf/chktex")
    pisitools.dodir("/etc/texmf/web2c")
    pisitools.dodir("/etc/texmf/dvips/config")
    pisitools.dodir("/etc/texmf/dvipdfmx")
    pisitools.dodir("/etc/texmf/tex/generic/config")
    pisitools.dodir("/etc/texmf/ttf2pk")
    pisitools.dodir("/etc/texmf/xdvi")
    
    shelltools.copy("%s/usr/share/texmf-dist/chktex/chktexrc" % get.installDIR(), \
                    "%s/etc/texmf/chktex" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/mktex.cnf" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/mktex.cnf" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/updmap.cfg" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/dvips/config/config.ps" % get.installDIR(), \
                    "%s/etc/texmf/dvips/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg" % get.installDIR(), \
                    "%s/etc/texmf/dvipdfmx" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/tex/generic/config/pdftexconfig.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/generic/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/tex/generic/config/pdftex-dvi.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/generic/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/tex/generic/config/luatexiniconfig.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/generic/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg" % get.installDIR(), \
                    "%s/etc/texmf/ttf2pk" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/xdvi/XDvi" % get.installDIR(), \
                    "%s/etc/texmf/xdvi" % get.installDIR())
    pisitools.remove("/usr/share/texmf-dist/web2c/updmap.cfg")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/mswin")
    
    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    
    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    
    linked_scripts=[  "a2ping/a2ping.pl",
		      "accfonts/mkt1font",
		      "accfonts/vpl2ovp",
		      "accfonts/vpl2vpl",
		      "adhocfilelist/adhocfilelist.sh",
		      "arara/arara.sh",
		      "bundledoc/arlatex",
		      "bundledoc/bundledoc",
		      "checkcites/checkcites.lua",
		      "chktex/chkweb.sh",
		      "chktex/deweb.pl",
		      "context/perl/mptopdf.pl",
		      "ctanify/ctanify",
		      "ctanupload/ctanupload.pl",
		      "de-macro/de-macro",
		      "dosepsbin/dosepsbin.pl",
		      "dtxgen/dtxgen",
		      "dviasm/dviasm.py",
		      "epstopdf/epstopdf.pl",
		      "findhyph/findhyph",
		      "fontools/afm2afm",
		      "fontools/autoinst",
		      "fontools/ot2kpx",
		      "fragmaster/fragmaster.pl",
		      "installfont/installfont-tl",
		      "latex2man/latex2man",
		      "latexdiff/latexdiff-vc.pl",
		      "latexdiff/latexdiff.pl",
		      "latexdiff/latexrevise.pl",
		      "latexfileversion/latexfileversion",
		      "latexmk/latexmk.pl",
		      "latexpand/latexpand",
		      "ltxfileinfo/ltxfileinfo",
		      "lua2dox/lua2dox_filter",
		      "luaotfload/luaotfload-tool.lua",
		      "match_parens/match_parens",
		      "mf2pt1/mf2pt1.pl",
		      "mkjobtexmf/mkjobtexmf.pl",
		      "pdfcrop/pdfcrop.pl",
		      "pfarrei/a5toa4.tlu",
		      "pfarrei/pfarrei.tlu",
		      "pkfix-helper/pkfix-helper",
		      "pkfix/pkfix.pl",
		      "ps2eps/ps2eps.pl",
		      "purifyeps/purifyeps",
		      "simpdftex/simpdftex",
		      "sty2dtx/sty2dtx.pl",
		      "texcount/texcount.pl",
		      "texdef/texdef.pl",
		      "texdiff/texdiff",
		      "texdirflatten/texdirflatten",
		      "texdoc/texdoc.tlu",
		      "texdoctk/texdoctk.pl",
		      "texliveonfly/texliveonfly.py",
		      "texloganalyser/texloganalyser",
		      "thumbpdf/thumbpdf.pl",
		      "typeoutfileinfo/typeoutfileinfo.sh",
		      "xindy/texindy.pl",
		      "xindy/xindy.pl"]
 
    for folder in linked_scripts:
        #pisitools.insinto("/usr/bin/", "/usr/share/texmf-dist/scripts/%s" % folder, sym = True)
        split = re.split('[/]',folder)
        pisitools.dosym("/usr/share/texmf-dist/scripts/%s" % folder,"/usr/bin/%s" % split[1])
    pisitools.dosym("/usr/share/texmf-dist/scripts/listings-ext/listings-ext.sh", "/usr/bin/listings-ext.sh")
    
    texlive_scripts=[ "allcm.sh",
		      "allneeded.sh",
		      "dvi2fax.sh",
		      "dvired.sh",
		      "fmtutil-sys.sh",
		      "fmtutil.sh",
		      "fontinst.sh",
		      "kpsetool.sh",
		      "kpsewhere.sh",
		      "ps2frag.sh",
		      "pslatex.sh",
		      "rungs.tlu",
		      "texconfig-dialog.sh",
		      "texconfig-sys.sh",
		      "texconfig.sh",
		      "texlinks.sh",
		      "updmap-sys.sh",
		      "updmap.pl"]
    
    for folder in texlive_scripts:
        pisitools.dosym("/usr/share/texmf-dist/scripts/texlive/%s" % folder, "/usr/bin/%s" % folder)
        
    pdfjam_scripts=[  "pdf180",
		      "pdf270",
		      "pdf90",
		      "pdfbook",
		      "pdfflip",
		      "pdfjam",
		      "pdfjam-pocketmod",
		      "pdfjam-slides3up",
		      "pdfjam-slides6up",
		      "pdfjoin",
		      "pdfnup",
		      "pdfpun"]
    
    for folder in pdfjam_scripts:
        pisitools.dosym("/usr/share/texmf-dist/scripts/pdfjam/%s" % folder, "/usr/bin/%s" % folder)
        
    context_scripts=[ "context",
		      "ctxtools",
		      "luatools",
		      "mtxrun",
		      "pstopdf",
		      "texexec",
		      "texmfstart"]
    for folder in context_scripts:
        pisitools.dosym("/usr/share/texmf-dist/scripts/context/stubs/unix/%s" % folder, "/usr/bin/%s" % folder)
    # old packages, we will not provide them
    
    pisitools.remove("/usr/share/texmf-dist/web2c/texmf.cnf")
    pisitools.remove("/usr/bin/lua2dox_filter")
    pisitools.remove("/usr/bin/pkfix-helper")
    pisitools.remove("/usr/bin/latexfileversion") 
    pisitools.remove("/usr/bin/texloganalyser") 
    pisitools.remove("/usr/bin/luatools") 
    pisitools.remove("/usr/bin/pdfnup") 
    pisitools.remove("/usr/bin/mtxrun") 
    pisitools.remove("/etc/texmf/dvipdfmx/dvipdfmx.cfg") 
    pisitools.remove("/usr/bin/vpl2vpl") 
    pisitools.remove("/usr/bin/pdfjam") 
    pisitools.remove("/usr/bin/arlatex") 
    pisitools.remove("/usr/bin/latex2man") 
    pisitools.remove("/usr/bin/pstopdf") 
    pisitools.remove("/usr/bin/ctxtools") 
    pisitools.remove("/usr/bin/pdfjam-pocketmod")
    pisitools.remove("/usr/bin/pdfjam-slides6up") 
    pisitools.remove("/usr/bin/installfont-tl") 
    pisitools.remove("/usr/bin/pdfbook") 
    pisitools.remove("/usr/bin/pdf180") 
    pisitools.remove("/usr/bin/ctanify") 
    pisitools.remove("/etc/texmf/xdvi/XDvi") 
    pisitools.remove("/usr/bin/bundledoc") 
    pisitools.remove("/usr/bin/listings-ext.sh") 
    pisitools.remove("/etc/texmf/web2c/fmtutil.cnf") 
    pisitools.remove("/etc/texmf/chktex/chktexrc") 
    pisitools.remove("/usr/bin/perl")
    pisitools.remove("/usr/bin/pdfpun") 
    pisitools.remove("/usr/bin/ot2kpx") 
    pisitools.remove("/etc/texmf/ttf2pk/ttf2pk.cfg") 
    pisitools.remove("/usr/bin/vpl2ovp") 
    pisitools.remove("/usr/bin/afm2afm") 
    pisitools.remove("/usr/bin/pdfjam-slides3up") 
    pisitools.remove("/usr/bin/simpdftex") 
    pisitools.remove("/usr/bin/texexec") 
    pisitools.remove("/usr/bin/ltxfileinfo") 
    pisitools.remove("/usr/bin/findhyph") 
    pisitools.remove("/usr/bin/texdirflatten") 
    pisitools.remove("/usr/bin/pdfjoin") 
    pisitools.remove("/usr/bin/texmfstart") 
    pisitools.remove("/usr/bin/match_parens") 
    pisitools.remove("/usr/bin/pdf270") 
    pisitools.remove("/usr/bin/texdiff") 
    pisitools.remove("/usr/bin/dtxgen") 
    pisitools.remove("/usr/bin/mkt1font") 
    pisitools.remove("/usr/bin/context") 
    pisitools.remove("/usr/bin/autoinst") 
    pisitools.remove("/usr/bin/pdfflip") 
    pisitools.remove("/usr/bin/pdf90") 
    pisitools.remove("/usr/bin/purifyeps") 
    pisitools.remove("/usr/bin/latexpand") 
    pisitools.remove("/usr/bin/de-macro")
示例#39
0
    def testShelltoolsCanAccessDir(self):
        from pisi.actionsapi.shelltools import can_access_directory

        self.assertEqual(can_access_directory("tests/actionsapitests/adirectory"), True)
        self.assertEqual(can_access_directory("tests/actionsapitests/adirectoryX"), False)
        self.assertEqual(can_access_directory("tests/actionsapitests/linktoadirectory"), False)
示例#40
0
def install():
    pisitools.dodir("/usr/share")

    wanteddirs = []
    for file_ in shelltools.ls(get.workDIR()):
        if shelltools.isDirectory(file_) and not "texmf" in file_:
            wanteddirs.append(file_)
 
    pisitools.insinto("/usr/share/", "%s/texmf-dist" % get.workDIR())
    
 
 # copy config file to texmf-config
    pisitools.dodir("/etc/texmf/chktex")
    pisitools.dodir("/etc/texmf/web2c")
    pisitools.dodir("/etc/texmf/dvips/config")
    pisitools.dodir("/etc/texmf/dvipdfmx")
    pisitools.dodir("/etc/texmf/tex/generic/config")
    pisitools.dodir("/etc/texmf/ttf2pk")
    pisitools.dodir("/etc/texmf/xdvi")
    
    shelltools.copy("%s/usr/share/texmf-dist/chktex/chktexrc" % get.installDIR(), \
                    "%s/etc/texmf/chktex" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/mktex.cnf" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/mktex.cnf" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/updmap.cfg" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(), \
                    "%s/etc/texmf/web2c" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/dvips/config/config.ps" % get.installDIR(), \
                    "%s/etc/texmf/dvips/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg" % get.installDIR(), \
                    "%s/etc/texmf/dvipdfmx" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/tex/generic/config/pdftexconfig.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/generic/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/tex/generic/config/pdftex-dvi.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/generic/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/tex/generic/config/luatexiniconfig.tex" % get.installDIR(), \
                    "%s/etc/texmf/tex/generic/config" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg" % get.installDIR(), \
                    "%s/etc/texmf/ttf2pk" % get.installDIR())
    shelltools.copy("%s/usr/share/texmf-dist/xdvi/XDvi" % get.installDIR(), \
                    "%s/etc/texmf/xdvi" % get.installDIR())
    pisitools.remove("/usr/share/texmf-dist/web2c/updmap.cfg")
    pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/mswin")
    
    if shelltools.can_access_directory("texmf-dist"):
        # Recursively copy on directory on top of another, overwrite duplicate files too
        copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR())

    
    ## chmod of script files
    script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts"
    if shelltools.can_access_directory(script_dir):
        for root, dirs, files in os.walk(script_dir):
            for name in files:
                shelltools.chmod(os.path.join(root, name), 0755)

    
    linked_scripts=[  "a2ping/a2ping.pl",
		      "accfonts/mkt1font",
		      "accfonts/vpl2ovp",
		      "accfonts/vpl2vpl",
		      "adhocfilelist/adhocfilelist.sh",
		      "arara/arara.sh",
		      "bundledoc/arlatex",
		      "bundledoc/bundledoc",
		      "checkcites/checkcites.lua",
		      "chktex/chkweb.sh",
		      "chktex/deweb.pl",
		      "context/perl/mptopdf.pl",
		      "ctanify/ctanify",
		      "ctanupload/ctanupload.pl",
		      "de-macro/de-macro",
		      "dosepsbin/dosepsbin.pl",
		      "dtxgen/dtxgen",
		      "dviasm/dviasm.py",
		      "epstopdf/epstopdf.pl",
		      "findhyph/findhyph",
		      "fontools/afm2afm",
		      "fontools/autoinst",
		      "fontools/ot2kpx",
		      "fragmaster/fragmaster.pl",
		      "installfont/installfont-tl",
		      "latex2man/latex2man",
		      "latexdiff/latexdiff-vc.pl",
		      "latexdiff/latexdiff.pl",
		      "latexdiff/latexrevise.pl",
		      "latexfileversion/latexfileversion",
		      "latexmk/latexmk.pl",
		      "latexpand/latexpand",
		      "ltxfileinfo/ltxfileinfo",
		      "lua2dox/lua2dox_filter",
		      "luaotfload/luaotfload-tool.lua",
		      "match_parens/match_parens",
		      "mf2pt1/mf2pt1.pl",
		      "mkjobtexmf/mkjobtexmf.pl",
		      "pdfcrop/pdfcrop.pl",
		      "pfarrei/a5toa4.tlu",
		      "pfarrei/pfarrei.tlu",
		      "pkfix-helper/pkfix-helper",
		      "pkfix/pkfix.pl",
		      "ps2eps/ps2eps.pl",
		      "purifyeps/purifyeps",
		      "simpdftex/simpdftex",
		      "sty2dtx/sty2dtx.pl",
		      "texcount/texcount.pl",
		      "texdef/texdef.pl",
		      "texdiff/texdiff",
		      "texdirflatten/texdirflatten",
		      "texdoc/texdoc.tlu",
		      "texdoctk/texdoctk.pl",
		      "texliveonfly/texliveonfly.py",
		      "texloganalyser/texloganalyser",
		      "thumbpdf/thumbpdf.pl",
		      "typeoutfileinfo/typeoutfileinfo.sh",
		      "xindy/texindy.pl",
		      "xindy/xindy.pl"]
 
    for folder in linked_scripts:
        pisitools.insinto("/usr/bin/", "/usr/share/texmf-dist/scripts/%s" % folder, sym = True)
    pisitools.dosym("/usr/share/texmf-dist/scripts/listings-ext/listings-ext.sh", "/usr/bin/listings-ext.sh")
    
    texlive_scripts=[ "allcm.sh",
		      "allneeded.sh",
		      "dvi2fax.sh",
		      "dvired.sh",
		      "fmtutil-sys.sh",
		      "fmtutil.sh",
		      "fontinst.sh",
		      "kpsetool.sh",
		      "kpsewhere.sh",
		      "ps2frag.sh",
		      "pslatex.sh",
		      "rungs.tlu",
		      "texconfig-dialog.sh",
		      "texconfig-sys.sh",
		      "texconfig.sh",
		      "texlinks.sh",
		      "updmap-sys.sh",
		      "updmap.pl"]
    
    for folder in texlive_scripts:
        pisitools.dosym("/usr/share/texmf-dist/scripts/texlive/%s" % folder, "/usr/bin/%s" % folder)
        
    pdfjam_scripts=[  "pdf180",
		      "pdf270",
		      "pdf90",
		      "pdfbook",
		      "pdfflip",
		      "pdfjam",
		      "pdfjam-pocketmod",
		      "pdfjam-slides3up",
		      "pdfjam-slides6up",
		      "pdfjoin",
		      "pdfnup",
		      "pdfpun"]
    
    for folder in pdfjam_scripts:
        pisitools.dosym("/usr/share/texmf-dist/scripts/pdfjam/%s" % folder, "/usr/bin/%s" % folder)
        
    context_scripts=[ "context",
		      "ctxtools",
		      "luatools",
		      "mtxrun",
		      "pstopdf",
		      "texexec",
		      "texmfstart"]
    for folder in context_scripts:
        pisitools.dosym("/usr/share/texmf-dist/scripts/context/stubs/unix/%s" % folder, "/usr/bin/%s" % folder)
    # old packages, we will not provide them
    
    pisitools.remove("/usr/share/texmf-dist/web2c/texmf.cnf")