Пример #1
0
def install():

    # Installing texmf, texmf-dist, tlpkg
    for texmf in ["texmf", "texmf-dist"]:
        shelltools.copytree("%s/%s" % (CoreSource, texmf), "%s/usr/share/%s" % (get.installDIR(), texmf))
    shelltools.copytree("tlpkg", "%s/usr/share/tlpkg" % get.installDIR())

    shelltools.cd(CoreSource)

    autotools.install("bindir=%s/usr/bin texmf=%s/usr/share/texmf/ run_texlinks=true run_mktexlsr=true" % (get.installDIR(), get.installDIR()))

    # Install documents
    docs = ["ChangeLog", "README", "BUGS", "NEWS", "README.14m", "PROJECTS"]
    dirs = ["kpathsea", "dviljk", "dvipsk", "makeindexk", "ps2pkm", "web2c"]

    pisitools.dodoc("texk/ChangeLog", "texk/README")
    for d in docs:
        for dir in dirs:
            if shelltools.can_access_file("%s/texk/%s/%s" % (get.curDIR(), dir, d)):
                pisitools.insinto("usr/share/doc/%s/texk/%s" % (get.srcNAME(), dir) , "texk/%s/%s" % (dir, d))

    # Remove these directories
    pisitools.removeDir("/usr/share/texmf/doc")
    pisitools.removeDir("/usr/share/texmf-dist/doc")

    for d in ["web2c", "updmap.d", "fmtutil.d", "texmf.d", "language.dat.d", "language.def.d"]:
        pisitools.dodir("/etc/texmf/%s" % d)

    # Remove those as they will be regenerated by texmf-update
    pisitools.remove("/usr/share/texmf/web2c/fmtutil.cnf")
    pisitools.remove("/usr/share/texmf/web2c/texmf.cnf")

    pisitools.domove("/usr/share/texmf/web2c/updmap.cfg","/etc/texmf/updmap.d/", "00updmap.cfg")
    pisitools.dodir("/etc/texmf/dvips.d")
    pisitools.dodir("/etc/texmf/dvips/config")
    pisitools.domove("/usr/share/texmf/dvips/config/config.ps", "/etc/texmf/dvips.d/", "00%s-config.ps" % get.srcNAME())

    # Create symlinks from format to engines
    texlivemodules.createSymlinksFormat2Engines()

    # Handle config files
    shelltools.cd("%s/usr/share/texmf" % get.installDIR())
    texlivemodules.handleConfigFiles(".", "cfg", "cnf")

    pisitools.dodir("/usr/share/texmf-site")

    # Symlinks for regenerated files by texmf-update
    for sym in ["fmtutil.cnf", "texmf.cnf", "updmap.cfg"]:
        pisitools.dosym("/etc/texmf/web2c/%s" % sym, "/usr/share/texmf/web2c/%s" % sym)
    pisitools.dosym("/etc/texmf/dvips/config/config.ps", "/usr/share/dvips/config/config.ps")
    pisitools.dosym("tex", "/usr/bin/virtex")
    pisitools.dosym("pdftex", "/usr/bin/pdfvirtex")

    pisitools.dodir("/var/lib/texmf")

    # Rename mpost to leave room for mplib
    pisitools.domove("/usr/bin/mpost", "/usr/bin/", "mpost-%s" % get.srcNAME())
    pisitools.dosym("mpost-%s" % get.srcNAME(), "/usr/bin/mpost")
Пример #2
0
def install():

    shelltools.cd(CoreSource)
    autotools.install(
        "bindir=%s/usr/bin texmf=%s/usr/share/texmf run_texlinks=true run_mktexlsr=true"
        % (get.installDIR(), get.installDIR())
    )

    # Installing texmf, texmf-dist, tlpkg, texmf-var

    texlivemodules.installTexmfFiles()

    shelltools.cd(get.installDIR())
    shelltools.system("cp -pR usr/texmf usr/share/")
    shelltools.system("cp -pR usr/texmf-dist usr/share/")

    shelltools.system("rm -rf usr/texmf")
    shelltools.system("rm -rf usr/texmf-dist")

    shelltools.cd("%s/%s/%s" % (get.workDIR(), WorkDir, CoreSource))
    # Install documents
    docs = ["ChangeLog", "README", "BUGS", "NEWS", "README.14m", "PROJECTS"]
    dirs = ["kpathsea", "dviljk", "dvipsk", "makeindexk", "ps2pkm", "web2c"]

    pisitools.dodoc("texk/ChangeLog", "texk/README")
    for d in docs:
        for dir in dirs:
            if shelltools.can_access_file("%s/texk/%s/%s" % (get.curDIR(), dir, d)):
                pisitools.insinto("usr/share/doc/%s/texk/%s" % (get.srcNAME(), dir), "texk/%s/%s" % (dir, d))

    # Remove these directories
    pisitools.removeDir("/usr/share/texmf/doc")

    for d in ["web2c", "updmap.d", "fmtutil.d", "texmf.d", "language.dat.d", "language.def.d"]:
        pisitools.dodir("/etc/texmf/%s" % d)

    pisitools.domove("/usr/share/texmf/web2c/texmf.cnf", "/etc/texmf/texmf.d/")
    pisitools.domove("/usr/share/texmf/web2c/fmtutil.cnf", "/etc/texmf/fmtutil.d/")
    pisitools.domove("/usr/share/texmf/web2c/updmap.cfg", "/etc/texmf/updmap.d/", "00updmap.cfg")

    # Remove unnecessary files
    pisitools.remove("/usr/bin/man")

    shelltools.cd("%s/usr/share/texmf/" % get.installDIR())
    texlivemodules.handleConfigFiles()

    pisitools.dodir("/usr/share/texmf-site")

    # Symlinks for regenerated files by texmf-update
    for sym in ["updmap.cfg", "texmf.cnf", "fmtutil.cnf"]:
        pisitools.dosym("/etc/texmf/web2c/%s" % sym, "/usr/share/web2c/%s" % sym)
        pisitools.dosym("/etc/texmf/web2c/%s" % sym, "/usr/share/texmf/web2c/%s" % sym)
    pisitools.dosym("/etc/texmf/dvips/config/config.ps", "/usr/share/dvips/config/config.ps")

    pisitools.dosym("tex", "/usr/bin/virtex")
    pisitools.dosym("pdftex", "/usr/bin/pdfvirtex")

    # Rename mpost to leave room for mplib
    pisitools.domove("/usr/bin/mpost", "/usr/bin/", "mpost-%s" % get.srcNAME())
    pisitools.dosym("mpost-%s" % get.srcNAME(), "/usr/bin/mpost")

    # Keep it as that's where the formats will go
    pisitools.dodir("/var/lib/texmf")