Пример #1
0
def install():
    #evil e2fsprogs makefile -- I'll get you!
    autotools.rawInstall("DESTDIR=%s libdir=/zapme" % get.installDIR())
    pisitools.removeDir("/zapme")

    autotools.rawInstall("DESTDIR=%s" % get.installDIR(), "install-libs")

    pisitools.dodoc("ChangeLog", "README", "RELEASE-NOTES", "SHLIBS",
                    "e2fsck/ChangeLog", "e2fsck/CHANGES")

    pisitools.domove("/usr/lib/", "/lib")
    pisitools.domove("/lib/*.a", "/usr/lib")

    for file in shelltools.ls("%s/usr/lib/*.a" % get.installDIR()):
        destination = file.replace(get.installDIR(), "")
        destination = destination.split("/")[3]
        # create new ldscript
        libtools.gen_usr_ldscript(destination.replace(".a", ".so"))

    # normalize evil symlinks
    for link in shelltools.ls("%s/lib/*" % get.installDIR()):
        if shelltools.isLink(link) and not shelltools.can_access_file(
                shelltools.realPath(link)):
            source = shelltools.baseName(shelltools.realPath(link))
            link = link.replace(get.installDIR(), "")
            # remove old link
            pisitools.remove(link)
            # create new link
            pisitools.dosym(source, link)

    pisitools.domove("/usr/sbin/", "/sbin")

    pisitools.domove("/usr/bin/lsattr", "/bin")
    pisitools.domove("/usr/bin/chattr", "/bin")
    pisitools.domove("/usr/bin/uuidgen", "/bin")

    pisitools.domove("/sbin/mklost+found", "/usr/sbin")

    # time to convert hard links/duplicates to symbolic links
    pisitools.remove("/sbin/fsck.ext2")
    pisitools.dosym("/sbin/e2fsck", "/sbin/fsck.ext2")
    pisitools.remove("/sbin/fsck.ext3")
    pisitools.dosym("/sbin/e2fsck", "/sbin/fsck.ext3")

    pisitools.remove("/sbin/mkfs.ext2")
    pisitools.dosym("/sbin/mke2fs", "/sbin/mkfs.ext2")
    pisitools.remove("/sbin/mkfs.ext3")
    pisitools.dosym("/sbin/mke2fs", "/sbin/mkfs.ext3")

    # copy compile_et & mk_cmds
    shelltools.copy("%s/lib/et/compile_et" % get.curDIR(),
                    "%s/bin/" % get.installDIR())
    shelltools.copy("%s/lib/ss/mk_cmds" % get.curDIR(),
                    "%s/bin/" % get.installDIR())

    # Symlink com_err.h
    pisitools.dosym("/usr/include/et/com_err.h", "/usr/include/com_err.h")
Пример #2
0
def install():
    # evil e2fsprogs makefile -- I'll get you!
    autotools.rawInstall("DESTDIR=%s libdir=/zapme" % get.installDIR())
    pisitools.removeDir("/zapme")

    autotools.rawInstall("DESTDIR=%s" % get.installDIR(), "install-libs")

    pisitools.dodoc("ChangeLog", "README", "RELEASE-NOTES", "SHLIBS", "e2fsck/ChangeLog", "e2fsck/CHANGES")

    pisitools.domove("/usr/lib/", "/lib")
    pisitools.domove("/lib/*.a", "/usr/lib")

    for file in shelltools.ls("%s/usr/lib/*.a" % get.installDIR()):
        destination = file.replace(get.installDIR(), "")
        destination = destination.split("/")[3]
        # create new ldscript
        libtools.gen_usr_ldscript(destination.replace(".a", ".so"))

    # normalize evil symlinks
    for link in shelltools.ls("%s/lib/*" % get.installDIR()):
        if shelltools.isLink(link) and not shelltools.can_access_file(shelltools.realPath(link)):
            source = shelltools.baseName(shelltools.realPath(link))
            link = link.replace(get.installDIR(), "")
            # remove old link
            pisitools.remove(link)
            # create new link
            pisitools.dosym(source, link)

    pisitools.domove("/usr/sbin/", "/sbin")

    pisitools.domove("/usr/bin/lsattr", "/bin")
    pisitools.domove("/usr/bin/chattr", "/bin")
    pisitools.domove("/usr/bin/uuidgen", "/bin")

    pisitools.domove("/sbin/mklost+found", "/usr/sbin")

    # time to convert hard links/duplicates to symbolic links
    pisitools.remove("/sbin/fsck.ext2")
    pisitools.dosym("/sbin/e2fsck", "/sbin/fsck.ext2")
    pisitools.remove("/sbin/fsck.ext3")
    pisitools.dosym("/sbin/e2fsck", "/sbin/fsck.ext3")

    pisitools.remove("/sbin/mkfs.ext2")
    pisitools.dosym("/sbin/mke2fs", "/sbin/mkfs.ext2")
    pisitools.remove("/sbin/mkfs.ext3")
    pisitools.dosym("/sbin/mke2fs", "/sbin/mkfs.ext3")

    # copy compile_et & mk_cmds
    shelltools.copy("%s/lib/et/compile_et" % get.curDIR(), "%s/bin/" % get.installDIR())
    shelltools.copy("%s/lib/ss/mk_cmds" % get.curDIR(), "%s/bin/" % get.installDIR())

    # Symlink com_err.h
    pisitools.dosym("/usr/include/et/com_err.h", "/usr/include/com_err.h")
Пример #3
0
def install():
    # 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/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/web2c/texmf.cnf")

    # fix location of TEXMFCACHE for luatools
    pisitools.dosed("%s/usr/share/texmf/web2c/texmfcnf.lua" % get.installDIR(), "texlive2010", "texlive")

    # remove aleph from fmtutil.cnf
    pisitools.dosed("%s/usr/share/texmf/web2c/fmtutil.cnf" % get.installDIR(), "^.*aleph.*$")

    # move man files to /usr/share/man, check for new man files at every update
    for man in ["1", "5"]:
        pisitools.domove("/usr/share/texmf/doc/man/man%s" % man, "/usr/share/man/")

    # move info files to /usr/share/info
    pisitools.domove("/usr/share/texmf/doc/info", "/usr/share")

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

    for share_file in config_files:
        etc_file = share_file.replace("/usr/share", "/etc")
        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).*$")

    ################################################################
    ########### make install

    shelltools.cd("%s/source/build" % get.workDIR())

    # prefix should be user defined, we don't need all files
    autotools.install("prefix=%s/source/build/usr texmf=%s/usr/share/texmf" % (get.workDIR(), get.installDIR()))

    shelltools.move("%s/source/build/usr/bin" % get.workDIR(), "%s/usr" % get.installDIR())
    shelltools.move("%s/source/build/usr/lib" % get.workDIR(), "%s/usr" % get.installDIR())
    shelltools.move("%s/source/build/usr/include" % get.workDIR(), "%s/usr" % get.installDIR())

    # fix symlinks, some are incorrect
    # makefile patching is another way, but there are lot of scripts
    # pathing each makefile makes it much harder, for now this is a "simpler" solution
    for binary in shelltools.ls(get.installDIR() + "/usr/bin"):
        real_path = shelltools.realPath(get.installDIR() + "/usr/bin/" + binary)
        if "texmf" in real_path and not os.path.exists(real_path): # modify only if it is broken
            base_path = real_path.replace(get.installDIR() + "/usr", "")
            new_path = "/usr/share" + base_path
            shelltools.unlink(get.installDIR() + "/usr/bin/" + binary)
            pisitools.dosym(new_path, "/usr/bin/" + binary)

    # create symlinks for formats
    # shelltools.export("PATH", get.installDIR() + "/usr/bin")
    shelltools.system("PATH=\"$PATH:%s/usr/bin\" texlinks -f %s/usr/share/texmf/web2c/fmtutil.cnf %s/usr/bin/" % (get.installDIR(), get.installDIR(), get.installDIR()))

    # remove symlinks to scripts that are not in texlive-bin or texlive-core:
    symlinks_to_remove = ["authorindex",
                          "ebong",
                          "bibexport",
                          "cachepic",
                          "epspdf",
                          "epspdftk",
                          "fig4latex",
                          "makeglossaries",
                          "mathspic",
                          "mkgrkindex",
                          "pdfannotextractor",
                          "perltex",
                          "pdfthumb",
                          "ppower4",
                          "pst2pdf",
                          "ps4pdf",
                          "splitindex",
                          "svn-multi",
                          "htcontext",
                          "htlatex",
                          "htmex",
                          "ht",
                          "httexi",
                          "httex",
                          "htxelatex",
                          "htxetex",
                          "mk4ht",
                          "ulqda",
                          "vpe",
                          "tlmgr"]

    for symlink in symlinks_to_remove:
        pisitools.remove("/usr/bin/%s" % symlink)


    # remove files form disabled packages
    # we copy all man and info files into mandir. Disabling packages just remove binaries.
    # the remaining man and info files should be deleted manually

    # dvipng
    pisitools.remove("/usr/share/man/man1/dvipng.1")
    pisitools.remove("/usr/share/info/dvipng.info")
    pisitools.remove("/usr/share/man/man1/dvigif.1")

    # lcdf-typetools
    pisitools.remove("/usr/share/man/man1/t1rawafm.1")
    pisitools.remove("/usr/share/man/man1/cfftot1.1")
    pisitools.remove("/usr/share/man/man1/t1lint.1")
    pisitools.remove("/usr/share/man/man1/ttftotype42.1")
    pisitools.remove("/usr/share/man/man1/t1dotlessj.1")
    pisitools.remove("/usr/share/man/man1/mmpfb.1")
    pisitools.remove("/usr/share/man/man1/otftotfm.1")
    pisitools.remove("/usr/share/man/man1/otfinfo.1")
    pisitools.remove("/usr/share/man/man1/t1testpage.1")
    pisitools.remove("/usr/share/man/man1/mmafm.1")
    pisitools.remove("/usr/share/man/man1/t1reencode.1")

    # chktex
    pisitools.remove("/usr/share/man/man1/deweb.1")

    # dvi2tty
    pisitools.remove("/usr/share/man/man1/dvi2tty.1")

    # dvipdfm
    pisitools.remove("/usr/share/texmf/tex/latex/dvipdfm/dvipdfm.def")
    pisitools.remove("/usr/share/man/man1/dvipdfm.1")
    pisitools.remove("/usr/share/texmf/dvipdfm/config/config")

    # xdvik
    pisitools.remove("/usr/share/man/man1/xdvi.1")
    pisitools.remove("/usr/share/texmf/xdvi/xdvi.cfg")
    pisitools.remove("/usr/share/texmf/xdvi/XDvi")

    #ps2eps
    pisitools.remove("/usr/share/man/man1/bbox.1")
    pisitools.remove("/usr/share/man/man1/ps2eps.1")
Пример #4
0
def install():

    #shelltools.chmod("%s/biber" % get.workDIR())
    shelltools.system(
        'sed -i -e "s|^prefix =.\+$|prefix = /usr|" -e "s|^mandir =.\+$|mandir = \usr/share/man|" -e "s|^datadir =.\+$|datadir = \/usr/share/texmf|" -e "s|^docdir =.\+$|docdir = \/usr/share/doc/xindy|"'
    )
    shelltools.cd("%s/source/build/" % get.workDIR())
    autotools.rawInstall("prefix=/usr texmf=%s/usr/share/texmf DESTDIR=%s" %
                         (get.installDIR(), get.installDIR()))
    pisitools.removeDir("/usr/{texmf,share/texmf-dist}")
    pisitools.dodir("/usr/share/tlpkg/TeXLive")
    shelltools.move("%s/biber" % get.workDIR(),
                    "%s/usr/bin" % get.installDIR())
    shelltools.move("%s/source/utils/biber/TeXLive/*.pm" % get.workDIR(),
                    "%s/usr/share/tlpkg/TeXLive" % get.installDIR())

    pisitools.dodir("/usr/bin")
    # install texmf tree
    folders = [
        "/usr/share", "/etc/texmf/chktex", "/etc/texmf/tex/",
        "/etc/texmf/web2c", "/etc/texmf/dvips/config", "/etc/texmf/dvipdfm",
        "/etc/texmf/texconfig", "/etc/texmf/ttf2pk", "/etc/texmf/xdvi",
        "/etc/fonts/conf.avail", "/etc/texmf/dvipdfmx"
    ]

    for dirs in folders:
        pisitools.dodir(dirs)

    # remove aleph from fmtutil.cnf
    pisitools.dosed(
        "%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(),
        "^.*aleph.*$")

    pisitools.insinto("/etc/texmf/chktex",
                      "%s/usr/share/texmf-dist/chktex/chktexrc" %
                      get.installDIR(),
                      sym=True)
    pisitools.insinto("/etc/texmf/web2c",
                      "%s/usr/share/texmf-dist/web2c/texmf.cnf" %
                      get.installDIR(),
                      sym=True)
    pisitools.insinto("/etc/texmf/web2c",
                      "%s/usr/share/texmf-dist/web2c/fmtutil.cnf" %
                      get.installDIR(),
                      sym=True)
    pisitools.insinto("/etc/texmf/texconfig",
                      "%s/usr/share/texmf-dist/texconfig/tcfmgr.map" %
                      get.installDIR(),
                      sym=True)
    pisitools.insinto("/etc/texmf/dvipdfmx",
                      "%s/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg" %
                      get.installDIR(),
                      sym=True)
    pisitools.insinto("/etc/texmf/ttf2pk",
                      "%s/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg" %
                      get.installDIR(),
                      sym=True)
    pisitools.insinto("/etc/texmf/xdvi",
                      "%s/usr/share/texmf-dist/xdvi/XDvi" % get.installDIR(),
                      sym=True)

    # fix symlinks, some are incorrect
    # makefile patching is another way, but there ar/dvipdfmx.cfge lot of scripts
    # pathing each makefile makes it much harder, for now this is a "simpler" solution
    for binary in shelltools.ls(get.installDIR() + "/usr/bin"):
        real_path = shelltools.realPath(get.installDIR() + "/usr/bin/" +
                                        binary)
        if "texmf" in real_path and not os.path.exists(
                real_path):  # modify only if it is broken
            base_path = real_path.replace(get.installDIR() + "/usr", "")
            new_path = "/usr/share" + base_path
            shelltools.unlink(get.installDIR() + "/usr/bin/" + binary)
            pisitools.dosym(new_path, "/usr/bin/" + binary)

    # create symlinks for formats
    # shelltools.export("PATH", get.installDIR() + "/usr/bin")
    #shelltools.system("PATH=\"$PATH:%s/usr/bin\" texlinks -f %s/usr/share/texmf-dist/web2c/fmtutil.cnf %s/usr/bin/" % (get.installDIR(), get.installDIR(), get.installDIR()))

    # remove files form disabled packages
    # we copy all man and info files into mandir. Disabling packages just remove binaries.
    # the remaining man and info files should be deleted manually

    pisitools.remove("/usr/share/texmf-dist/fonts/map/dvipdfmx/cid-x.map")
    pisitools.remove(
        "/usr/share/texmf-dist/fonts/map/glyphlist/texglyphlist.txt")
    pisitools.remove("/usr/share/texmf-dist/scripts/chktex/chkweb.sh")
    pisitools.remove("/usr/share/texmf-dist/fonts/enc/dvips/base/7t.enc")
    pisitools.remove(
        "/usr/share/texmf-dist/fonts/map/glyphlist/pdfglyphlist.txt")
    pisitools.remove("/usr/share/texmf-dist/scripts/chktex/deweb.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/ps2eps/ps2eps.pl")
    pisitools.remove("/usr/share/texmf-dist/fonts/cmap/dvipdfmx/EUC-UCS2")
    pisitools.remove("/usr/share/texmf-dist/chktex/chktexrc")
    pisitools.remove("/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg")
    pisitools.remove("/usr/share/texmf-dist/fonts/map/glyphlist/glyphlist.txt")
Пример #5
0
def install():
    shelltools.cd(buildDir)
    autotools.rawInstall("prefix=/usr DESTDIR=%s" % get.installDIR())
    shelltools.system("pwd")
    #install biber
    pisitools.dobin("../../biber-2.14/bin/biber")

    #pisitools.dodir("/usr/share/tlpkg/TeXLive")
    #shelltools.move("%s/source/utils/biber/TeXLive/*.pm" % get.workDIR(), "%s/usr/share/tlpkg/TeXLive" % get.installDIR())

    # remove aleph from fmtutil.cnf
    pisitools.dosed(
        "%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(),
        "^.*aleph.*$")

    pisitools.insinto("/etc/texmf/texconfig",
                      "%s/usr/share/texmf-dist/texconfig/tcfmgr.map" %
                      get.installDIR(),
                      sym=True)

    # fix symlinks, some are incorrect
    # makefile patching is another way, but there ar/dvipdfmx.cfge lot of scripts
    # pathing each makefile makes it much harder, for now this is a "simpler" solution
    for binary in shelltools.ls(get.installDIR() + "/usr/bin"):
        real_path = shelltools.realPath(get.installDIR() + "/usr/bin/" +
                                        binary)
        if "texmf" in real_path and not os.path.exists(
                real_path):  # modify only if it is broken
            base_path = real_path.replace(get.installDIR() + "/usr", "")
            new_path = "/usr/share" + base_path
            shelltools.unlink(get.installDIR() + "/usr/bin/" + binary)
            pisitools.dosym(new_path, "/usr/bin/" + binary)

    bibtexextra_scripts = [
        "bbl2bib", "bib2gls", "bibdoiadd", "bibexport", "bibmradd",
        "biburl2doi", "bibzbladd", "convertgls2bib", "listbib",
        "ltx2crossrefxml", "multibibliography", "urlbst"
    ]

    core_scripts = [
        "a2ping", "a5toa4", "adhocfilelist", "afm2afm", "allcm", "allec",
        "allneeded", "arara", "arlatex", "autoinst", "bundledoc", "checkcites",
        "checklistings", "chklref", "chkweb", "cjk-gs-integrate", "cluttex",
        "cllualatex", "clxelatex", "context", "contextjit", "ctanbib",
        "ctanify", "ctanupload", "ctan-o-mat", "de-macro", "depythontex",
        "deweb", "dosepsbin", "dtxgen", "dvi2fax", "dviasm", "dviinfox",
        "dvired", "e2pall", "epstopdf", "findhyph", "fmtutil", "fmtutil-sys",
        "fmtutil-user", "fontinst", "fragmaster", "ht", "htcontext", "htlatex",
        "htmex", "httex", "httexi", "htxelatex", "htxetex", "installfont-tl",
        "jfmutil", "ketcindy", "kpsepath", "kpsetool", "kpsewhere",
        "kpsexpand", "latex-git-log", "latex-papersize", "latex2man",
        "latex2nemeth", "latexdef", "latexdiff", "latexdiff-vc",
        "latexfileversion", "latexindent", "latexmk", "latexpand",
        "latexrevise", "listings-ext.sh", "ltxfileinfo", "ltximg",
        "luaotfload-tool", "luatools", "lwarpmk", "make4ht", "match_parens",
        "mf2pt1", "mk4ht", "mkjobtexmf", "mkt1font", "mktexfmt", "mktexlsr",
        "mktexmf", "mktexpk", "mktextfm", "mptopdf", "mtxrun", "mtxrunjit",
        "ot2kpx", "pamphletangler", "pdfatfi", "pdfbook2", "pdfcrop", "pdfjam",
        "pdflatexpicscale", "pdftex-quiet", "pdfxup", "pfarrei", "pkfix",
        "pkfix-helper", "ps2eps", "ps2frag", "pslatex", "purifyeps",
        "pythontex", "repstopdf", "rpdfcrop", "rungs", "simpdftex",
        "srcredact", "sty2dtx", "tex4ebook", "texconfig", "texconfig-dialog",
        "texconfig-sys", "texcount", "texdef", "texdiff", "texdirflatten",
        "texdoc", "texdoctk", "texexec", "texfot", "texhash", "texindy",
        "texlinks", "texliveonfly", "texloganalyser", "texmfstart",
        "texosquery", "texosquery-jre5", "texosquery-jre8", "texplate",
        "thumbpdf", "tlcockpit", "tlshell", "typeoutfileinfo", "updmap",
        "updmap-sys", "updmap-user", "vpl2ovp", "vpl2vpl", "xhlatex", "xindex",
        "xindy"
    ]

    games_scripts = ["rubikrotation"]

    humanities_scripts = ["diadia"]

    langcyrillic_scripts = ["rubibtex", "rumakeindex"]
    langkorean_scripts = ["jamo-normalize komkindex ttf2kotexfont"]
    langcjk_scripts = [
        "convbkmk", "ptex2pdf", "kanji-fontmap-creator", "kanji-config-updmap",
        "kanji-config-updmap-sys", "kanji-config-updmap-user"
    ]

    langextra_scripts = ["ebong"]

    langgreek_scripts = ["mkgrkindex"]

    latexextra_scripts = [
        "authorindex", "exceltex", "l3build", "makedtx", "makeglossaries",
        "makeglossaries-lite", "pdfannotextractor", "perltex", "ps4pdf",
        "splitindex", "svn-multi", "vpe", "webquiz", "wordcount", "yplan"
    ]

    music_scripts = [
        "lily-glyph-commands", "lily-image-commands", "lily-rebuild-pdfs",
        "m-tx", "musixtex", "musixflx", "pmxchords"
    ]

    pictures_scripts = [
        "cachepic", "epspdf", "epspdftk", "fig4latex", "getmapdl", "mathspic",
        "mathspic", "mkpic", "pn2pdf"
    ]

    pstricks_scripts = ["pedigree", "pst2pdf"]

    science_scripts = ["pygmentex", "ulqda"]

    # remove unneeded files and symlinks
    dirs = []
    for g in [bibtexextra_scripts, core_scripts, games_scripts, humanities_scripts, \
              langcjk_scripts, langcyrillic_scripts, langextra_scripts, \
              langgreek_scripts, latexextra_scripts, music_scripts, \
              pictures_scripts, pstricks_scripts, science_scripts, \
              ["tlmgr"]]:
        for s in g:
            if shelltools.isLink("%s/usr/bin/%s" % (get.installDIR(), s)):
                realpath = shelltools.realPath("%s/usr/bin/%s" %
                                               (get.installDIR(), s))
                dirname = shelltools.dirName(realpath)
                if not dirname in dirs: dirs.append(dirname)
                if not dirname == "%s/usr/bin" % get.installDIR():
                    if shelltools.isFile(realpath): shelltools.unlink(realpath)
                pisitools.remove("/usr/bin/%s" % s)

    # remove empty dirs
    while dirs:
        tmpdirs = dirs[:]
        for d in tmpdirs:
            if not shelltools.ls(d):
                shelltools.unlinkDir(d)
                dirname = shelltools.dirName(d)
                if not dirname in dirs: dirs.append(dirname)
            dirs.remove(d)

    pdftexsymlinks = [
        "amstex", "cslatex", "csplain", "eplain", "etex", "jadetex", "latex",
        "mex", "mllatex", "mltex", "pdfetex", "pdfcslatex", "pdfcsplain",
        "pdfjadetex", "pdflatex", "pdfmex", "pdfxmltex", "texsis", "utf8mex",
        "xmltex"
    ]

    for symlink in pdftexsymlinks:
        pisitools.dosym("pdftex", "/usr/bin/%s" % symlink)

    luatexsymlinks = ["dvilualatex", "dviluatex", "lualatex"]

    for symlink in luatexsymlinks:
        pisitools.dosym("pdftex", "/usr/bin/%s" % symlink)

    pisitools.dosym("eptex", "/usr/bin/platex")
    pisitools.dosym("euptex", "/usr/bin/uplatex")
    pisitools.dosym("xetex", "/usr/bin/xelatex")

    pisitools.removeDir("/usr/share/texmf-dist")
Пример #6
0
def install():
    shelltools.cd("%s/source/build/" % get.workDIR())
    autotools.rawInstall("prefix=/usr DESTDIR=%s" % get.installDIR())

    #install biber
    pisitools.dobin("../../biber")

    #pisitools.dodir("/usr/share/tlpkg/TeXLive")
    #shelltools.move("%s/source/utils/biber/TeXLive/*.pm" % get.workDIR(), "%s/usr/share/tlpkg/TeXLive" % get.installDIR())

    # remove aleph from fmtutil.cnf
    pisitools.dosed(
        "%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(),
        "^.*aleph.*$")

    pisitools.insinto("/etc/texmf/texconfig",
                      "%s/usr/share/texmf-dist/texconfig/tcfmgr.map" %
                      get.installDIR(),
                      sym=True)

    # fix symlinks, some are incorrect
    # makefile patching is another way, but there ar/dvipdfmx.cfge lot of scripts
    # pathing each makefile makes it much harder, for now this is a "simpler" solution
    for binary in shelltools.ls(get.installDIR() + "/usr/bin"):
        real_path = shelltools.realPath(get.installDIR() + "/usr/bin/" +
                                        binary)
        if "texmf" in real_path and not os.path.exists(
                real_path):  # modify only if it is broken
            base_path = real_path.replace(get.installDIR() + "/usr", "")
            new_path = "/usr/share" + base_path
            shelltools.unlink(get.installDIR() + "/usr/bin/" + binary)
            pisitools.dosym(new_path, "/usr/bin/" + binary)

    bibtexextra_scripts = [
        "bibexport", "listbib", "multibibliography", "urlbst"
    ]

    core_scripts = [
        "a2ping", "a5toa4", "adhocfilelist", "afm2afm", "allcm", "allec",
        "allneeded", "arara", "arlatex", "autoinst", "bundledoc", "checkcites",
        "chkweb", "context", "ctanify", "ctanupload", "ctxtools", "de-macro",
        "deweb", "dosepsbin", "dtxgen", "dvi2fax", "dviasm", "dvired",
        "e2pall", "epstopdf", "findhyph", "fmtutil", "fmtutil-sys", "fontinst",
        "fragmaster", "installfont-tl", "kpsepath", "kpsetool", "kpsewhere",
        "kpsexpand", "latex2man", "latexdiff", "latexdiff-vc",
        "latexfileversion", "latexmk", "latexpand", "latexrevise",
        "listings-ext.sh", "ltxfileinfo", "lua2dox_filter", "luaotfload-tool",
        "luatools", "match_parens", "mf2pt1", "mkjobtexmf", "mkluatexfontdb",
        "mkt1font", "mktexfmt", "mptopdf", "mtxrun", "ot2kpx", "pdf180",
        "pdf270", "pdf90", "pdfatfi", "pdfbook", "pdfcrop", "pdfflip",
        "pdfjam", "pdfjam-pocketmod", "pdfjam-slides3up", "pdfjam-slides6up",
        "pdfjoin", "pdfnup", "pdfpun", "pfarrei", "pkfix", "pkfix-helper",
        "ps2eps", "ps2frag", "pslatex", "pstopdf", "purifyeps", "repstopdf",
        "rpdfcrop", "rungs", "simpdftex", "sty2dtx", "texconfig",
        "texconfig-dialog", "texconfig-sys", "texcount", "texdef", "texdiff",
        "texdirflatten", "texdoc", "texdoctk", "texexec", "texindy",
        "texlinks", "texliveonfly", "texloganalyser", "texmfstart", "thumbpdf",
        "typeoutfileinfo", "updmap", "updmap-sys", "vpl2ovp", "vpl2vpl",
        "xindy"
    ]

    htmlxml_scripts = [
        "ht", "htcontext", "htlatex", "htmex", "httex", "httexi", "htxelatex",
        "htxetex", "mk4ht"
    ]

    langcyrillic_scripts = ["rubibtex", "rumakeindex"]

    langcjk_scripts = [
        "convbkmk", "ptex2pdf", "kanji-fontmap-creator", "kanji-config-updmap",
        "kanji-config-updmap-sys"
    ]

    langextra_scripts = ["ebong"]

    langgreek_scripts = ["mkgrkindex"]

    latexextra_scripts = [
        "authorindex", "exceltex", "makeglossaries", "pdfannotextractor",
        "perltex", "ps4pdf", "splitindex", "svn-multi", "vpe"
    ]

    music_scripts = ["m-tx", "musixtex", "musixflx", "pmx2pdf"]

    pictures_scripts = [
        "cachepic", "epspdf", "epspdftk", "fig4latex", "mathspic"
    ]

    pstricks_scripts = ["pedigree", "pst2pdf"]

    science_scripts = ["ulqda"]

    # remove unneeded files and symlinks
    dirs = []
    for g in [bibtexextra_scripts, core_scripts, htmlxml_scripts, \
              langcjk_scripts, langcyrillic_scripts, langextra_scripts, \
              langgreek_scripts, latexextra_scripts, music_scripts, \
              pictures_scripts, pstricks_scripts, science_scripts, \
              ["tlmgr"]]:
        for s in g:
            if shelltools.isLink("%s/usr/bin/%s" % (get.installDIR(), s)):
                realpath = shelltools.realPath("%s/usr/bin/%s" %
                                               (get.installDIR(), s))
                dirname = shelltools.dirName(realpath)
                if not dirname in dirs: dirs.append(dirname)
                if not dirname == "%s/usr/bin" % get.installDIR():
                    if shelltools.isFile(realpath): shelltools.unlink(realpath)
                pisitools.remove("/usr/bin/%s" % s)

    # remove empty dirs
    while dirs:
        tmpdirs = dirs[:]
        for d in tmpdirs:
            if not shelltools.ls(d):
                shelltools.unlinkDir(d)
                dirname = shelltools.dirName(d)
                if not dirname in dirs: dirs.append(dirname)
            dirs.remove(d)

    pdftexsymlinks = [
        "amstex", "cslatex", "csplain", "eplain", "etex", "jadetex", "latex",
        "mex", "mllatex", "mltex", "pdfetex", "pdfcslatex", "pdfcsplain",
        "pdfjadetex", "pdflatex", "pdfmex", "pdfxmltex", "texsis", "utf8mex",
        "xmltex"
    ]

    for symlink in pdftexsymlinks:
        pisitools.dosym("pdftex", "/usr/bin/%s" % symlink)

    luatexsymlinks = ["dvilualatex", "dviluatex", "lualatex"]

    for symlink in luatexsymlinks:
        pisitools.dosym("pdftex", "/usr/bin/%s" % symlink)

    pisitools.dosym("eptex", "/usr/bin/platex")
    pisitools.dosym("euptex", "/usr/bin/uplatex")
    pisitools.dosym("xetex", "/usr/bin/xelatex")

    pisitools.removeDir("/usr/share/texmf-dist")
Пример #7
0
def install():
        
    #shelltools.chmod("%s/biber" % get.workDIR())
    shelltools.system('sed -i -e "s|^prefix =.\+$|prefix = /usr|" -e "s|^mandir =.\+$|mandir = \usr/share/man|" -e "s|^datadir =.\+$|datadir = \/usr/share/texmf|" -e "s|^docdir =.\+$|docdir = \/usr/share/doc/xindy|"')
    shelltools.cd("%s/source/build/" % get.workDIR())
    autotools.rawInstall("prefix=/usr texmf=%s/usr/share/texmf DESTDIR=%s" % (get.installDIR(), get.installDIR()))
    pisitools.removeDir("/usr/{texmf,share/texmf-dist}")
    pisitools.dodir("/usr/share/tlpkg/TeXLive")
    shelltools.move("%s/biber" % get.workDIR(), "%s/usr/bin" % get.installDIR()) 
    shelltools.move("%s/source/utils/biber/TeXLive/*.pm" % get.workDIR(), "%s/usr/share/tlpkg/TeXLive" % get.installDIR())
    
    pisitools.dodir("/usr/bin")
    # install texmf tree
    folders = ["/usr/share",
	       "/etc/texmf/chktex",
	       "/etc/texmf/tex/",
               "/etc/texmf/web2c",
               "/etc/texmf/dvips/config",
               "/etc/texmf/dvipdfm",
               "/etc/texmf/texconfig",
               "/etc/texmf/ttf2pk",
               "/etc/texmf/xdvi",
               "/etc/fonts/conf.avail",
               "/etc/texmf/dvipdfmx"]

    for dirs in folders:
        pisitools.dodir(dirs)

    # remove aleph from fmtutil.cnf
    pisitools.dosed("%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(), "^.*aleph.*$")
    
    pisitools.insinto("/etc/texmf/chktex", "%s/usr/share/texmf-dist/chktex/chktexrc" % get.installDIR(), sym=True) 
    pisitools.insinto("/etc/texmf/web2c", "%s/usr/share/texmf-dist/web2c/texmf.cnf" % get.installDIR(), sym=True)
    pisitools.insinto("/etc/texmf/web2c", "%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(), sym=True)
    pisitools.insinto("/etc/texmf/texconfig", "%s/usr/share/texmf-dist/texconfig/tcfmgr.map" % get.installDIR(), sym=True)
    pisitools.insinto("/etc/texmf/dvipdfmx", "%s/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg" % get.installDIR(), sym=True)
    pisitools.insinto("/etc/texmf/ttf2pk", "%s/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg" % get.installDIR(), sym=True)
    pisitools.insinto("/etc/texmf/xdvi", "%s/usr/share/texmf-dist/xdvi/XDvi" % get.installDIR(), sym=True)

    # fix symlinks, some are incorrect
    # makefile patching is another way, but there ar/dvipdfmx.cfge lot of scripts
    # pathing each makefile makes it much harder, for now this is a "simpler" solution
    for binary in shelltools.ls(get.installDIR() + "/usr/bin"):
        real_path = shelltools.realPath(get.installDIR() + "/usr/bin/" + binary)
        if "texmf" in real_path and not os.path.exists(real_path): # modify only if it is broken
            base_path = real_path.replace(get.installDIR() + "/usr", "")
            new_path = "/usr/share" + base_path
            shelltools.unlink(get.installDIR() + "/usr/bin/" + binary)
            pisitools.dosym(new_path, "/usr/bin/" + binary)

    # create symlinks for formats
    # shelltools.export("PATH", get.installDIR() + "/usr/bin")
    #shelltools.system("PATH=\"$PATH:%s/usr/bin\" texlinks -f %s/usr/share/texmf-dist/web2c/fmtutil.cnf %s/usr/bin/" % (get.installDIR(), get.installDIR(), get.installDIR()))

    # remove files form disabled packages
    # we copy all man and info files into mandir. Disabling packages just remove binaries.
    # the remaining man and info files should be deleted manually
    
    pisitools.remove("/usr/share/texmf-dist/fonts/map/dvipdfmx/cid-x.map")
    pisitools.remove("/usr/share/texmf-dist/fonts/map/glyphlist/texglyphlist.txt")
    pisitools.remove("/usr/share/texmf-dist/scripts/chktex/chkweb.sh")
    pisitools.remove("/usr/share/texmf-dist/fonts/enc/dvips/base/7t.enc")
    pisitools.remove("/usr/share/texmf-dist/fonts/map/glyphlist/pdfglyphlist.txt")
    pisitools.remove("/usr/share/texmf-dist/scripts/chktex/deweb.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/ps2eps/ps2eps.pl")
    pisitools.remove("/usr/share/texmf-dist/fonts/cmap/dvipdfmx/EUC-UCS2")
    pisitools.remove("/usr/share/texmf-dist/chktex/chktexrc")
    pisitools.remove("/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg")
    pisitools.remove("/usr/share/texmf-dist/fonts/map/glyphlist/glyphlist.txt")
Пример #8
0
def install():
    # 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/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/web2c/texmf.cnf")

    # fix location of TEXMFCACHE for luatools
    pisitools.dosed("%s/usr/share/texmf/web2c/texmfcnf.lua" % get.installDIR(),
                    "texlive2010", "texlive")

    # remove aleph from fmtutil.cnf
    pisitools.dosed("%s/usr/share/texmf/web2c/fmtutil.cnf" % get.installDIR(),
                    "^.*aleph.*$")

    # move man files to /usr/share/man, check for new man files at every update
    for man in ["1", "5"]:
        pisitools.domove("/usr/share/texmf/doc/man/man%s" % man,
                         "/usr/share/man/")

    # move info files to /usr/share/info
    pisitools.domove("/usr/share/texmf/doc/info", "/usr/share")

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

    for share_file in config_files:
        etc_file = share_file.replace("/usr/share", "/etc")
        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).*$")

    ################################################################
    ########### make install

    shelltools.cd("%s/source/build" % get.workDIR())

    # prefix should be user defined, we don't need all files
    autotools.install("prefix=%s/source/build/usr texmf=%s/usr/share/texmf" %
                      (get.workDIR(), get.installDIR()))

    shelltools.move("%s/source/build/usr/bin" % get.workDIR(),
                    "%s/usr" % get.installDIR())
    shelltools.move("%s/source/build/usr/lib" % get.workDIR(),
                    "%s/usr" % get.installDIR())
    shelltools.move("%s/source/build/usr/include" % get.workDIR(),
                    "%s/usr" % get.installDIR())

    # fix symlinks, some are incorrect
    # makefile patching is another way, but there are lot of scripts
    # pathing each makefile makes it much harder, for now this is a "simpler" solution
    for binary in shelltools.ls(get.installDIR() + "/usr/bin"):
        real_path = shelltools.realPath(get.installDIR() + "/usr/bin/" +
                                        binary)
        if "texmf" in real_path and not os.path.exists(
                real_path):  # modify only if it is broken
            base_path = real_path.replace(get.installDIR() + "/usr", "")
            new_path = "/usr/share" + base_path
            shelltools.unlink(get.installDIR() + "/usr/bin/" + binary)
            pisitools.dosym(new_path, "/usr/bin/" + binary)

    # create symlinks for formats
    # shelltools.export("PATH", get.installDIR() + "/usr/bin")
    shelltools.system(
        "PATH=\"$PATH:%s/usr/bin\" texlinks -f %s/usr/share/texmf/web2c/fmtutil.cnf %s/usr/bin/"
        % (get.installDIR(), get.installDIR(), get.installDIR()))

    # remove symlinks to scripts that are not in texlive-bin or texlive-core:
    symlinks_to_remove = [
        "authorindex", "ebong", "bibexport", "cachepic", "epspdf", "epspdftk",
        "fig4latex", "makeglossaries", "mathspic", "mkgrkindex",
        "pdfannotextractor", "perltex", "pdfthumb", "ppower4", "pst2pdf",
        "ps4pdf", "splitindex", "svn-multi", "htcontext", "htlatex", "htmex",
        "ht", "httexi", "httex", "htxelatex", "htxetex", "mk4ht", "ulqda",
        "vpe", "tlmgr"
    ]

    for symlink in symlinks_to_remove:
        pisitools.remove("/usr/bin/%s" % symlink)

    # remove files form disabled packages
    # we copy all man and info files into mandir. Disabling packages just remove binaries.
    # the remaining man and info files should be deleted manually

    # dvipng
    pisitools.remove("/usr/share/man/man1/dvipng.1")
    pisitools.remove("/usr/share/info/dvipng.info")
    pisitools.remove("/usr/share/man/man1/dvigif.1")

    # lcdf-typetools
    pisitools.remove("/usr/share/man/man1/t1rawafm.1")
    pisitools.remove("/usr/share/man/man1/cfftot1.1")
    pisitools.remove("/usr/share/man/man1/t1lint.1")
    pisitools.remove("/usr/share/man/man1/ttftotype42.1")
    pisitools.remove("/usr/share/man/man1/t1dotlessj.1")
    pisitools.remove("/usr/share/man/man1/mmpfb.1")
    pisitools.remove("/usr/share/man/man1/otftotfm.1")
    pisitools.remove("/usr/share/man/man1/otfinfo.1")
    pisitools.remove("/usr/share/man/man1/t1testpage.1")
    pisitools.remove("/usr/share/man/man1/mmafm.1")
    pisitools.remove("/usr/share/man/man1/t1reencode.1")

    # chktex
    pisitools.remove("/usr/share/man/man1/deweb.1")

    # dvi2tty
    pisitools.remove("/usr/share/man/man1/dvi2tty.1")

    # dvipdfm
    pisitools.remove("/usr/share/texmf/tex/latex/dvipdfm/dvipdfm.def")
    pisitools.remove("/usr/share/man/man1/dvipdfm.1")
    pisitools.remove("/usr/share/texmf/dvipdfm/config/config")

    # xdvik
    pisitools.remove("/usr/share/man/man1/xdvi.1")
    pisitools.remove("/usr/share/texmf/xdvi/xdvi.cfg")
    pisitools.remove("/usr/share/texmf/xdvi/XDvi")

    #ps2eps
    pisitools.remove("/usr/share/man/man1/bbox.1")
    pisitools.remove("/usr/share/man/man1/ps2eps.1")
Пример #9
0
def install():
    shelltools.cd("%s/source/build/" % get.workDIR())
    autotools.rawInstall("prefix=/usr DESTDIR=%s" % get.installDIR())
            
    # replace upstream texmf.cnf with ours
    pisitools.remove("/usr/share/texmf-dist/web2c/texmf.cnf")     
   
    # remove aleph from fmtutil.cnf
    pisitools.dosed("%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(), "^.*aleph.*$")
    
    pisitools.insinto("/etc/texmf/texconfig", "%s/usr/share/texmf-dist/texconfig/tcfmgr.map" % get.installDIR(), sym=True)

    # fix symlinks, some are incorrect
    # makefile patching is another way, but there ar/dvipdfmx.cfge lot of scripts
    # pathing each makefile makes it much harder, for now this is a "simpler" solution
    for binary in shelltools.ls(get.installDIR() + "/usr/bin"):
        real_path = shelltools.realPath(get.installDIR() + "/usr/bin/" + binary)
        if "texmf" in real_path and not os.path.exists(real_path): # modify only if it is broken
            base_path = real_path.replace(get.installDIR() + "/usr", "")
            new_path = "/usr/share" + base_path
            shelltools.unlink(get.installDIR() + "/usr/bin/" + binary)
            pisitools.dosym(new_path, "/usr/bin/" + binary)
    
    bibtexextra_scripts=["bibexport", "listbib" ,"multibibliography", "urlbst"]

    core_scripts=["a2ping","a5toa4", "adhocfilelist", "afm2afm", "allcm", "allec", "allneeded", "arara","arlatex"
    ,"autoinst", "bundledoc", "checkcites", "chkweb", "context", "ctanify", "ctanupload", "ctxtools", "de-macro", "deweb"
    ,"dosepsbin", "dtxgen", "dvi2fax", "dviasm", "dvired", "e2pall", "epstopdf", "findhyph", "fmtutil", "fmtutil-sys"
    ,"fontinst", "fragmaster", "installfont-tl", "kpsepath", "kpsetool", "kpsewhere", "kpsexpand", "latex2man", "latexdiff"
    ,"latexdiff-vc", "latexfileversion", "latexmk", "latexpand", "latexrevise", "listings-ext.sh", "ltxfileinfo", "lua2dox_filter"
    ,"luaotfload-tool", "luatools", "match_parens", "mf2pt1", "mkjobtexmf", "mkluatexfontdb", "mkt1font", "mktexfmt", "mptopdf"
    ,"mtxrun", "ot2kpx", "pdf180", "pdf270", "pdf90", "pdfatfi", "pdfbook", "pdfcrop", "pdfflip", "pdfjam", "pdfjam-pocketmod"
    ,"pdfjam-slides3up", "pdfjam-slides6up", "pdfjoin", "pdfnup", "pdfpun", "pfarrei", "pkfix", "pkfix-helper", "ps2eps", "ps2frag"
    ,"pslatex", "pstopdf", "purifyeps", "repstopdf", "rpdfcrop", "rungs", "simpdftex", "sty2dtx", "texconfig", "texconfig-dialog"
    ,"pythontex", "depythontex","ltximg","texfot", "latex-git-log", "latexindent"
    ,"texconfig-sys", "texcount", "texdef", "texdiff", "texdirflatten", "texdoc", "texdoctk", "texexec", "texindy", "texlinks"
    ,"texliveonfly", "texloganalyser", "texmfstart", "thumbpdf", "typeoutfileinfo", "updmap", "updmap-sys", "vpl2ovp", "vpl2vpl", "xindy"]

    htmlxml_scripts=["ht", "htcontext", "htlatex", "htmex", "httex", "httexi", "htxelatex", "htxetex", "mk4ht"]

    langcyrillic_scripts=["rubibtex", "rumakeindex"]

    langcjk_scripts=["convbkmk", "ptex2pdf", "kanji-fontmap-creator", "kanji-config-updmap", "kanji-config-updmap-sys"]

    langextra_scripts=["ebong"]

    langgreek_scripts=["mkgrkindex"]

    latexextra_scripts=["authorindex", "exceltex", "makeglossaries", "pdfannotextractor", "perltex", "ps4pdf", "splitindex" ,"svn-multi", "vpe"]

    music_scripts=["m-tx", "musixtex", "musixflx", "pmx2pdf"]

    pictures_scripts=["cachepic", "epspdf", "epspdftk", "fig4latex", "mathspic"]

    pstricks_scripts=["pedigree", "pst2pdf"]

    science_scripts=["ulqda"]

    # remove unneeded files and symlinks
    dirs = []
    for g in [bibtexextra_scripts, core_scripts, htmlxml_scripts, \
              langcjk_scripts, langcyrillic_scripts, langextra_scripts, \
              langgreek_scripts, latexextra_scripts, music_scripts, \
              pictures_scripts, pstricks_scripts, science_scripts, \
              ["tlmgr"]]:
        for s in g:
            if shelltools.isLink("%s/usr/bin/%s" % (get.installDIR(), s)):
                realpath = shelltools.realPath("%s/usr/bin/%s" % (get.installDIR(), s))
                dirname = shelltools.dirName(realpath)
                if not dirname in dirs: dirs.append(dirname)
                if not dirname == "%s/usr/bin" % get.installDIR():
                    if shelltools.isFile(realpath): shelltools.unlink(realpath)
                pisitools.remove("/usr/bin/%s" % s)
    
    # remove empty dirs
    while dirs:
        tmpdirs = dirs[:]
        for d in tmpdirs:
            if not shelltools.ls(d):
                shelltools.unlinkDir(d)
                dirname = shelltools.dirName(d)
                if not dirname in dirs: dirs.append(dirname)
            dirs.remove(d)

    pdftexsymlinks=["amstex", "cslatex", "csplain", "eplain", "etex", "jadetex", "latex", "mex", "mllatex", "mltex"
          ,"pdfetex", "pdfcslatex", "pdfcsplain", "pdfjadetex", "pdflatex", "pdfmex", "pdfxmltex", "texsis", "utf8mex", "xmltex"]

    for symlink in pdftexsymlinks:
        pisitools.dosym("pdftex", "/usr/bin/%s" % symlink)

    luatexsymlinks=["dvilualatex", "dviluatex", "lualatex"]

    for symlink in luatexsymlinks:
        pisitools.dosym("pdftex", "/usr/bin/%s" % symlink)
        
    pisitools.dosym("eptex", "/usr/bin/platex")
    pisitools.dosym("euptex", "/usr/bin/uplatex")
    pisitools.dosym("xetex", "/usr/bin/xelatex")
    
    #remove conflicts files with texlive-core
    pisitools.remove("/usr/share/texmf-dist/web2c/fmtutil.cnf")
    pisitools.remove("/usr/share/texmf-dist/texconfig/tcfmgr")
    pisitools.remove("/usr/share/texmf-dist/texconfig/tcfmgr.map")
    pisitools.removeDir("/usr/share/texmf-dist/xindy")

    #rm chktexrc in TEXMFCONFIG
    pisitools.remove("/usr/share/texmf-dist/chktex/chktexrc")
        
Пример #10
0
    def testRealPath(self):
        from pisi.actionsapi.shelltools import realPath

        assert realPath('doc/dependency.pdf')
        assert realPath('tests/database/sourcedbtest.py')
Пример #11
0
    def testRealPath(self):
        from pisi.actionsapi.shelltools import realPath

        assert realPath('doc/dependency.pdf')
        assert realPath('tests/database/sourcedbtest.py')
Пример #12
0
def install():
        
    shelltools.cd("%s/source/build/" % get.workDIR())
    autotools.rawInstall("prefix=/usr DESTDIR=%s" % get.installDIR())

    pisitools.dodir("/usr/share/tlpkg/TeXLive")
    shelltools.move("%s/source/utils/biber/TeXLive/*.pm" % get.workDIR(), "%s/usr/share/tlpkg/TeXLive" % get.installDIR())
    
    
    # install texmf tree
    folders = ["/usr/share",
	       "/etc/texmf/chktex",
	       "/etc/texmf/tex/",
               "/etc/texmf/web2c",
               "/etc/texmf/dvips/config",
               "/etc/texmf/dvipdfm",
               "/etc/texmf/texconfig",
               "/etc/texmf/ttf2pk",
               "/etc/texmf/xdvi",
               "/etc/fonts/conf.avail",
               "/etc/texmf/dvipdfmx"]

    for dirs in folders:
        pisitools.dodir(dirs)

    # remove aleph from fmtutil.cnf
    pisitools.dosed("%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(), "^.*aleph.*$")
    
    pisitools.insinto("/etc/texmf/chktex", "%s/usr/share/texmf-dist/chktex/chktexrc" % get.installDIR(), sym=True) 
    #pisitools.insinto("/etc/texmf/web2c", "%s/usr/share/texmf-dist/web2c/texmf.cnf" % get.installDIR(), sym=True)
    pisitools.insinto("/etc/texmf/web2c", "%s/usr/share/texmf-dist/web2c/fmtutil.cnf" % get.installDIR(), sym=True)
    pisitools.insinto("/etc/texmf/texconfig", "%s/usr/share/texmf-dist/texconfig/tcfmgr.map" % get.installDIR(), sym=True)
    pisitools.insinto("/etc/texmf/dvipdfmx", "%s/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg" % get.installDIR(), sym=True)
    pisitools.insinto("/etc/texmf/ttf2pk", "%s/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg" % get.installDIR(), sym=True)
    pisitools.insinto("/etc/texmf/xdvi", "%s/usr/share/texmf-dist/xdvi/XDvi" % get.installDIR(), sym=True)

    # fix symlinks, some are incorrect
    # makefile patching is another way, but there ar/dvipdfmx.cfge lot of scripts
    # pathing each makefile makes it much harder, for now this is a "simpler" solution
    for binary in shelltools.ls(get.installDIR() + "/usr/bin"):
        real_path = shelltools.realPath(get.installDIR() + "/usr/bin/" + binary)
        if "texmf" in real_path and not os.path.exists(real_path): # modify only if it is broken
            base_path = real_path.replace(get.installDIR() + "/usr", "")
            new_path = "/usr/share" + base_path
            shelltools.unlink(get.installDIR() + "/usr/bin/" + binary)
            pisitools.dosym(new_path, "/usr/bin/" + binary)

    # create symlinks for formats
    # shelltools.export("PATH", get.installDIR() + "/usr/bin")
    #shelltools.system("PATH=\"$PATH:%s/usr/bin\" texlinks -f %s/usr/share/texmf-dist/web2c/fmtutil.cnf %s/usr/bin/" % (get.installDIR(), get.installDIR(), get.installDIR()))

    # remove files form disabled packages
    # we copy all man and info files into mandir. Disabling packages just remove binaries.
    # the remaining man and info files should be deleted manually
    
    pisitools.remove("/usr/share/texmf-dist/fonts/map/dvipdfmx/cid-x.map")
    pisitools.remove("/usr/share/texmf-dist/fonts/map/glyphlist/texglyphlist.txt")
    pisitools.remove("/usr/share/texmf-dist/scripts/chktex/chkweb.sh")
    pisitools.remove("/usr/share/texmf-dist/fonts/enc/dvips/base/7t.enc")
    pisitools.remove("/usr/share/texmf-dist/fonts/map/glyphlist/pdfglyphlist.txt")
    pisitools.remove("/usr/share/texmf-dist/scripts/chktex/deweb.pl")
    pisitools.remove("/usr/share/texmf-dist/scripts/ps2eps/ps2eps.pl")
    pisitools.remove("/usr/share/texmf-dist/fonts/cmap/dvipdfmx/EUC-UCS2")
    pisitools.remove("/usr/share/texmf-dist/chktex/chktexrc")
    pisitools.remove("/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg")
    pisitools.remove("/usr/share/texmf-dist/fonts/map/glyphlist/glyphlist.txt")
    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/texmf.cnf")
    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_filter")
    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")
    
Пример #13
0
def install():
    pisitools.dobin("biber", "/usr/bin")

    pisitools.dodir("/usr/share/tlpkg/TeXLive")
    shelltools.copy("source/utils/biber/TeXLive/*.pm", "%s/usr/share/tlpkg/TeXLive" % get.installDIR())

    shelltools.cd("source/build")
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    bibtexextra_scripts=["bibexport", "listbib" ,"multibibliography", "urlbst"]

    core_scripts=["a2ping","a5toa4", "adhocfilelist", "afm2afm", "allcm", "allec", "allneeded", "arara","arlatex"
    ,"autoinst", "bundledoc", "checkcites", "chkweb", "context", "ctanify", "ctanupload", "ctxtools", "de-macro", "deweb"
    ,"dosepsbin", "dtxgen", "dvi2fax", "dviasm", "dvired", "e2pall", "epstopdf", "findhyph", "fmtutil", "fmtutil-sys"
    ,"fontinst", "fragmaster", "installfont-tl", "kpsepath", "kpsetool", "kpsewhere", "kpsexpand", "latex2man", "latexdiff"
    ,"latexdiff-vc", "latexfileversion", "latexmk", "latexpand", "latexrevise", "listings-ext.sh", "ltxfileinfo", "lua2dox_filter"
    ,"luaotfload-tool", "luatools", "match_parens", "mf2pt1", "mkjobtexmf", "mkluatexfontdb", "mkt1font", "mktexfmt", "mptopdf"
    ,"mtxrun", "ot2kpx", "pdf180", "pdf270", "pdf90", "pdfatfi", "pdfbook", "pdfcrop", "pdfflip", "pdfjam", "pdfjam-pocketmod"
    ,"pdfjam-slides3up", "pdfjam-slides6up", "pdfjoin", "pdfnup", "pdfpun", "pfarrei", "pkfix", "pkfix-helper", "ps2eps", "ps2frag"
    ,"pslatex", "pstopdf", "purifyeps", "repstopdf", "rpdfcrop", "rungs", "simpdftex", "sty2dtx", "texconfig", "texconfig-dialog"
    ,"texconfig-sys", "texcount", "texdef", "texdiff", "texdirflatten", "texdoc", "texdoctk", "texexec", "texindy", "texlinks"
    ,"texliveonfly", "texloganalyser", "texmfstart", "thumbpdf", "typeoutfileinfo", "updmap", "updmap-sys", "vpl2ovp", "vpl2vpl", "xindy"]

    htmlxml_scripts=["ht", "htcontext", "htlatex", "htmex", "httex", "httexi", "htxelatex", "htxetex", "mk4ht"]

    langcyrillic_scripts=["rubibtex", "rumakeindex"]

    langcjk_scripts=["convbkmk", "ptex2pdf", "kanji-fontmap-creator", "kanji-config-updmap", "kanji-config-updmap-sys"]

    langextra_scripts=["ebong"]

    langgreek_scripts=["mkgrkindex"]

    latexextra_scripts=["authorindex", "exceltex", "makeglossaries", "pdfannotextractor", "perltex", "ps4pdf", "splitindex" ,"svn-multi", "vpe"]

    music_scripts=["m-tx", "musixtex", "musixflx", "pmx2pdf"]

    pictures_scripts=["cachepic", "epspdf", "epspdftk", "fig4latex", "mathspic"]

    pstricks_scripts=["pedigree", "pst2pdf"]

    science_scripts=["ulqda"]

    # remove unneeded files and symlinks
    dirs = []
    for g in [bibtexextra_scripts, core_scripts, htmlxml_scripts, \
              langcjk_scripts, langcyrillic_scripts, langextra_scripts, \
              langgreek_scripts, latexextra_scripts, music_scripts, \
              pictures_scripts, pstricks_scripts, science_scripts, \
              ["tlmgr"]]:
        for s in g:
            if shelltools.isLink("%s/usr/bin/%s" % (get.installDIR(), s)):
                realpath = shelltools.realPath("%s/usr/bin/%s" % (get.installDIR(), s))
                dirname = shelltools.dirName(realpath)
                if not dirname in dirs: dirs.append(dirname)
                if not dirname == "%s/usr/bin" % get.installDIR():
                    if shelltools.isFile(realpath): shelltools.unlink(realpath)
                pisitools.remove("/usr/bin/%s" % s)

    # remove empty dirs
    while dirs:
        tmpdirs = dirs[:]
        for d in tmpdirs:
            if not shelltools.ls(d):
                shelltools.unlinkDir(d)
                dirname = shelltools.dirName(d)
                if not dirname in dirs: dirs.append(dirname)
            dirs.remove(d)

    pdftexsymlinks=["amstex", "cslatex", "csplain", "eplain", "etex", "jadetex", "latex", "mex", "mllatex", "mltex"
          ,"pdfetex", "pdfcslatex", "pdfcsplain", "pdfjadetex", "pdflatex", "pdfmex", "pdfxmltex", "texsis", "utf8mex", "xmltex"]

    for symlink in pdftexsymlinks:
        pisitools.dosym("pdftex", "/usr/bin/%s" % symlink)

    luatexsymlinks=["dvilualatex", "dviluatex", "lualatex"]

    for symlink in luatexsymlinks:
        pisitools.dosym("pdftex", "/usr/bin/%s" % symlink)


    pisitools.dosym("eptex", "/usr/bin/platex")
    pisitools.dosym("euptex", "/usr/bin/uplatex")
    pisitools.dosym("xetex", "/usr/bin/xelatex")

    pisitools.removeDir("/usr/share/texmf-dist")