Example #1
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    # Handle static libs in /usr/%libdir/static
    pisitools.dodir("/usr/lib/static")
    for i in shelltools.ls("%s/usr/lib/*.a" % get.installDIR()):
        pisitools.domove("/usr/lib/%s" % shelltools.baseName(i), "/usr/lib/static/")

    linknonwide("/usr/lib/static")
    linknonwide("/usr/lib")

    if multilib:
        pisitools.dodir("/usr/lib32/static")
        for i in shelltools.ls("build32/lib/*.a"):
            pisitools.insinto("/usr/lib32/static/", "build32/lib/%s" % shelltools.baseName(i))

        linknonwide("/usr/lib32/static")


    # We need the basic terminfo files in /etc
    terminfo = ["ansi", "console", "dumb", "linux", "rxvt", "screen", "sun", \
                "vt52", "vt100", "vt102", "vt200", "vt220", "xterm", "xterm-color", "xterm-xfree86"]

    for f in terminfo:
        termfile = f[0] + "/" + f
        if shelltools.can_access_file("/usr/share/terminfo/%s" % termfile):
            pisitools.dodir("/etc/terminfo/%s" % f[0])
            pisitools.domove("/usr/share/terminfo/%s" % termfile, "/etc/terminfo/%s" % f[0])
            pisitools.dosym("../../../../etc/terminfo/%s/%s" % (f[0], f), "/usr/share/terminfo/%s/%s" % (f[0], f))

    pisitools.dodoc("ANNOUNCE", "NEWS", "README*", "TO-DO")
Example #2
0
def install():
    crosstools.rawInstall("program_transform_name= DESTDIR=%s" % get.installDIR())

    # No static libs
    pisitools.remove("/usr/lib/*.a")

    for file in shelltools.ls(get.installDIR() + "/usr/lib/*w.*"):
        source = file.replace(get.installDIR(), "")
        destination = source.replace("w.", ".")
        pisitools.dosym(source.replace("/usr/lib/", ""), destination)

    for file in shelltools.ls(get.installDIR() + "/lib/libncursesw.so*"):
        source = file.replace(get.installDIR(), "")
        destination = source.replace("w.", ".")
        pisitools.dosym(source.replace("/usr/lib/", ""), destination)

    # We need the basic terminfo files in /etc
    terminfo = ["ansi", "console", "dumb", "linux", "rxvt", "screen", "sun", \
                "vt52", "vt100", "vt102", "vt200", "vt220", "xterm", "xterm-color", "xterm-xfree86"]

    for file in terminfo:
        termfile = file[0] + "/" + file
        if shelltools.can_access_file("/usr/share/terminfo/%s" % termfile):
            pisitools.dodir("/etc/terminfo/%s" % file[0])
            pisitools.domove("/usr/share/terminfo/%s" % termfile, "/etc/terminfo/%s" % file[0])
            pisitools.dosym("../../../../etc/terminfo/%s/%s" % (file[0], file ), "/usr/share/terminfo/%s/%s" % (file[0], file ))

    pisitools.dodoc("ANNOUNCE", "NEWS", "README*", "TO-DO")
Example #3
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())


    libbasedir = "lib"
    # Handle static libs in /usr/%libdir/static
    pisitools.dodir("/usr/%s/static" % libbasedir)
    for i in shelltools.ls("%s/usr/%s/*.a" % (get.installDIR(), libbasedir)):
        pisitools.domove("/usr/%s/%s" % (libbasedir, shelltools.baseName(i)), "/usr/%s/static/" % libbasedir)

    linknonwide("/usr/%s/static" % libbasedir)
    linknonwide("/usr/%s" % libbasedir)

    # We need the basic terminfo files in /etc
    terminfo = ["ansi", "console", "dumb", "linux", "rxvt", "screen", "sun", \
                "vt52", "vt100", "vt102", "vt200", "vt220", "xterm", "xterm-color", "xterm-xfree86"]

    # http://liste.pardus.org.tr/gelistirici/2011-October/057009.html
    for d in ("ncurses", "ncursesw"):
        pisitools.dodir("/usr/include/%s" % d)
        for h in shelltools.ls("%s/usr/include/*.h" % get.installDIR()):
            pisitools.dosym("../%s" % os.path.basename(h), "/usr/include/%s/%s" % (d, os.path.basename(h)))

    for f in terminfo:
        termfile = f[0] + "/" + f
        if shelltools.can_access_file("/usr/share/terminfo/%s" % termfile):
            pisitools.dodir("/etc/terminfo/%s" % f[0])
            pisitools.domove("/usr/share/terminfo/%s" % termfile, "/etc/terminfo/%s" % f[0])
            pisitools.dosym("../../../../etc/terminfo/%s/%s" % (f[0], f), "/usr/share/terminfo/%s/%s" % (f[0], f))

    # Maintain proper linking, whack ncurses into /lib/
    pisitools.domove ("/usr/lib/libncurses*.so*", "/lib/")
    pisitools.dosym("/lib/libncurses.so", "/lib/libcurses.so")
    pisitools.dosym("/lib/libncursesw.so", "/lib/libcursesw.so")
    pisitools.dodoc("ANNOUNCE", "NEWS", "README*", "TO-DO")
Example #4
0
def install():
    define_global()

    autotools.rawInstall("INSTALL_ROOT=%s" % get.installDIR())

    # Correct Makefile's
    pisitools.dosed("examples/Makefile", get.curDIR() , QTBASE)
    for file in shelltools.ls("examples/*/Makefile"):
        pisitools.dosed(file, get.curDIR() , QTBASE)

    pisitools.dosed("tutorial/Makefile", get.curDIR() , QTBASE)
    for file in shelltools.ls("tutorial/*/Makefile"):
        pisitools.dosed(file, get.curDIR() , QTBASE)

    # Move tutorial and example into QTBASE
    pisitools.insinto(QTBASE, "tutorial")
    pisitools.insinto(QTBASE, "examples")

    # Correct .qmake.cache
    pisitools.insinto(QTBASE, ".qmake.cache")
    pisitools.dosed("%s/usr/qt/3/.qmake.cache" % get.installDIR(), get.curDIR() , QTBASE)

    # No static libs
    pisitools.remove("/usr/qt/3/lib/*.a")

    # No designer prl files
    pisitools.remove("/usr/qt/3/lib/libdesignercore.prl")
    pisitools.remove("/usr/qt/3/lib/libeditor.prl")

    # This symlink was pointing to a nonsense location in /var/pisi, causing
    # pisi to bork about the package integrity.
    pisitools.remove("/usr/qt/3/mkspecs/linux-g++/linux-g++")

    # Symlink pkgconfig file
    pisitools.dosym("/usr/qt/3/lib/pkgconfig/qt-mt.pc","/usr/lib/pkgconfig/qt-mt.pc")
Example #5
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.insinto("/usr/share/hal/fdi/information/20thirdparty/", "scripts/hal/20-ups-nut-device.fdi")

    pisitools.dodir("/usr/libexec")
    for f in shelltools.ls("drivers"):
        if f.startswith("hald-addon-"):
            pisitools.dosym("/lib/nut/%s" % f, "/usr/libexec/%s" % f)

    # needed by scripts, this trick is for safely unmounting /usr
    pisitools.dosym("/lib/nut/upsdrvctl", "/usr/sbin/upsdrvctl")

    # nut's own statedir
    pisitools.dodir(nutconfig["STATE_PATH"])
    shelltools.chmod("%s/%s" % (get.installDIR(), nutconfig["STATE_PATH"]), 0770)

    # let configs work
    for f in shelltools.ls("%s/%s/*.sample" % (get.installDIR(), nutconfig["CONF_DIR"])):
        _file = shelltools.baseName(f)
        pisitools.rename("%s/%s" % (nutconfig["CONF_DIR"], _file), _file[:-7])

    # docs examples and cable diagrams
    pisitools.newdoc("lib/README", "README.lib")
    pisitools.insinto("%s/%s" % (get.docDIR(), get.srcTAG()), "docs/cables")
    pisitools.dodoc("ChangeLog", "CREDITS", "MAINTAINERS", "NEWS", "README", "UPGRADING", "docs/FAQ", "docs/*.txt")
Example #6
0
def build():
    for dtxdoc in shelltools.ls("*.dtx"):
        shelltools.system("tex ./%s" % dtxdoc)
    
    for insfile in shelltools.ls("."):
        if insfile.endswith("ins"):
            shelltools.system("latex --interaction=batchmode %s" % insfile)
Example #7
0
def install():
    define_global()

    autotools.rawInstall("INSTALL_ROOT=%s" % get.installDIR())

    # Correct Makefile's
    pisitools.dosed("examples/Makefile", get.curDIR() , QTBASE)
    for file in shelltools.ls("examples/*/Makefile"):
        pisitools.dosed(file, get.curDIR() , QTBASE)

    pisitools.dosed("tutorial/Makefile", get.curDIR() , QTBASE)
    for file in shelltools.ls("tutorial/*/Makefile"):
        pisitools.dosed(file, get.curDIR() , QTBASE)

    # Move tutorial and example into QTBASE
    pisitools.insinto(QTBASE, "tutorial")
    pisitools.insinto(QTBASE, "examples")

    # Correct .qmake.cache
    pisitools.insinto(QTBASE, ".qmake.cache")
    pisitools.dosed("%s/usr/qt/3/.qmake.cache" % get.installDIR(), get.curDIR() , QTBASE)

    # No static libs
    pisitools.remove("/usr/qt/3/lib/*.a")

    # No designer prl files
    pisitools.remove("/usr/qt/3/lib/libdesignercore.prl")
    pisitools.remove("/usr/qt/3/lib/libqassistantclient.prl")
    pisitools.remove("/usr/qt/3/lib/libeditor.prl")
Example #8
0
    def testShelltoolsLs(self):
        from pisi.actionsapi.shelltools import ls

        self.assertEqual(os.listdir("tests/actionsapitests"), ls("tests/actionsapitests"))

        self.assertEqual(os.listdir("tests/actionsapitests/linkeddir"), ls("tests/actionsapitests/linktoadirectory"))

        self.assertEqual(["tests/actionsapitests/file"], ls("tests/actionsapitests/f*"))
Example #9
0
def build():
    shelltools.system("latex --interaction=batchmode ./envlab.ins")

    texdocs = shelltools.ls("*.tex")
    texdocs.extend(shelltools.ls("*.dtx"))
    for texdoc in texdocs:
        print texdoc
        shelltools.system("texi2dvi -q -c --language=latex ./%s" % texdoc)
Example #10
0
def install():
    qt4.install()
    for it in shelltools.ls("%s/usr/share/cdcat" % get.installDIR()):
        if it.endswith("png"): pisitools.dosym("/usr/share/cdcat/%s" % it, "/usr/share/pixmaps/%s" % it)
        else: pisitools.dosym("/usr/share/cdcat/%s" % it, "/usr/share/doc/cdcat/%s" % it)
    for f in shelltools.ls("src/lang/*.ts"):
        d = "%s/usr/share/locale/%s/LC_MESSAGES" % (get.installDIR(), f[15:17])
        shelltools.makedirs(d)
        shelltools.system('lrelease -qm %s/%s %s' % (d, f[9:].replace(".ts", ".qm"), f))
Example #11
0
def build():
    for dtxdoc in shelltools.ls("*.dtx"):
        shelltools.system("tex ./%s" % dtxdoc)

    texdocs = shelltools.ls("*.tex")
    texdocs.extend(shelltools.ls("*.dtx"))
    for texdoc in texdocs:
        print texdoc
        shelltools.system("texi2dvi -q -c --language=latex ./%s" % texdoc)
Example #12
0
def install():
    pisitools.insinto("/usr/include/%s" % get.srcNAME().lower(), "Include/*.h")
    pisitools.dodoc("README.txt")
    shelltools.copy("Doc/*", "%s/usr/share/doc/%s" % (get.installDIR(), get.srcNAME()))
    shelltools.cd("Lib")
    for l in shelltools.ls("*.so*"):
        pisitools.insinto("/usr/lib", l)
    for l in shelltools.ls("*.a"):
        pisitools.insinto("/usr/lib", l)
Example #13
0
def install():
    # Build dummy PDFs to break fop dependency
    shelltools.system("./genpdf")

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

    # Cleanup package
    pisitools.remove("/usr/lib/erlang/Install")

    # Remove win32 stuff, old txt files, object files, etc.
    for f in ("lib/observer-*/priv/bin/*.bat",
              "lib/os_mon-*/ebin/nteventlog.beam",
              "lib/ssl-*/examples/certs/etc/otpCA/*.txt.old",
              "lib/webtool-*/priv/bin/start_webtool.bat",
              "lib/*-*/info",
              "erts-*/info",
              "man/man3/erl_set_memory_block.*",
              "man/man3/nteventlog.*",
              "man/man3/win32reg.*",
              "man/man1/erlsrv.*",
              "man/man1/werl.*",
              "PR.template",
              ):
        pisitools.remove("/usr/lib/erlang/%s" % f)

    # Move README and COPYRIGHT
    pisitools.domove("/usr/lib/erlang/README", "/usr/share/doc/%s" % get.srcNAME())
    pisitools.domove("/usr/lib/erlang/COPYRIGHT", "/usr/share/doc/%s" % get.srcNAME())

    for d in ("lib/*/priv/obj",
              "lib/*/c_src",
              "lib/*/java_src",
              "erts-5.7.5/doc",
              "erts-5.7.5/man",
              "misc"):
        pisitools.removeDir("/usr/lib/erlang/%s" % d)

    # Relocate doc files
    pisitools.domove("/usr/lib/erlang/doc/*", "/usr/share/doc/%s" % get.srcNAME())
    pisitools.removeDir("/usr/lib/erlang/doc")

    for module in shelltools.ls("%s/usr/lib/erlang/erts-*/doc" % get.installDIR()):
        pisitools.domove(os.path.join(module.split(get.installDIR())[-1], "*"),
                         "/usr/share/doc/%s/%s" % (get.srcNAME(), module.split("/")[-2]))

    for lib in shelltools.ls("%s/usr/lib/erlang/lib/*/doc" % get.installDIR()):
        path = os.path.join(lib.split(get.installDIR())[-1])
        pisitools.domove("%s/*" % path, "/usr/share/doc/%s/%s" % (get.srcNAME(), lib.split("/")[-2]))
        if len(shelltools.ls(path)) == 0:
            pisitools.removeDir(path)

    # Remove dummy installed pdf files
    shelltools.system("./genpdf clean %s/usr/share/doc/%s" % (get.installDIR(), get.srcNAME()))

    pisitools.dodoc("EPLICENCE", "AUTHORS")
Example #14
0
def install():
    shelltools.cd("%s/build-default-i686-pc-linux-gnu-nptl" % get.workDIR())

    autotools.rawInstall("DESTDIR=%s tooldir=%s" % (get.installDIR(), libpath))

    pisitools.removeDir("%s/bin" % libpath)
    pisitools.insinto(incpath, "include/libiberty.h")
    pisitools.domove("%s/lib/ldscripts/" % libpath, "%s/ldscripts" % libpath)
    pisitools.removeDir(libpath + "/lib")

    pisitools.dodir("/usr/%s/lib" % get.HOST())

    pisitools.dodoc("README")

    # create /usr/bin/* --> /usr/i686-pc-linux-gnu/binutils-bin/2.16.1/nm
    for bin in shelltools.ls("%s/usr/%s/binutils-bin/%s/" % (get.installDIR(), get.HOST(), get.srcVERSION())):
        pisitools.dosym(
            "/usr/%s/binutils-bin/%s/%s" % (get.HOST(), get.srcVERSION(), bin), "/usr/bin/%s-%s" % (get.HOST(), bin)
        )

        pisitools.dosym("/usr/%s/binutils-bin/%s/%s" % (get.HOST(), get.srcVERSION(), bin), "/usr/bin/%s" % (bin))

    # create usr/i686-pc-linux-gnu/lib/* --> /usr/lib/binutils/i686-pc-linux-gnu/2.16.1/* links
    for lib in shelltools.ls("%s/usr/lib/binutils/%s/%s/" % (get.installDIR(), get.HOST(), get.srcVERSION())):
        pisitools.dosym(
            "/usr/lib/binutils/%s/%s/%s" % (get.HOST(), get.srcVERSION(), lib), "/usr/%s/lib/%s" % (get.HOST(), lib)
        )

    pisitools.remove("/usr/%s/lib/include" % get.HOST())

    shelltools.cd("%s/%s" % (get.workDIR(), WorkDir))

    # Handle documentation
    pisitools.newdoc("bfd/README", "bfd/README")
    pisitools.newdoc("bfd/PORTING", "bfd/PORTING")
    pisitools.newdoc("bfd/TODO", "bfd/TODO")
    pisitools.newdoc("binutils/ChangeLog", "binutils/ChangeLog")
    pisitools.newdoc("binutils/NEWS", "binutils/NEWS")
    pisitools.newdoc("binutils/README", "binutils/README")
    pisitools.newdoc("gas/CONTRIBUTORS", "gas/CONTRIBUTORS")
    pisitools.newdoc("gas/NEWS", "gas/NEWS")
    pisitools.newdoc("gas/README", "gas/README")
    pisitools.newdoc("gas/README-vms", "gas/README-vms")
    pisitools.newdoc("gprof/ChangeLog", "gprof/ChangeLog")
    pisitools.newdoc("gprof/ChangeLog.linux", "gprof/ChangeLog.linux")
    pisitools.newdoc("gprof/TEST", "gprof/TEST")
    pisitools.newdoc("gprof/TODO", "gprof/TODO")
    pisitools.newdoc("gprof/bbconv.pl", "gprof/bbconv.pl")
    pisitools.newdoc("ld/README", "ld/README")
    pisitools.newdoc("ld/NEWS", "ld/NEWS")
    pisitools.newdoc("ld/TODO", "ld/TODO")
    pisitools.newdoc("libiberty/ChangeLog.linux", "libiberty/ChangeLog.linux")
    pisitools.newdoc("libiberty/ChangeLog", "libiberty/ChangeLog")
    pisitools.newdoc("libiberty/README", "libiberty/README")
Example #15
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")
Example #16
0
def install():
    shelltools.export("HOME", get.workDIR())

    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    #Remove upstream desktop files, use ours. It's very hard to translate and make changes in those desktop files
    pisitools.remove("/usr/share/applications/*.desktop")

    #dosym main executables
    for bin in map(os.path.basename, shelltools.ls("%s/opt/OpenOffice.org/bin/*" % get.installDIR())):
        pisitools.dosym("/opt/OpenOffice.org/bin/ooo-wrapper.py", "/usr/bin/%s" % bin)

    # Icons
    pisitools.insinto("/usr/share/pixmaps","desktop/48x48/*.png")

    # Icon symlinks
    pisitools.dosym("/usr/share/pixmaps/ooo-impress.png","/usr/share/pixmaps/presentation.png")
    pisitools.dosym("/usr/share/pixmaps/ooo-writer.png","/usr/share/pixmaps/wordprocessing.png")
    pisitools.dosym("/usr/share/pixmaps/ooo-calc.png","/usr/share/pixmaps/spreadsheet.png")
    pisitools.dosym("/usr/share/pixmaps/ooo-base.png","/usr/share/pixmaps/database.png")
    pisitools.dosym("/usr/share/pixmaps/ooo-draw.png","/usr/share/pixmaps/drawing.png")
    pisitools.dosym("/usr/share/pixmaps/ooo-math.png","/usr/share/pixmaps/formula.png")

    #Put pyuno to python directory and add OpenOffice.org python modules directory to sys.path in uno.py
    unoPath = "/opt/OpenOffice.org/lib/ooo-%s/basis%s/program/uno.py" % (BaseVersion, BaseVersion)
    unopy = open(get.installDIR() + unoPath).read()
    pisitools.dodir("/usr/lib/%s/site-packages/" % get.curPYTHON())
    newunopy = open("%s/usr/lib/%s/site-packages/uno.py" % (get.installDIR(), get.curPYTHON()), "w")
    newunopy.write("import sys\nsys.path.append('/opt/OpenOffice.org/lib/ooo-%s/basis%s/program')\n%s" % (BaseVersion, BaseVersion, unopy))
    newunopy.close()
    pisitools.remove(unoPath)
    pisitools.domove("/opt/OpenOffice.org/lib/ooo-%s/basis%s/program/unohelper.py" % (BaseVersion, BaseVersion), "/usr/lib/%s/site-packages" % get.curPYTHON())

    solverDirList = shelltools.ls("build/%s/solver" % UpstreamVersion)
    if len(solverDirList) != 1:
        raise Exception("Could not find solver directory!")
    solverDir = solverDirList[0]

    #install pdfimport, report-builder, wiki-publisher and presenter screen as extensions
    pisitools.insinto("/opt/OpenOffice.org/lib/ooo-%s/share/extension/install/" % BaseVersion, "build/%s/solver/%s/unxlng*.pro/bin/report-builder.oxt" % (UpstreamVersion, solverDir))
    pisitools.insinto("/opt/OpenOffice.org/lib/ooo-%s/share/extension/install/" % BaseVersion, "build/%s/solver/%s/unxlng*.pro/bin/swext/wiki-publisher.oxt" % (UpstreamVersion, solverDir))
    pisitools.insinto("/opt/OpenOffice.org/lib/ooo-%s/share/extension/install/" % BaseVersion, "build/%s/solver/%s/unxlng*.pro/bin/minimizer/presentation-minimizer.oxt" % (UpstreamVersion, solverDir))
    pisitools.insinto("/opt/OpenOffice.org/lib/ooo-%s/share/extension/install/" % BaseVersion, "build/%s/solver/%s/unxlng*.pro/bin/presenter/presenter-screen.oxt" % (UpstreamVersion, solverDir))
    pisitools.insinto("/opt/OpenOffice.org/lib/ooo-%s/share/extension/install/" % BaseVersion, "build/%s/solver/%s/unxlng*.pro/bin/pdfimport/pdfimport.oxt" % (UpstreamVersion, solverDir))

    #install man files
    pisitools.domove("/opt/OpenOffice.org/share/man/man1/*", "/usr/share/man/man1")
    pisitools.removeDir("/opt/OpenOffice.org/share/man")

    pisitools.dodoc("AUTHORS","ChangeLog","COPYING","NEWS","README")

    #Workaround for #11530, bnc#502641
    pisitools.dosed("%s/opt/OpenOffice.org/lib/ooo-%s/basis%s/share/registry/data/org/openoffice/Office/Calc.xcu" % (get.installDIR(), BaseVersion, BaseVersion), "</oor:component-data>", " <node oor:name=\"Formula\">\n  <node oor:name=\"Syntax\">\n   <prop oor:name=\"Grammar\" oor:type=\"xs:int\">\n    <value>0</value>\n   </prop>\n  </node>\n </node>\n</oor:component-data>")
Example #17
0
def install():
    autotools.install()

    pisitools.insinto("/usr/bin", "libs/captmon/captmon")
    pisitools.insinto("/usr/bin", "libs/captmon2/captmon2")
    pisitools.insinto("/usr/bin", "libs/captfilter")
    pisitools.insinto("/usr/bin", "libs/captdrv")
    pisitools.insinto("/usr/bin", "libs/captemon/captmonlbp5000")
    pisitools.insinto("/usr/bin", "libs/captemon/captmonlbp3300")
    pisitools.insinto("/usr/bin", "libs/captemon/captmoncnac5")
    pisitools.insinto("/usr/bin", "libs/captemon/captmoncnac6")
    pisitools.insinto("/usr/bin", "libs/captemon/captmoncnab6")

    for file in shelltools.ls("libs/ccpddata"):
        pisitools.insinto("/usr/share/ccpd", "libs/ccpddata/%s" % file)

    for file in shelltools.ls("data/"):
        pisitools.insinto("/usr/share/caepcm", "data/%s" % file)

    pisitools.insinto("/usr/share/captemon", "libs/captemon/msgtablelbp5000.xml")
    pisitools.insinto("/usr/share/captemon", "libs/captemon/msgtablelbp3300.xml")
    pisitools.insinto("/usr/share/captemon", "libs/captemon/msgtablecnac5.xml")
    pisitools.insinto("/usr/share/captemon", "libs/captemon/msgtablecnac6.xml")
    pisitools.insinto("/usr/share/captemon", "libs/captemon/msgtablecnab6.xml")

    pisitools.insinto("/usr/share/captmon", "libs/captmon/msgtable.xml")
    pisitools.insinto("/usr/share/captmon2", "libs/captmon2/msgtable2.xml")

    pisitools.dosbin("libs/ccpd")
    pisitools.dosbin("libs/ccpdadmin")

    # Install files from samples directory
    pisitools.insinto("/etc", "samples/ccpd.conf")
    #pisitools.insinto("/etc/init.d", "samples/ccpd")

    # Install shared libraries from libs directory
    pisitools.dolib_so("libs/libcaptfilter.so.1.0.0")
    pisitools.dolib_so("libs/libcaiocaptnet.so.1.0.0")
    pisitools.dolib_so("libs/libcncaptnpm.so.1.0.2")

    # Do symlinks to shared libraries
    pisitools.dosym("/usr/lib/libcaiocaptnet.so.1.0.0", "/usr/lib/libcaiocaptnet.so.1")
    pisitools.dosym("/usr/lib/libcaiocaptnet.so.1.0.0", "/usr/lib/libcaiocaptnet.so")

    pisitools.dosym("/usr/lib/libcaptfilter.so.1.0.0", "/usr/lib/libcaptfilter.so.1")
    pisitools.dosym("/usr/lib/libcaptfilter.so.1.0.0", "/usr/lib/libcaptfilter.so")

    pisitools.dosym("/usr/lib/libcncaptnpm.so.1.0.2", "/usr/lib/libcncaptnpm.so.1")
    pisitools.dosym("/usr/lib/libcncaptnpm.so.1.0.2", "/usr/lib/libcncaptnpm.so")

    # Do doc's
    pisitools.dodoc("README*", "LICENSE*", "COPYING")
Example #18
0
def install():
    shelltools.cd(xorgserver)
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    shelltools.cd("../%s/" % mesa)
    autotools.rawInstall(
        "INSTALL_DIR=%s/usr DRI_DRIVER_INSTALL_DIR=%s/usr/lib/xorg/modules/dri INCLUDE_DIR=%s/usr/include"
        % (get.installDIR(), get.installDIR(), get.installDIR())
    )

    # Create glxinfo/gears
    shelltools.cd("progs/xdemos/")
    autotools.make("glxinfo")
    autotools.make("glxgears")

    pisitools.insinto("/usr/bin", "glxinfo")
    pisitools.insinto("/usr/bin", "glxgears")

    # Don't install private headers
    pisitools.remove("/usr/include/GL/GLw*P.h")

    # Create needed symlinks
    pisitools.dosym("libGLU.so.1.3.070100", "/usr/lib/libGLU.so.1.3")
    pisitools.dosym("libGLw.so.1.0.0", "/usr/lib/libGLw.so.1.0")

    # Moving libGL and friends for dynamic switching
    pisitools.dodir("/usr/lib/opengl/lib")
    pisitools.dodir("/usr/lib/opengl/extensions")
    pisitools.dodir("/usr/lib/opengl/include")

    for file in shelltools.ls("%s/usr/lib/libGL.so*" % get.installDIR()):
        pisitools.domove(file.replace(get.installDIR(), ""), "/usr/lib/opengl/xorg-x11/lib/")

    pisitools.domove("/usr/lib/libGL.la", "/usr/lib/opengl/xorg-x11/lib/")
    pisitools.domove("/usr/lib/libGL.a", "/usr/lib/opengl/xorg-x11/lib/")

    for file in shelltools.ls("%s/usr/lib/xorg/modules/extensions/libglx*" % get.installDIR()):
        pisitools.domove(file.replace(get.installDIR(), ""), "/usr/lib/opengl/xorg-x11/extensions/")

    for file in ("gl.h", "glx.h", "glext.h", "glxext.h"):
        pisitools.domove("/usr/include/GL/%s" % file, "/usr/lib/opengl/xorg-x11/include")

    # Default cursor theme
    pisitools.dodir("/usr/share/cursors/xorg-x11/default")
    shelltools.echo(
        "%s/usr/share/cursors/xorg-x11/default/index.theme" % get.installDIR(), "[Icon Theme]\nInherits=Jimmac"
    )

    # Workaround for liveCD
    pisitools.removeDir("/usr/share/X11/xkb/compiled/")
    pisitools.dosym("/tmp", "/usr/share/X11/xkb/compiled")
    pisitools.dosym("/usr/share/X11/xkb", "/etc/X11/xkb")
Example #19
0
def install():
    pisitools.dobin("ijs_server_epsonepl")
    pisitools.dobin("ps2epl.pl")

    # Install CUPS & Foomatic stuff
    for ppd in shelltools.ls("foomatic_PPDs"):
        pisitools.insinto("/usr/share/cups/model/foomatic-db-ppds/Epson", "foomatic_PPDs/%s" % ppd)

    for d in shelltools.ls("foomatic"):
        for f in shelltools.ls("foomatic/%s" % d):
            pisitools.insinto("/usr/share/foomatic/db/source/%s" % d, "foomatic/%s/%s" % (d,f))

    pisitools.dodoc("ChangeLog", "FAQ", "README*", "LIMITATIONS")
Example #20
0
def install():
    pisitools.dodoc("ChangeLog", "AUTHORS", "COPYING", "INSTALL", "README", "manual/work.css", "manual/index.html")
    pisitools.insinto("/usr/share/kim/",                        "README", "kim_about.txt")
    pisitools.insinto("/usr/share/kim/gallery/",                "src/gallery/*")
    pisitools.insinto("/usr/share/kim/slideshow/",              "src/slideshow/*")
    pisitools.insinto("/usr/share/kde4/services/ServiceMenus/", "src/*.desktop")

    # Just remove some unneded backup fles and installing binaries
    shelltools.cd(PkgSrcDir +"/src/bin/")
    for file in shelltools.ls("kim_*~"):
        shelltools.unlink(file)
    for file in shelltools.ls("kim_*"):
        pisitools.insinto("/usr/bin/", file)
Example #21
0
def install():
    autotools.install()

    pisitools.dodir("/usr/include/gegl-0.0/gegl/buffer")
    pisitools.dodir("/usr/include/gegl-0.0/gegl/module")

    for header in [h for h in shelltools.ls("gegl/buffer") if h.endswith(".h")]:
        pisitools.insinto("/usr/include/gegl-0.0/gegl/buffer", "gegl/buffer/%s" % header)

    for header in [h for h in shelltools.ls("gegl/module") if h.endswith(".h")]:
        pisitools.insinto("/usr/include/gegl-0.0/gegl/module", "gegl/module/%s" % header)

    pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "COPYING.LESSER", "NEWS", "README")
Example #22
0
def install():

    for srcfile in shelltools.ls("."):
        if srcfile.endswith(("dvi", "ps", "pdf")):
            pisitools.dodoc(srcfile)
            pisitools.dosym("/usr/share/doc/%s/%s" % (get.srcTAG(), srcfile), "/usr/share/texmf/doc/latex/%s/%s" % (WorkDir, srcfile))
        elif srcfile.endswith(("sty", "cls", "fd", "clo", "def", "cfg")):
            pisitools.insinto("/usr/share/texmf/tex/latex/%s/" % WorkDir, srcfile)

    for srcfile in shelltools.ls("."):
        if srcfile.endswith("tex"):
            shelltools.system("texi2dvi -q -c --language=latex %s" % srcfile)

    pisitools.dodoc("ChangeLog", "README")
Example #23
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())
    shelltools.cd(get.workDIR() + "/" + get.srcDIR() + "/filefuncs")
    autotools.rawInstall("DESTDIR=%s AWKINCDIR=%s LIBDIR=/lib" % (get.installDIR(), get.workDIR() + "/" + get.srcDIR()))
    shelltools.cd(get.workDIR() + "/" + get.srcDIR())

    pisitools.dodir("/usr/bin")

    binpath, d, ver = "", get.installDIR() + "/", get.srcVERSION()

    for i in ["gawk", "pgawk", "igawk"]:
        if i == "gawk":
            binpath = "/bin/"
        else:
            binpath = "/usr/bin/"

        if shelltools.can_access_file(d + "bin/" + i) and not shelltools.can_access_file(d + "bin/" + i + "-" + ver): 
            pisitools.domove("/bin/" + i, binpath, i + "-" + ver)
        elif shelltools.can_access_file(d + "bin/" + i + "-") and not shelltools.can_access_file(d + "bin/" + i + "-" + ver):
            pisitools.domove("/bin/" + i + "-", binpath, i + "-" + ver)
        elif binpath is "/usr/bin/"  and shelltools.can_access_file(d + "bin/" + i + "-" + ver):
            pisitools.domove("/bin/" + i + "-" + ver, binpath, i + "-" + ver)

        if shelltools.can_access_file(d + "bin/" + i):
            pisitools.remove("/bin/" + i)
            pisitools.dosym(i + "-" + ver, binpath + i)
        if binpath is "/usr/bin/":
            pisitools.dosym("/usr/bin/" + i + "-" + ver, "/bin/" + i)

    pisitools.dosym("igawk-" + ver, "/usr/bin/igawk")
    pisitools.dosym("/bin/gawk-" + ver, "/usr/bin/awk")
    pisitools.dosym("/bin/gawk-" + ver, "/usr/bin/gawk")

    pisitools.dodir("/usr/include/awk")

    for h in shelltools.ls(get.workDIR() + "/" + get.srcDIR() + "/*.h"):
        pisitools.insinto("/usr/include/awk/", h)

    if shelltools.can_access_file(d + "/usr/include/awk/acconfig.h"):
        pisitools.remove("/usr/include/awk/acconfig.h")

    pisitools.dosym("gawk.1", "/usr/share/man/man1/awk.1")
    pisitools.dodoc("AUTHORS", "ChangeLog", "FUTURES", "LIMITATIONS", "NEWS", "PROBLEMS", "POSIX.STD", "README")

    for f in shelltools.ls("README_d/"):
        pisitools.newdoc("README_d/%s" % f, "README_d/%s" % f)
    pisitools.newdoc("awklib/ChangeLog", "awklib/ChangeLog")
    pisitools.newdoc("pc/ChangeLog", "pc/ChangeLog")
    pisitools.newdoc("posix/ChangeLog", "posix/ChangeLog")
Example #24
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.doman("doc/man/man3/*.3")
    pisitools.dohtml("doc/html/*")
    pisitools.dodoc("README")

    for i in shelltools.ls("doc/*"):
        if shelltools.isFile(i):
            pisitools.dodoc(i)

    pisitools.dodir(exampledir)
    for i in shelltools.ls("sample/*"):
        if i.endswith(".h") or i.endswith(".c"):
            pisitools.insinto(exampledir, i)
Example #25
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/")
Example #26
0
def build():
    for package in shelltools.ls("."):
        if package in SkipFiles:
            continue
        shelltools.cd(package)
        autotools.make()
        shelltools.cd("../")
Example #27
0
def install():
    pisitools.dobin("dcraw")
    pisitools.doman("dcraw.1")

    # Build catalogs
    for f in shelltools.ls("*.po"):
        pisitools.domo(f, f.split("dcraw_")[1].split(".po")[0], "dcraw.mo")
Example #28
0
def install():
    for package in shelltools.ls("."):
        if package in SkipFiles:
            continue
        shelltools.cd(package)
        autotools.rawInstall("DESTDIR=%s" % get.installDIR())
        shelltools.cd("../")
Example #29
0
def install():
    #shelltools.export("HOME", "%s" %get.workDIR())
    autotools.rawInstall('DESTDIR=%s INSTALL="install -p"'% get.installDIR())
    pisitools.removeDir("/usr/share/locale")
    for i in shelltools.ls("examples"):
        if i.endswith(".png") or i.endswith(".c"):
            pisitools.insinto("/%s/%s/examples/" % (get.docDIR(), get.srcNAME()), "examples/%s" % i)
Example #30
0
def install():
    autotools.rawInstall("INSTALL_PREFIX=%s MANDIR=/usr/share/man" % get.installDIR())

    # Rename conflicting manpages
    pisitools.rename("/usr/share/man/man1/passwd.1", "ssl-passwd.1")
    pisitools.rename("/usr/share/man/man3/rand.3", "ssl-rand.3")
    pisitools.rename("/usr/share/man/man3/err.3", "ssl-err.3")

    if get.buildTYPE() == "_emul32":
        from distutils.dir_util import copy_tree
        copy_tree("%s/_emul32/lib32/" % get.installDIR(), "%s/usr/lib32" % get.installDIR())
        pisitools.removeDir("/_emul32")
        pisitools.remove("/usr/lib32/*.a")
        path = "%s/usr/lib32/pkgconfig" % get.installDIR()
        for f in shelltools.ls(path): pisitools.dosed("%s/%s" % (path, f), "^(prefix=\/)_emul32", r"\1usr")
        return

    # Move engines to /usr/lib/openssl/engines
    pisitools.dodir("/usr/lib/openssl")
    pisitools.domove("/usr/lib/engines", "/usr/lib/openssl")

    # Certificate stuff
    pisitools.dobin("tools/c_rehash")
    pisitools.dosym("/etc/pki/tls/certs/ca-bundle.crt","/etc/pki/tls/cert.pem")


    # Create CA dirs
    for cadir in ["CA", "CA/private", "CA/certs", "CA/crl", "CA/newcerts"]:
        pisitools.dodir("/etc/pki/%s" % cadir)

    # No static libs
    pisitools.remove("/usr/lib/*.a")

    pisitools.dohtml("doc/*")
    pisitools.dodoc("CHANGES*", "FAQ", "LICENSE", "NEWS", "README", "doc/*.txt")
Example #31
0
def linknonwide(targetDir):
    # symlink normal objects to widechar ones, to force widechar enabling
    for f in shelltools.ls("%s/%s/*w.*" % (get.installDIR(), targetDir)):
        source = shelltools.baseName(f)
        destination = source.replace("w.", ".")
        pisitools.dosym(source, "%s/%s" % (targetDir, destination))
Example #32
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR(), "install-modules")

    for f in shelltools.ls("alsa-kernel/Documentation/*txt"):
        pisitools.dodoc(f)
    pisitools.dodoc("doc/serialmidi.txt")
Example #33
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")
Example #34
0
def setup():
    for f in shelltools.ls("./"):
        shelltools.chmod(f, 0644)
Example #35
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", "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")
Example #36
0
def setup():
    MocFilesToRemove = shelltools.ls("moc_*")
    for i in MocFilesToRemove:
        shelltools.unlink(i)

    shelltools.system("qmake QMAKE_CXXFLAGS_RELEASE=\'%s\'" % get.CXXFLAGS())
Example #37
0
def install():
    if get.buildTYPE() == "emul32":
        qt4.install("INSTALL_ROOT=%s32" % get.installDIR())
        shelltools.move("%s32/usr/lib32" % get.installDIR(),
                        "%s/usr" % get.installDIR())
        return

    qt4.install()
    pisitools.dodir(qt4.bindir)

    #Remove phonon, we use KDE's phonon but we have to build Qt with Phonon support for webkit and some other stuff
    pisitools.remove("%s/libphonon*" % qt4.libdir)
    pisitools.removeDir("%s/phonon" % qt4.includedir)
    if shelltools.isDirectory("%s/%s/phonon_backend" %
                              (get.installDIR(), qt4.plugindir)):
        pisitools.removeDir("%s/phonon_backend" % qt4.plugindir)
    pisitools.remove("%s/pkgconfig/phonon*" % qt4.libdir)
    # Phonon 4.5 provides libphononwidgets.so file
    pisitools.remove("%s/designer/libphononwidgets.so" % qt4.plugindir)

    #Remove lost /usr/tests directory
    #pisitools.removeDir("usr/tests")

    # Turkish translations
    shelltools.export("LD_LIBRARY_PATH",
                      "%s%s" % (get.installDIR(), qt4.libdir))
    shelltools.system("%s%s/lrelease l10n-tr/*.ts" %
                      (get.installDIR(), bindirQt4))
    pisitools.insinto(qt4.translationdir, "l10n-tr/*.qm")

    # Fix all occurances of WorkDir in pc files
    pisitools.dosed(
        "%s%s/pkgconfig/*.pc" % (get.installDIR(), qt4.libdir),
        "%s/qt-x11-opensource-src-%s" % (get.workDIR(), get.srcVERSION()),
        qt4.prefix)

    #I hope qtchooser will manage this issue
    for bin in shelltools.ls("%s/usr/lib/qt4/bin" % get.installDIR()):
        pisitools.dosym("/usr/lib/qt4/bin/%s" % bin, "/usr/bin/%s-qt4" % bin)

    mkspecPath = "%s/mkspecs" % qtbase

    for root, dirs, files in os.walk("%s%s" % (get.installDIR(), qtbase)):
        # Remove unnecessary spec files..
        if root.endswith(mkspecPath):
            for dir in dirs:
                if not dir.startswith("linux") and dir not in [
                        "common", "qws", "features", "default"
                ]:
                    pisitools.removeDir(os.path.join(mkspecPath, dir))
        for name in files:
            if name.endswith(".prl"):
                pisitools.dosed(os.path.join(root, name),
                                "^QMAKE_PRL_BUILD_DIR.*", "")

    # Remove useless image directory, images of HTML docs are in doc/html/images
    #pisitools.removeDir("%s/src" % qt4.docdir)

    pisitools.removeDir("/usr/share/qt4/phrasebooks")

    pisitools.dodoc("changes-*", "LGPL_EXCEPTION.txt", "LICENSE.*", "README")
Example #38
0
def install():
    pisitools.insinto("/etc/vbox", "vbox.cfg")
    shelltools.chmod("src/VBox/Additions/x11/Installer/98vboxadd-xclient",
                     0755)
    pisitools.insinto("/usr/bin",
                      "src/VBox/Additions/x11/Installer/98vboxadd-xclient",
                      "VBoxClient-all")
    #pisitools.insinto("/lib/udev/rules.d", "src/VBox/Additions/linux/installer/70-xorg-vboxmouse.rules")
    pisitools.insinto("/usr/share/X11/pci",
                      "src/VBox/Additions/x11/Installer/vboxvideo.ids")
    #pisitools.insinto("/usr/share/X11/xorg.conf.d", "src/VBox/Additions/x11/Installer/50-vboxmouse.conf")

    arch = "amd64" if get.ARCH() == "x86_64" else "x86"
    shelltools.cd("out/linux.%s/release/bin" % arch)

    # libraries installation. The files below are unnecessary files.
    # TODO: change loop and make it more discrete (i.e copying each single file)
    exclude = ("additions", "icons", "nls", "scm", "sdk", "src", "SUP",
               "vboxkeyboard", "VBox.sh", "VBoxSysInfo.sh",
               "VBoxCreateUSBNode.sh", "VBoxTunctl", "testcase", "tst",
               "xpidl")

    for _file in shelltools.ls("."):
        if _file.startswith(exclude):
            continue

        print "Installing %s ..." % _file
        pisitools.insinto(VBoxLibDir, _file)

    pisitools.dobin("VBox*.sh", VBoxDataDir)
    pisitools.insinto(VBoxDataDir, "nls")

    # TODO: Add vboxwebsrv when ready
    # Binaries and Wrapper with Launchers
    apps = ("VBoxHeadless", "VBoxManage", "VBoxSDL", "VBoxVRDP", "VirtualBox",
            "VBoxBalloonCtrl")
    for link in apps:
        pisitools.dosym("../share/virtualbox/VBox.sh", "/usr/bin/%s" % link)

    pisitools.dobin("VBoxTunctl")

    # Desktop file, mimetype file for xml and icon
    pisitools.domove("%s/*.desktop" % VBoxLibDir, "/usr/share/applications")
    pisitools.domove("%s/*.png" % VBoxLibDir, "/usr/share/pixmaps")
    pisitools.domove("%s/*.xml" % VBoxLibDir, "/usr/share/mime/packages")

    # Mimetypes icons
    for size in ["16", "20", "24", "32", "48", "64", "72", "96", "128", "256"]:
        pisitools.insinto(
            "/usr/share/icons/hicolor/%sx%s/mimetypes" % (size, size),
            "icons/%sx%s/*.png" % (size, size))

    # Guest additions
    pisitools.dobin("additions/VBoxClient")
    pisitools.dobin("additions/VBoxControl")

    pisitools.dosbin("additions/VBoxService")
    pisitools.dosbin("additions/mount.vboxsf", "/sbin")

    pisitools.insinto("/lib/security", "additions/pam_vbox.so")

    pisitools.dolib("additions/VBoxOGL*")
    pisitools.dosym("../../../VBoxOGL.so",
                    "/usr/lib/xorg/modules/dri/vboxvideo_dri.so")

    pisitools.insinto("/usr/lib/xorg/modules/drivers",
                      "additions/vboxvideo_drv_%s.so" % XorgVersion,
                      "vboxvideo_drv.so")
    #pisitools.insinto("/usr/lib/xorg/modules/input",   "additions/vboxmouse_drv_%s.so" % XorgVersion, "vboxmouse_drv.so")

    # Python bindings
    pisitools.insinto("%s/sdk/bindings/xpcom" % VBoxLibDir,
                      "sdk/bindings/xpcom/python")

    shelltools.cd("sdk/installer")
    shelltools.copy("vboxapisetup.py", "setup.py")
    shelltools.export("VBOX_INSTALL_PATH", VBoxLibDir)
    pythonmodules.install()
Example #39
0
def install():
    for exe in shelltools.ls("*.x"):
        pisitools.dobin(exe)
        pisitools.rename("/usr/bin/%s" % exe, "palp-%s" % exe)

    pisitools.dodoc("COPYING")
Example #40
0
def setup():
    shelltools.copy(makefiles[get.ARCH()], "makefile.machine")

    for i in shelltools.ls("makefile.*"):
        pisitools.dosed(i, "^CC=gcc ", "CC=%s " % get.CC())
        pisitools.dosed(i, "^CXX=g\+\+ ", "CXX=%s " % get.CXX())
Example #41
0
def build():
    shelltools.system("latex --interaction=batchmode ./currvita.ins")

    for srcfile in shelltools.ls("."):
        if srcfile.endswith(("tex", "dtx")):
            shelltools.system("texi2dvi -q -c --language=latex %s" % srcfile)
Example #42
0
def setup():
    # Unpack and prepare files
    for tar_file in shelltools.ls('.'):
        if tar_file.endswith("xz"):
            shelltools.system("tar Jxfv %s" % tar_file)
Example #43
0
def install():
    for f in shelltools.ls("./"):
        pisitools.insinto(datadir, f)
Example #44
0
def install():
    qt5.install("INSTALL_ROOT=%s install_docs" % get.installDIR())

    #I hope qtchooser will manage this issue
    for bin in shelltools.ls("%s/usr/lib/qt5/bin" % get.installDIR()):
        pisitools.dosym("/usr/lib/qt5/bin/%s" % bin, "/usr/bin/%s-qt5" % bin)
Example #45
0
def install():
    pisitools.insinto("/etc/vbox", "vbox.cfg")
    pisitools.insinto("/etc/X11/Xsession.d",
                      "src/VBox/Additions/x11/Installer/98vboxadd-xclient",
                      "98-vboxclient.sh")
    pisitools.insinto("/usr/bin",
                      "src/VBox/Additions/x11/Installer/VBoxRandR.sh",
                      "VBoxRandR")
    pisitools.insinto("/usr/share/X11/pci",
                      "src/VBox/Additions/x11/Installer/vboxvideo.ids")
    pisitools.insinto("/usr/share/hal/fdi/policy/20thirdparty",
                      "src/VBox/Additions/linux/installer/90-vboxguest.fdi")

    shelltools.cd("out/linux.x86/release/bin")

    exclude = ("additions", "nls", "sdk", "src", "SUP", "vboxkeyboard",
               "VBox.sh", "VBoxSysInfo.sh", "VBoxTunctl", "testcase", "tst",
               "xpidl")

    for _file in shelltools.ls("."):
        if _file.startswith(exclude):
            continue

        print "Installing %s ..." % _file
        pisitools.insinto(VBoxLibDir, _file)

    pisitools.dobin("VBoxTunctl")

    pisitools.dobin("VBox*.sh", VBoxDataDir)
    pisitools.insinto(VBoxDataDir, "nls")

    # Symlinks
    # TODO: Add vboxwebsrv when ready
    apps = ("VBoxHeadless", "VBoxManage", "VBoxSDL", "VBoxVRDP", "VirtualBox")
    for link in apps:
        pisitools.dosym("../share/virtualbox/VBox.sh", "/usr/bin/%s" % link)

    # Desktop file and icon
    pisitools.domove("%s/*.desktop" % VBoxLibDir, "/usr/share/applications")
    pisitools.domove("%s/*.png" % VBoxLibDir, "/usr/share/pixmaps")

    # Guest additions
    pisitools.dobin("additions/VBoxClient")
    pisitools.dobin("additions/VBoxControl")

    pisitools.dosbin("additions/VBoxService")
    pisitools.dosbin("additions/mount.vboxsf", "/sbin")

    pisitools.dolib("additions/VBoxOGL*")
    pisitools.dosym("../../../VBoxOGL.so",
                    "/usr/lib/xorg/modules/dri/vboxvideo_dri.so")

    pisitools.insinto("/usr/lib/xorg/modules/drivers",
                      "additions/vboxvideo_drv_%s.so" % XorgVersion,
                      "vboxvideo_drv.so")
    pisitools.insinto("/usr/lib/xorg/modules/input",
                      "additions/vboxmouse_drv_%s.so" % XorgVersion,
                      "vboxmouse_drv.so")

    # Python bindings
    pisitools.insinto("%s/sdk/bindings/xpcom" % VBoxLibDir,
                      "sdk/bindings/xpcom/python")

    shelltools.cd("sdk/installer")
    shelltools.copy("vboxapisetup.py", "setup.py")
    shelltools.export("VBOX_INSTALL_PATH", VBoxLibDir)
    pythonmodules.install()
Example #46
0
def fixpc():
    ''' fix .pc files in installDIR()/usr/lib32/pkgconfig'''
    path = "%s/usr/lib32/pkgconfig" % get.installDIR()
    if isDirectory(path):
        for f in ls("%s/*.pc" % path):
            dosed(f, get.emul32prefixDIR(), get.defaultprefixDIR())
Example #47
0
def install():
    for f in shelltools.ls("./"):
        shelltools.chmod(f, 0644)
        pisitools.insinto(firmwareDir, f)
Example #48
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")
Example #49
0
def build():
    for package in shelltools.ls("*-*"):
        shelltools.cd(package)
        autotools.make()
        shelltools.cd("../")
Example #50
0
def install():
    # prepare and install installed packs list
    pisitools.dodir("/var/lib/texmf/pisilinux/installedpacks")
    pisitools.dosed("CONTENTS", "^#", deleteLine=True)
    pisitools.insinto("/var/lib/texmf/pisilinux/installedpacks", "CONTENTS",
                      "%s_%s.list" % (get.srcNAME(), revnr))

    for i in shelltools.ls("texmf-dist"):
        shelltools.copytree("texmf-dist/%s/" % i,
                            "%s/usr/share/texmf-dist/" % get.installDIR())
    shelltools.system(
        "find texmf-dist -type f -executable -exec chmod 755 %s/usr/share/{} \;"
        % get.installDIR())

    for i in shelltools.ls("."):
        if shelltools.isDirectory(i) and not i.startswith("texmf"):
            shelltools.copytree(i,
                                "%s/usr/share/texmf-dist/" % get.installDIR())

    # clean config files
    pisitools.dosed("tex/generic/config",
                    "DO NOT EDIT",
                    deleteLine=True,
                    filePattern="language\.d..$")
    pisitools.dosed("texmf-dist/web2c/updmap.cfg",
                    "^(#!\s*)?(Map|MixedMap)",
                    deleteLine=True)
    pisitools.dosed("%s/usr/share/texmf-dist/web2c/fmtutil.cnf" %
                    get.installDIR(),
                    "aleph",
                    deleteLine=True)

    # install config files
    cfs = [
        "chktex/chktexrc", "web2c/mktex.cnf", "web2c/updmap.cfg",
        "web2c/fmtutil.cnf", "dvips/config/config.ps", "dvipdfmx/dvipdfmx.cfg",
        "tex/generic/config/language.dat", "tex/generic/config/language.def",
        "tex/generic/config/pdftexconfig.tex", "ttf2pk/ttf2pk.cfg", "xdvi/XDvi"
    ]
    for cf in cfs:
        d = "/".join(cf.split("/")[:-1])
        p = cf if shelltools.isFile(cf) else "texmf-dist/%s" % cf
        pisitools.insinto("/etc/texmf/%s" % d, p)
    #pisitools.dosym("/etc/texmf/web2c/texmf.cnf", "/usr/share/texmf-dist/web2c/texmf.cnf")

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

    # create symlinks
    pisitools.dodir("/usr/bin")
    #shelltools.system("texmf-dist/scripts/texlive/texlinks.sh -f %s/usr/share/texmf-dist/web2c/fmtutil.cnf %s/usr/bin" % ((get.installDIR(), ) * 2))

    # remove upstream updmap.cfg: it contains too many maps
    pisitools.remove("/usr/share/texmf-dist/web2c/updmap.cfg")

    # manpages already in texlive-bin
    pisitools.removeDir("/usr/share/texmf-dist/doc/man")

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

    # 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")
Example #51
0
def install():
    # Build dummy PDFs to break fop dependency
    shelltools.system("./genpdf")

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

    # Cleanup package
    pisitools.remove("/usr/lib/erlang/Install")

    # Remove win32 stuff, old txt files, object files, etc.
    for f in (
            "lib/observer-*/priv/bin/*.bat",
            "lib/os_mon-*/ebin/nteventlog.beam",
            "lib/ssl-*/examples/certs/etc/otpCA/*.txt.old",
            "lib/webtool-*/priv/bin/start_webtool.bat",
            "lib/*-*/info",
            "erts-*/info",
            "man/man3/erl_set_memory_block.*",
            "man/man3/nteventlog.*",
            "man/man3/win32reg.*",
            "man/man1/erlsrv.*",
            "man/man1/werl.*",
            "PR.template",
    ):
        pisitools.remove("/usr/lib/erlang/%s" % f)

    # Move README and COPYRIGHT
    pisitools.domove("/usr/lib/erlang/README",
                     "/usr/share/doc/%s" % get.srcNAME())
    pisitools.domove("/usr/lib/erlang/COPYRIGHT",
                     "/usr/share/doc/%s" % get.srcNAME())

    for d in ("lib/*/priv/obj", "lib/*/c_src", "lib/*/java_src",
              "erts-5.7.5/doc", "erts-5.7.5/man", "misc"):
        pisitools.removeDir("/usr/lib/erlang/%s" % d)

    # Relocate doc files
    pisitools.domove("/usr/lib/erlang/doc/*",
                     "/usr/share/doc/%s" % get.srcNAME())
    pisitools.removeDir("/usr/lib/erlang/doc")

    for module in shelltools.ls("%s/usr/lib/erlang/erts-*/doc" %
                                get.installDIR()):
        pisitools.domove(
            os.path.join(module.split(get.installDIR())[-1], "*"),
            "/usr/share/doc/%s/%s" % (get.srcNAME(), module.split("/")[-2]))

    for lib in shelltools.ls("%s/usr/lib/erlang/lib/*/doc" % get.installDIR()):
        path = os.path.join(lib.split(get.installDIR())[-1])
        pisitools.domove(
            "%s/*" % path,
            "/usr/share/doc/%s/%s" % (get.srcNAME(), lib.split("/")[-2]))
        if len(shelltools.ls(path)) == 0:
            pisitools.removeDir(path)

    # Remove dummy installed pdf files
    shelltools.system("./genpdf clean %s/usr/share/doc/%s" %
                      (get.installDIR(), get.srcNAME()))

    pisitools.dodoc("EPLICENCE", "AUTHORS")
Example #52
0
def install():
    for package in shelltools.ls("."):
        shelltools.cd(package)
        autotools.rawInstall("DESTDIR=%s" % get.installDIR())
        shelltools.cd("../")
Example #53
0
def setup():
    for package in shelltools.ls("*-*"):
        shelltools.cd(package)
        autotools.configure("--with-fontrootdir=/usr/share/fonts")
        shelltools.cd("../")
Example #54
0
def setup():
    #fix error "Only <glib.h> can be included directly."
    for f in shelltools.ls("src/*"):
        pisitools.dosed(f, "(#include\s<glib)\/[^\.]+(\.h>)", r"\1\2")
    autotools.configure()
Example #55
0
def install():
    for f in shelltools.ls("./"):
        if f not in DoNotAdd:
            pisitools.insinto(vimdir, f)
Example #56
0
def install():
    shelltools.cd("source/")
    autotools.rawInstall("DESTDIR=%s" % get.installDIR(), "install-everything")

    # remove invalid symlink
    pisitools.remove("/sbin/mount.smbfs")

    # make install puts some libraries in the wrong place
    libs = [
        "smbclient", "smbsharemodes", "netapi", "talloc", "tdb", "wbclient"
    ]
    files = [f for f in shelltools.ls("%s/usr/lib/samba" % get.installDIR()) \
             if f.startswith(tuple(["lib"+l for l in libs]))]

    for f in files:
        pisitools.domove("/usr/lib/samba/%s" % f, "/usr/lib/")

    pisitools.insinto("/usr/lib/pkgconfig", "pkgconfig/*pc")
    pisitools.insinto("/usr/lib/pkgconfig", "lib/talloc/talloc.pc")
    pisitools.insinto("/usr/lib/pkgconfig", "lib/tdb/tdb.pc")

    # we have all mount.* helpers in /usr/bin
    pisitools.domove("/usr/sbin/mount.cifs", "/usr/bin/")
    pisitools.domove("/usr/sbin/umount.cifs", "/usr/bin/")

    # Nsswitch extensions. Make link for wins and winbind resolvers
    pisitools.dolib_so("nsswitch/libnss_wins.so")
    pisitools.dosym("libnss_wins.so", "/usr/lib/libnss_wins.so.2")
    pisitools.dolib_so("/nsswitch/libnss_winbind.so")
    pisitools.dosym("libnss_winbind.so", "/usr/lib/libnss_winbind.so.2")

    # pam extensions
    pisitools.doexe("bin/pam_smbpass.so", "/lib/security")
    pisitools.doexe("bin/pam_winbind.so", "/lib/security")

    pisitools.dodir("/sbin")
    pisitools.dosym("/usr/bin/mount.cifs", "/sbin/mount.cifs")

    # cups support
    pisitools.dodir("/usr/lib/cups/backend")
    pisitools.dosym("/usr/bin/smbspool", "/usr/lib/cups/backend/smb")

    # directory things
    pisitools.dodir("/var/spool/samba")
    pisitools.chmod("%s/var/spool/samba" % get.installDIR(), 01777)

    pisitools.dodir("/var/log/samba")
    pisitools.dodir("/var/run/samba")
    pisitools.dodir("/var/run/winbindd")
    pisitools.dodir("/var/cache/samba")

    pisitools.dodir("/var/lib/samba/private")
    pisitools.dodir("/var/lib/samba/winbindd_privileged")
    pisitools.dodir("/var/lib/samba/netlogon")
    pisitools.dodir("/var/lib/samba/profiles")
    pisitools.dodir("/var/lib/samba/printers/W32X86")
    pisitools.dodir("/var/lib/samba/printers/WIN40")
    pisitools.dodir("/var/lib/samba/printers/W32ALPHA")
    pisitools.dodir("/var/lib/samba/printers/W32MIPS")
    pisitools.dodir("/var/lib/samba/printers/W32PPC")

    pisitools.dodir("/usr/lib/samba/auth")
    pisitools.dodir("/usr/lib/samba/idmap")

    # No swat
    pisitools.removeDir("/usr/share/samba/swat/")

    # install python modules
    shelltools.system("python python/setup.py install --root=%s" %
                      get.installDIR())
    pythonmodules.fixCompiledPy()
Example #57
0
def install():
    # prepare and install installed packs list
    ##    pisitools.dodir("/var/lib/texmf/pisilinux/installedpacks")
    pisitools.dosed("CONTENTS", "^#", deleteLine=True)
    pisitools.insinto("/var/lib/texmf/pisilinux/installedpkgs", "CONTENTS",
                      "%s_%s.list" % (get.srcNAME(), revnr))

    for i in shelltools.ls("texmf-dist"):
        shelltools.copytree("texmf-dist/%s/" % i,
                            "%s/usr/share/texmf-dist/" % get.installDIR())
    shelltools.system(
        "find texmf-dist -type f -executable -exec chmod 755 %s/usr/share/{} \;"
        % get.installDIR())

    for i in ["tlpkg"]:
        shelltools.copytree("%s/" % i, "%s/usr/share/" % get.installDIR())

    for i in [
            "bibtex", "dvips", "fonts", "makeindex", "metafont", "metapost",
            "mft", "scripts", "tlpkg", "tex"
    ]:
        shelltools.system(
            "find %s -type d -exec install -d -m755 %s/usr/share/texmf-dist/'{}' \;"
            % (i, get.installDIR()))
        shelltools.system(
            "find %s -type f -exec install -m644 '{}' %s/usr/share/texmf-dist/'{}' \;"
            % (i, get.installDIR()))

    # clean config files
    pisitools.dosed("tex/generic/config",
                    "DO NOT EDIT",
                    deleteLine=True,
                    filePattern="language\.d..$")
    pisitools.dosed("texmf-dist/web2c/updmap.cfg",
                    "^(#!\s*)?(Map|MixedMap)",
                    deleteLine=True)
    ##    pisitools.dosed("%s/usr/share/texmf-dist/fmtutil.cnf" % get.installDIR(), "aleph", deleteLine=True)

    # install config files
    cfs = [
        "chktex/chktexrc", "web2c/mktex.cnf", "web2c/updmap.cfg",
        "web2c/fmtutil.cnf", "dvips/config/config.ps", "dvipdfmx/dvipdfmx.cfg",
        "tex/generic/config/language.dat", "tex/generic/config/language.def",
        "tex/generic/tex-ini-files/pdftexconfig.tex", "ttf2pk/ttf2pk.cfg",
        "xdvi/XDvi"
    ]
    for cf in cfs:
        d = "/".join(cf.split("/")[:-1])
        p = cf if shelltools.isFile(cf) else "texmf-dist/%s" % cf
        pisitools.insinto("/etc/texmf/%s" % d, p)
    #pisitools.dosym("/etc/texmf/web2c/texmf.cnf", "/usr/share/texmf-dist/web2c/texmf.cnf")

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

    # create symlinks
    pisitools.dodir("/usr/bin")
    #shelltools.system("texmf-dist/scripts/texlive/texlinks.sh -f %s/usr/share/texmf-dist/web2c/fmtutil.cnf %s/usr/bin" % ((get.installDIR(), ) * 2))

    # remove upstream updmap.cfg: it contains too many maps
    ##    pisitools.remove("/usr/share/texmf-dist/updmap.cfg")

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

    # 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
                    attachfile2/pdfatfi.pl
                    bundledoc/arlatex
                    bundledoc/bundledoc
                    checkcites/checkcites.lua
                    checklistings/checklistings.sh
                    chklref/chklref.pl
                    chktex/chkweb.sh
                    chktex/deweb.pl
                    cjk-gs-integrate/cjk-gs-integrate.pl
                    clojure-pamphlet/pamphletangler
                    cluttex/cluttex.lua
                    context/perl/mptopdf.pl
                    context/stubs/unix/context
                    context/stubs/unix/contextjit
                    context/stubs/unix/luatools
                    context/stubs/unix/mtxrun
                    context/stubs/unix/mtxrunjit
                    context/stubs/unix/texexec
                    context/stubs/unix/texmfstart
                    ctan-o-mat/ctan-o-mat.pl
                    ctanbib/ctanbib
                    ctanify/ctanify
                    ctanupload/ctanupload.pl
                    de-macro/de-macro
                    dosepsbin/dosepsbin.pl
                    dtxgen/dtxgen
                    dviasm/dviasm.py
                    dviinfox/dviinfox.pl
                    epstopdf/epstopdf.pl
                    findhyph/findhyph
                    fontools/afm2afm
                    fontools/autoinst
                    fontools/ot2kpx
                    fragmaster/fragmaster.pl
                    installfont/installfont-tl
                    jfmutil/jfmutil.pl
                    ketcindy/ketcindy.sh
                    latex-git-log/latex-git-log
                    latex-papersize/latex-papersize.py
                    latex2man/latex2man
                    latex2nemeth/latex2nemeth
                    latexdiff/latexdiff-vc.pl
                    latexdiff/latexdiff.pl
                    latexdiff/latexrevise.pl
                    latexfileversion/latexfileversion
                    latexindent/latexindent.pl
                    latexmk/latexmk.pl
                    latexpand/latexpand
                    ltxfileinfo/ltxfileinfo
                    ltximg/ltximg.pl
                    luaotfload/luaotfload-tool.lua
                    lwarp/lwarpmk.lua
                    make4ht/make4ht
                    match_parens/match_parens
                    mf2pt1/mf2pt1.pl
                    mkjobtexmf/mkjobtexmf.pl
                    pdfbook2/pdfbook2
                    pdfcrop/pdfcrop.pl
                    pdfjam/pdfjam
                    pdflatexpicscale/pdflatexpicscale.pl
                    pdftex-quiet/pdftex-quiet
                    pdfxup/pdfxup
                    pfarrei/a5toa4.tlu
                    pfarrei/pfarrei.tlu
                    pkfix-helper/pkfix-helper
                    pkfix/pkfix.pl
                    ps2eps/ps2eps.pl
                    purifyeps/purifyeps
                    pythontex/depythontex.py
                    pythontex/pythontex.py
                    simpdftex/simpdftex
                    srcredact/srcredact.pl
                    sty2dtx/sty2dtx.pl
                    tex4ebook/tex4ebook
                    tex4ht/ht.sh
                    tex4ht/htcontext.sh
                    tex4ht/htlatex.sh
                    tex4ht/htmex.sh
                    tex4ht/httex.sh
                    tex4ht/httexi.sh
                    tex4ht/htxelatex.sh
                    tex4ht/htxetex.sh
                    tex4ht/mk4ht.pl
                    tex4ht/xhlatex.sh
                    texcount/texcount.pl
                    texdef/texdef.pl
                    texdiff/texdiff
                    texdirflatten/texdirflatten
                    texdoc/texdoc.tlu
                    texdoctk/texdoctk.pl
                    texfot/texfot.pl
                    texlive-extra/allcm.sh
                    texlive-extra/allneeded.sh
                    texlive-extra/dvi2fax.sh
                    texlive-extra/dvired.sh
                    texlive-extra/e2pall.pl
                    texlive-extra/fontinst.sh
                    texlive-extra/kpsetool.sh
                    texlive-extra/kpsewhere.sh
                    texlive-extra/ps2frag.sh
                    texlive-extra/pslatex.sh
                    texlive-extra/texconfig-dialog.sh
                    texlive-extra/texconfig-sys.sh
                    texlive-extra/texconfig.sh
                    texlive-extra/texlinks.sh
                    texlive/fmtutil-sys.sh
                    texlive/fmtutil-user.sh
                    texlive/fmtutil.pl
                    texlive/mktexlsr
                    texlive/mktexmf
                    texlive/mktexpk
                    texlive/mktextfm
                    texlive/rungs.tlu
                    texlive/updmap-sys.sh
                    texlive/updmap-user.sh
                    texlive/updmap.pl
                    texliveonfly/texliveonfly.py
                    texloganalyser/texloganalyser
                    texplate/texplate.sh
                    thumbpdf/thumbpdf.pl
                    typeoutfileinfo/typeoutfileinfo.sh
                    xindex/xindex.lua
                    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")

    # additional symlinks
    pisitools.dosym("allcm", "/usr/bin/allec")
    pisitools.dosym("cluttex", "/usr/bin/cllualatex")
    pisitools.dosym("cluttex", "/usr/bin/clxelatex")
    pisitools.dosym("epstopdf", "/usr/bin/repstopdf")
    pisitools.dosym("fmtutil", "/usr/bin/mktexfmt")
    pisitools.dosym("kpsetool", "/usr/bin/kpsepath")
    pisitools.dosym("kpsetool", "/usr/bin/kpsexpand")
    pisitools.dosym("luaotfload-tool", "/usr/bin/mkluatexfontdb")
    pisitools.dosym("mktexlsr", "/usr/bin/texhash")
    pisitools.dosym("pdfcrop", "/usr/bin/rpdfcrop")
    pisitools.dosym("texdef", "/usr/bin/latexdef")
Example #58
0
def install():
    # dkms packages
    with open("env.sh") as f:
        for l in f.readlines():
            if l.startswith("BUILD_PLATFORM_ARCH"):
                a = l.split("=")[1].strip()[1:-1]
                break

    pisitools.dosed("dkms.conf", "@VERSION@", get.srcVERSION())
    pisitools.dosed("dkms-guest.conf", "@VERSION@", get.srcVERSION())

    pisitools.insinto("/usr/src/%s-%s" % (get.srcNAME(), get.srcVERSION()),
                      "out/linux.%s/release/bin/src/*" % a)
    pisitools.insinto("/usr/src/%s-%s" % (get.srcNAME(), get.srcVERSION()),
                      "include")
    pisitools.insinto("/usr/src/%s-%s" % (get.srcNAME(), get.srcVERSION()),
                      "dkms.conf")

    pisitools.insinto(
        "/usr/src/%s-guest-%s" % (get.srcNAME(), get.srcVERSION()),
        "out/linux.%s/release/bin/additions/src/*" % a)
    pisitools.insinto(
        "/usr/src/%s-guest-%s" % (get.srcNAME(), get.srcVERSION()),
        "dkms-guest.conf", "dkms.conf")

    shelltools.system(
        "awk '$1 ~ /Version:/ { print gensub(/([0-9]+)\.([0-9]+).*/, \"\\\\1\\\\2\", \"g\", $2) }' /usr/lib/pkgconfig/xorg-server.pc > XorgVersion"
    )
    with open("XorgVersion", "r") as f:
        XorgVersion = f.readline().strip()
    pisitools.insinto("/etc/vbox", "vbox.cfg")
    shelltools.chmod("src/VBox/Additions/x11/Installer/98vboxadd-xclient",
                     0755)
    pisitools.insinto("/usr/bin",
                      "src/VBox/Additions/x11/Installer/98vboxadd-xclient",
                      "VBoxClient-all")
    #pisitools.insinto("/etc/xdg/autostart", "src/VBox/Additions/x11/Installer/vboxclient.desktop")
    #pisitools.insinto("/lib/udev/rules.d", "src/VBox/Additions/linux/installer/70-xorg-vboxmouse.rules")
    pisitools.insinto("/usr/share/X11/pci",
                      "src/VBox/Additions/x11/Installer/vboxvideo.ids")
    #pisitools.insinto("/usr/share/X11/xorg.conf.d", "src/VBox/Additions/x11/Installer/50-vboxmouse.conf")

    arch = "amd64" if get.ARCH() == "x86_64" else "x86"
    shelltools.cd("out/linux.%s/release/bin" % arch)

    # libraries installation. The files below are unnecessary files.
    # TODO: change loop and make it more discrete (i.e copying each single file)
    exclude = ("additions", "icons", "nls", "scm", "sdk", "src", "SUP",
               "vboxkeyboard", "VBox.sh", "VBoxSysInfo.sh",
               "VBoxCreateUSBNode.sh", "VBoxTunctl", "testcase", "tst",
               "xpidl")

    for _file in shelltools.ls("."):
        if _file.startswith(exclude):
            continue

        print "Installing %s ..." % _file
        pisitools.insinto(VBoxLibDir, _file)

    pisitools.dobin("VBox*.sh", VBoxDataDir)
    pisitools.insinto(VBoxDataDir, "nls")

    # TODO: Add vboxwebsrv when ready
    # Binaries and Wrapper with Launchers
    apps = ("VBoxHeadless", "VBoxManage", "VBoxSDL", "VBoxVRDP", "VirtualBox",
            "VBoxBalloonCtrl")
    for link in apps:
        pisitools.dosym("../share/virtualbox/VBox.sh", "/usr/bin/%s" % link)

    pisitools.dobin("VBoxTunctl")

    # Desktop file, mimetype file for xml and icon
    pisitools.domove("%s/*.desktop" % VBoxLibDir, "/usr/share/applications")
    pisitools.domove("%s/*.png" % VBoxLibDir, "/usr/share/pixmaps")
    pisitools.domove("%s/*.xml" % VBoxLibDir, "/usr/share/mime/packages")

    # Mimetypes icons
    for size in ["16", "20", "24", "32", "48", "64", "72", "96", "128", "256"]:
        pisitools.insinto(
            "/usr/share/icons/hicolor/%sx%s/mimetypes" % (size, size),
            "icons/%sx%s/*.png" % (size, size))

    # Guest additions
    pisitools.dobin("additions/VBoxClient")
    pisitools.dobin("additions/VBoxControl")

    pisitools.dobin("additions/VBoxDRMClient")

    pisitools.dosbin("additions/VBoxService")
    pisitools.dosbin("additions/mount.vboxsf", "/sbin")

    pisitools.insinto("/lib/security", "additions/pam_vbox.so")

    #pisitools.dolib("additions/VBoxOGL*")
    #pisitools.dosym("../../../VBoxOGL.so", "/usr/lib/xorg/modules/dri/vboxvideo_dri.so")

    #pisitools.insinto("/usr/lib/xorg/modules/drivers", "additions/vboxvideo_drv_system.so", "vboxvideo.so")
    #pisitools.insinto("/usr/lib/xorg/modules/input",   "additions/vboxmouse_drv_%s.so" % XorgVersion, "vboxmouse_drv.so")

    # Python bindings
    pisitools.insinto("%s/sdk/bindings/xpcom" % VBoxLibDir,
                      "sdk/bindings/xpcom/python")

    shelltools.cd("sdk/installer")
    shelltools.copy("vboxapisetup.py", "setup.py")
    shelltools.export("VBOX_INSTALL_PATH", VBoxLibDir)
    pythonmodules.install()

    shelltools.cd("../..")
    mvb_name = "module-virtualbox-%s" % get.srcVERSION()
    mvbg_name = "module-virtualbox-guest-%s" % get.srcVERSION()

    shelltools.copy("src", "%s/%s" % (get.workDIR(), mvb_name))
    shelltools.copy("additions/src", "%s/%s" % (get.workDIR(), mvbg_name))
    shelltools.cd(get.workDIR())
    shelltools.system("tar c %s | xz -9 > %s.tar.xz" % ((mvb_name, ) * 2))
    shelltools.unlinkDir(mvb_name)
    shelltools.system("tar c %s | xz -9 > %s.tar.xz" % ((mvbg_name, ) * 2))
    shelltools.unlinkDir(mvbg_name)
Example #59
0
def install():
    jvmdir="/usr/lib/jvm/java-7-openjdk"

    pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "HACKING", "README", "NEWS")

    #cd main output directory
    shelltools.cd("openjdk.build")

    #---- install openjdk7-doc
    pisitools.insinto("/usr/share/doc/openjdk7-doc", "docs/*")

    #install openjdk7-src
    pisitools.insinto(jvmdir, "j2sdk-image/src.zip") 

    #---- instal jdk7-openjdk
    for d in ["include","lib","bin"]:
        pisitools.insinto(jvmdir, "j2sdk-image/%s" % d) 

    for f in shelltools.ls("%s/usr/lib/jvm/java-7-openjdk/bin/" % get.installDIR()):
        if not f in ["java", "java-rmi.cgi", "keytool", "orbd",
                     "pack200", "policytool", "rmid", "rmiregistry",
                     "servertool", "tnameserv", "unpack200"]:
            pisitools.dosym("/usr/lib/jvm/java-7-openjdk/bin/%s" % f, "/usr/bin/%s" % f)

    #install man pages
    pisitools.doman("j2sdk-image/man/man1/*")
    pisitools.insinto("/usr/share/man/ja/man1", "j2sdk-image/man/ja_JP.UTF-8/man1/*.1")
    pisitools.insinto("/usr/share/applications", "../jconsole.desktop")
    shelltools.system("chmod go+r %s%s/lib/sa-jdi.jar" %(get.installDIR(), jvmdir))

    #---- instal jre7-openjdk
    pisitools.insinto("%s/jre/bin" % jvmdir , "j2sdk-image/jre/bin/*")
    #pisitools.insinto("%s/jre/lib/amd64" % jvmdir , "j2sdk-image/jre/lib/amd64/xawt")
    for binfile in shelltools.ls("j2sdk-image/jre/bin"):
        pisitools.dosym("%s/jre/bin/%s" % (jvmdir, binfile), "/usr/bin/%s" % binfile)

    pisitools.insinto("/usr/share/applications", "../policytool.desktop")

    for size in [16, 24, 32, 48]:
        fullsize = "%dx%d" % ((size, ) * 2)
        pisitools.insinto("/usr/share/icons/hicolor/%s/apps/" % fullsize, "../openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon%d.png" % size, "java.png")

    #---- install jre7-openjdk-headless
    pisitools.insinto("%s/jre/" % jvmdir , "j2sdk-image/jre/lib")
    pisitools.insinto("%s/jre/bin" % jvmdir, "j2sdk-image/jre/bin/*")

    pisitools.rename("%s/jre/lib/fontconfig.Ubuntu.properties.src" % jvmdir , "fontconfig.properties")
    pisitools.rename("%s/jre/lib/fontconfig.Ubuntu.bfc" % jvmdir , "fontconfig.bfc")
    pisitools.remove("%s/jre/lib/fontconfig.*.bfc" % jvmdir)
    pisitools.remove("%s/jre/lib/fontconfig.*.properties.src" % jvmdir)

    pisitools.domove("%s/jre/lib/*.properties*" % jvmdir,"/etc/java-7-openjdk/")

    for propfile in shelltools.ls("%s/etc/java-7-openjdk/" % get.installDIR()):
        pisitools.dosym("/etc/java-7-openjdk/%s" % propfile, "%s/jre/lib/%s" % (jvmdir, propfile))

    pisitools.domove("%s/jre/lib/images/cursors/cursors.properties" % jvmdir,"/etc/java-7-openjdk/cursors/")
    pisitools.dosym("/etc/java-7-openjdk/cursors/cursors.properties", "%s/jre/lib/images/cursors/cursors.properties" % jvmdir)

    pisitools.rename("%s/jre/lib/management/jmxremote.password.template" % jvmdir , "jmxremote.password")
    pisitools.rename("%s/jre/lib/management/snmp.acl.template" % jvmdir , "snmp.acl")

    for f in ["management.properties", "jmxremote.access", "jmxremote.password", "snmp.acl"]:
        pisitools.domove("%s/jre/lib/management/%s" % (jvmdir, f),"/etc/java-7-openjdk/management/")
        pisitools.dosym("/etc/java-7-openjdk/management/%s" % f, "%s/jre/lib/management/%s" % (jvmdir, f))

    for f in ["java.policy","java.security","nss.cfg"]:
        pisitools.domove("%s/jre/lib/security/%s" % (jvmdir, f),"/etc/java-7-openjdk/security/")
        pisitools.dosym("/etc/java-7-openjdk/security/%s" % f, "%s/jre/lib/security/%s" % (jvmdir, f))

    #confs=os.listdir("%s/etc/java-7-openjdk/" % get.installDIR())
    #for i in confs:
        #shelltools.system("chmod 0644 %s/etc/java-7-openjdk/%s" % (get.installDIR, i))

    pisitools.domove("%s/jre/lib/fontconfig.bfc" % jvmdir,"/etc/java-7-openjdk/")
    pisitools.domove("%s/jre/lib/amd64/jvm.cfg" % jvmdir,"/etc/java-7-openjdk/")
    pisitools.dosym("/etc/java-7-openjdk/jvm.cfg" , "%s/jre/lib/amd64/jvm.cfg" % jvmdir)

    for license in ["LICENSE", "THIRD_PARTY_README", "ASSEMBLY_EXCEPTION"]:
        pisitools.insinto("/usr/share/doc/jre7-openjdk-headless", "j2re-image/%s" % license)
      
    pisitools.remove("%s/jre/lib/security/cacerts" % jvmdir)
    
    #seems we need to add this symlink into ca-certificates-java package ?
    pisitools.dosym("/etc/ssl/certs/java/cacerts", "%s/jre/lib/security/cacerts" % jvmdir)