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")
def install(): # Get plugins list plugins = shelltools.ls(".") # Install the firmware files for pl in plugins: files = shelltools.ls("%s/usr/share/iscan" % pl) if len(files) > 0: pisitools.insinto("/usr/share/iscan", "%s/usr/share/iscan/%s" % (pl, files[0])) # Install the libraries libs = [ f.rpartition(get.curDIR() + '/')[-1] for f in glob.glob("%s/*/usr/lib/iscan/*" % get.curDIR()) if not shelltools.isLink(f) ] for l in libs: pisitools.dolib_so(l, "/usr/lib/iscan") pisitools.dosym(shelltools.baseName(l), "/%s" % l.split("/", 1)[1].split(".")[0] + '.so') pisitools.dosym(shelltools.baseName(l), "/%s" % l.split("/", 1)[1].split(".")[0] + '.so.2') # Dodoc one of the plugins doc files, it's all same. for d in shelltools.ls( "iscan-plugin-gt-f520/usr/share/doc/iscan-plugin-gt-f520-1.0.0"): pisitools.dodoc( "iscan-plugin-gt-f520/usr/share/doc/iscan-plugin-gt-f520-1.0.0/%s" % d)
def install(): shelltools.cd("../build") autotools.rawInstall("DESTDIR=%s" % get.installDIR()) #autotools.install() for header in ["limits.h", "syslimits.h"]: pisitools.insinto( "/usr/lib/gcc/%s/%s/include" % (get.HOST(), verMajor), "gcc/include-fixed/%s" % header) # Not needed pisitools.removeDir("/usr/lib/gcc/*/*/include-fixed") pisitools.removeDir("/usr/lib/gcc/*/*/install-tools") # This one comes with binutils #pisitools.remove("/usr/lib*/libiberty.a") # cc symlink pisitools.dosym("/usr/bin/gcc", "/usr/bin/cc") # /lib/cpp symlink for legacy X11 stuff pisitools.dosym("/usr/bin/cpp", "/lib/cpp") # autoload gdb pretty printers gdbpy_dir = "/usr/share/gdb/auto-load/usr/lib/" pisitools.dodir(gdbpy_dir) gdbpy_files = shelltools.ls("%s/usr/lib/libstdc++*gdb.py*" % get.installDIR()) for i in gdbpy_files: pisitools.domove("/usr/lib/%s" % shelltools.baseName(i), gdbpy_dir)
def install(): autotools.install() for lang in shelltools.ls("debian/po/*.po"): pisitools.domo(lang, shelltools.baseName(lang).replace(".po", ""), "libpaper.mo") pisitools.dodoc("README", "ChangeLog")
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")
def install(): autotools.rawInstall("DESTDIR=%s install-lib" % get.installDIR()) autotools.rawInstall("DESTDIR=%s install-snmp" % get.installDIR()) autotools.rawInstall("DESTDIR=%s install-usb" % get.installDIR()) autotools.rawInstall("DESTDIR=%s install-cgi" % get.installDIR()) autotools.rawInstall("DESTDIR=%s install-cgi-conf" % get.installDIR()) # 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")
def install(): shelltools.cd("build-shared") autotools.make("libdb=libdb-3.2.a libcxx=libcxx_3.2.a prefix=%s/usr libdir=%s/usr/lib install" % (get.installDIR(), get.installDIR())) shelltools.cd("../build-static") # slot libraries pisitools.dolib_a("libdb.a") pisitools.rename("/usr/lib/libdb.a", "libdb-3.2.a") pisitools.dolib_a("libdb_cxx.a") pisitools.rename("/usr/lib/libdb_cxx.a", "libdb_cxx-3.2.a") # create needed symlink pisitools.remove("/usr/lib/libdb.so") pisitools.remove("/usr/lib/libdb_cxx.so") pisitools.dosym("/usr/lib/libdb-3.2.so", "/usr/lib/libdb.so.3") # slot all program names to avoid overwriting for file in shelltools.ls("%s/usr/bin/db_*" % get.installDIR()): sourceFile = file.replace(get.installDIR(), "") destinationFile = shelltools.baseName(file.replace("_", "3.2_")) destinationDirectory = shelltools.dirName(sourceFile) pisitools.domove(sourceFile, destinationDirectory, destinationFile) # remove unneeded docs pisitools.removeDir("/usr/docs") # slot headers pisitools.dodir("/usr/include/db3/") pisitools.domove("/usr/include/*.h", "/usr/include/db3/") shelltools.cd("../") pisitools.dodoc("README", "LICENSE")
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) if get.buildTYPE() == "emul32": libbasedir = "lib32" else: 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) if get.buildTYPE() == "emul32": pisitools.removeDir("/emul32") return # 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")
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) # Move pam module to /lib pisitools.domove("/usr/lib/security/pam_pkcs11.so", "/lib") # Remove *.a files and empty security directory. # We can't use --disable-static because of the broken build system shelltools.system("rm -rf %s/usr/lib/%s/*.{a,la}" % (get.installDIR(), get.srcNAME())) pisitools.removeDir("/usr/lib/security") # Create necessary directories pisitools.dodir("/etc/pam_pkcs11/cacerts") pisitools.dodir("/etc/pam_pkcs11/crls") # Install conf files for f in shelltools.ls("%s/usr/share/%s/*conf*" % (get.installDIR(), get.srcNAME())): pisitools.insinto("/etc/pam_pkcs11", f, shelltools.baseName(f).rstrip(".example")) pisitools.doman("doc/*.[18]") pisitools.dodoc("NEWS", "README", "doc/README*") pisitools.dohtml("doc/api/*.html")
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")
def install(): shelltools.cd("build") autotools.rawInstall("DESTDIR=%s" % get.installDIR()) for header in ["limits.h", "syslimits.h"]: pisitools.insinto( "/usr/lib/gcc/%s/%s/include" % (get.HOST(), verMajor), "gcc/include-fixed/%s" % header) # Not needed pisitools.removeDir("/usr/lib/gcc/*/*/include-fixed") pisitools.removeDir("/usr/lib/gcc/*/*/install-tools") # cc symlink pisitools.dosym("/usr/bin/gcc", "/usr/bin/cc") # /lib/cpp symlink for legacy X11 stuff pisitools.dosym("/usr/bin/cpp", "/lib/cpp") # Remove our options section from crt stuff """ removePardusSection("%s/usr/lib/" % get.installDIR()) if get.ARCH() == "x86_64": removePardusSection("%s/usr/lib32/" % get.installDIR()) """ # autoload gdb pretty printers gdbpy_dir = "/usr/share/gdb/auto-load/usr/lib/" pisitools.dodir(gdbpy_dir) gdbpy_files = shelltools.ls("%s/usr/lib/libstdc++*gdb.py*" % get.installDIR()) for i in gdbpy_files: pisitools.domove("/usr/lib/%s" % shelltools.baseName(i), gdbpy_dir)
def install(): shelltools.cd("build") autotools.rawInstall("DESTDIR=%s" % get.installDIR()) for header in ["limits.h","syslimits.h"]: pisitools.insinto("/usr/lib/gcc/%s/%s/include" % (get.HOST(), verMajor) , "gcc/include-fixed/%s" % header) # Not needed pisitools.removeDir("/usr/lib/gcc/*/*/include-fixed") pisitools.removeDir("/usr/lib/gcc/*/*/install-tools") # cc symlink pisitools.dosym("/usr/bin/gcc" , "/usr/bin/cc") # /lib/cpp symlink for legacy X11 stuff pisitools.dosym("/usr/bin/cpp", "/lib/cpp") # Remove our options section from crt stuff """ removePardusSection("%s/usr/lib/" % get.installDIR()) if get.ARCH() == "x86_64": removePardusSection("%s/usr/lib32/" % get.installDIR()) """ # autoload gdb pretty printers gdbpy_dir = "/usr/share/gdb/auto-load/usr/lib/" pisitools.dodir(gdbpy_dir) gdbpy_files = shelltools.ls("%s/usr/lib/libstdc++*gdb.py*" % get.installDIR()) for i in gdbpy_files: pisitools.domove("/usr/lib/%s" % shelltools.baseName(i), gdbpy_dir)
def install(): shelltools.cd("%s/build" % get.workDIR()) conf = "DESTDIR=%s \ prefix=%s \ bindir=%s \ includedir=%s/include \ datadir=%s \ mandir=%s/man \ infodir=%s/info \ LIBPATH=%s \ ${GCC_INSTALL_TARGET}" % (get.installDIR(), PREFIX, BINPATH, LIBPATH, DATAPATH, DATAPATH, DATAPATH, LIBPATH) autotools.make(conf) for file in shelltools.ls("%s/build/gcc/include/*" % get.workDIR()): if shelltools.isLink(file): shelltools.unlink(file) autotools.rawInstall("DESTDIR=%s" % get.installDIR()) # This one comes with binutils pisitools.remove("/usr/lib/libiberty.a") for file in ("%s/libstdc++.la" % LIBPATH, "%s/libsupc++.la" % LIBPATH): pisitools.dosed("%s%s" % (get.installDIR(),file), "^libdir.*", "libdir=%s" % shelltools.baseName(file)) # Move Java headers to compiler-specific dir pisitools.domove("/usr/lib/security", LIBPATH) pisitools.domove("/usr/lib/lib*", LIBPATH) # Move <cxxabi.h> to compiler-specific directories pisitools.move("%s/cxxabi.h" % STDCXX_INCDIR, "%s/include/" % LIBPATH) # These should be symlinks for binary in ("gcc", "g++", "c++"): pisitools.remove("%s/%s" % (BINPATH, binary)) pisitools.dosym("%s-%s" % (get.HOST(), binary), "%s/%s" % (BINPATH, binary)) # /usr/bin symlinks pisitools.dosym("%s/%s" % (BINPATH, binary), "/usr/bin/%s" % binary) # /usr/bin symlinks pisitools.dosym("%s/gcc" % BINPATH, "/usr/bin/cc") pisitools.dosym("%s/cpp" % BINPATH, "/usr/bin/cpp") # i686-... symlinks pisitools.dosym("%s/gcc" % BINPATH, "/usr/bin/%s-gcc" % get.HOST()) pisitools.dosym("%s/g++" % BINPATH, "/usr/bin/%s-g++" % get.HOST()) pisitools.dosym("%s/c++" % BINPATH, "/usr/bin/%s-c++" % get.HOST()) pisitools.dosym("%s/g77" % BINPATH, "/usr/bin/%s-g77" % get.HOST()) # For some reason, g77 and gcjh gets made instead of ${CTARGET}-g77... this makes it safe pisitools.domove("%s/g77" % BINPATH, "%s/" % BINPATH ,"%s-g77" % get.HOST()) pisitools.dosym("%s-g77" % get.HOST(), "%s/g77" % BINPATH) # Fix libstdc++ path pisitools.dosed("%s/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/libstdc++.la" % get.installDIR(), "libdir=libstdc\\+\\+.la", "libdir='/usr/lib/gcc/i686-pc-linux-gnu/3.4.5'")
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")
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")
def install(): pisitools.dodir("/usr/lib/win32") pisitools.insinto("/usr/lib/win32", "*") shelltools.chmod("%s/usr/lib/win32/*" % get.installDIR(), mode = 0644) # Real audio / video pisitools.dodir("/usr/lib/real") pisitools.domove("/usr/lib/win32/*.so.6.0", "/usr/lib/real/") for file in shelltools.ls("%s/usr/lib/real/*.so.6.0" % get.installDIR()): pisitools.dosym(file.replace(get.installDIR(), ""), "/usr/lib/win32/%s" % shelltools.baseName(file)) pisitools.dodoc("README")
def install(): pisitools.dodir("/usr/lib/win32") pisitools.insinto("/usr/lib/win32", "*") shelltools.chmod("%s/usr/lib/win32/*" % get.installDIR(), mode=0644) # Real audio / video pisitools.dodir("/usr/lib/real") pisitools.domove("/usr/lib/win32/*.so.6.0", "/usr/lib/real/") for file in shelltools.ls("%s/usr/lib/real/*.so.6.0" % get.installDIR()): pisitools.dosym(file.replace(get.installDIR(), ""), "/usr/lib/win32/%s" % shelltools.baseName(file)) pisitools.dodoc("README")
def install(): # Get plugins list plugins = shelltools.ls(".") # Install the firmware files for pl in plugins: files = shelltools.ls("%s/usr/share/iscan" % pl) if len(files) > 0: pisitools.insinto("/usr/share/iscan", "%s/usr/share/iscan/%s" % (pl, files[0])) # Install the libraries libs = [f.rpartition(get.curDIR()+'/')[-1] for f in glob.glob("%s/*/usr/lib/iscan/*" % get.curDIR()) if not shelltools.isLink(f)] for l in libs: pisitools.dolib_so(l, "/usr/lib/iscan") pisitools.dosym(shelltools.baseName(l), "/%s" % l.split("/", 1)[1].split(".")[0]+'.so') pisitools.dosym(shelltools.baseName(l), "/%s" % l.split("/", 1)[1].split(".")[0]+'.so.2') # Dodoc one of the plugins doc files, it's all same. for d in shelltools.ls("iscan-plugin-gt-f520/usr/share/doc/iscan-plugin-gt-f520-1.0.0"): pisitools.dodoc("iscan-plugin-gt-f520/usr/share/doc/iscan-plugin-gt-f520-1.0.0/%s" % d)
def install(): #shelltools.cd("../build") shelltools.cd("build") autotools.rawInstall("DESTDIR=%s" % get.installDIR()) #autotools.install() for header in ["limits.h", "syslimits.h"]: pisitools.insinto( "/usr/lib/gcc/%s/%s/include" % (get.HOST(), verMajor), "gcc/include-fixed/%s" % header) # Not needed pisitools.removeDir("/usr/lib/gcc/*/*/include-fixed") pisitools.removeDir("/usr/lib/gcc/*/*/install-tools") # This one comes with binutils #pisitools.remove("/usr/lib*/libiberty.a") # cc symlink pisitools.dosym("/usr/bin/gcc", "/usr/bin/cc") # /lib/cpp symlink for legacy X11 stuff pisitools.dosym("/usr/bin/cpp", "/lib/cpp") pisitools.dosym("/usr/bin/x86_64-pc-linux-gnu-gcc-ar", "/usr/bin/x86_64-pc-linux-gnu-ar") # Remove our options section from crt stuff removePisiLinuxSection("%s/usr/lib/" % get.installDIR()) if get.ARCH() == "x86_64": removePisiLinuxSection("%s/usr/lib32/" % get.installDIR()) # autoload gdb pretty printers gdbpy_dir = "/usr/share/gdb/auto-load/usr/lib/" pisitools.dodir(gdbpy_dir) gdbpy_files = shelltools.ls("%s/usr/lib/libstdc++*gdb.py*" % get.installDIR()) for i in gdbpy_files: pisitools.domove("/usr/lib/%s" % shelltools.baseName(i), gdbpy_dir) if arch == "x86-64": pisitools.remove("/usr/lib32/libstdc++*gdb.py*")
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) # Move pam module to /lib pisitools.domove("/usr/lib/security/pam_pkcs11.so", "/lib/security") # Create necessary directories pisitools.dodir("/etc/pam_pkcs11/cacerts") pisitools.dodir("/etc/pam_pkcs11/crls") # Create symlink to /etc/ssl/nssdb pisitools.dosym("/etc/ssl/nssdb", "/etc/pam_pkcs11/nssdb") # Install conf files for f in shelltools.ls("etc/*.conf.example"): pisitools.insinto("/etc/pam_pkcs11", f, shelltools.baseName(f).rstrip(".example")) pisitools.dodoc("NEWS", "README", "doc/README*") pisitools.doman("doc/*.[18]")
def install(): shelltools.cd("build_unix") autotools.install("libdir=\"%s/usr/lib\"" % get.installDIR()) # slot all program names to avoid overwriting for file in shelltools.ls("%s/usr/bin/db_*" % get.installDIR()): sourceFile = file.replace(get.installDIR(), "") destinationFile = shelltools.baseName(file.replace("_", "4.2_")) destinationDirectory = shelltools.dirName(sourceFile) pisitools.domove(sourceFile, destinationDirectory, destinationFile) # install all headers in a slotted location for file in shelltools.ls("%s/usr/include/" % get.installDIR()): pisitools.domove("/usr/include/%s" % file, "/usr/include/db4.2") pisitools.dosym("/usr/include/db4.2/db.h", "/usr/include/db.h") pisitools.dosym("/usr/include/db4.2/db_185.h", "/usr/include/db_185.h") # not everybody wants this wad of documentation as it is primarily API docs pisitools.domove("/usr/docs/", "/usr/share/doc/%s/html/" % get.srcTAG()) pisitools.domove("/usr/bin/berkeley_db_svc", "/usr/sbin/", "berkeley_db42_svc")
def install(): shelltools.cd("../build") autotools.rawInstall("DESTDIR=%s" % get.installDIR()) #autotools.install() for header in ["limits.h","syslimits.h"]: pisitools.insinto("/usr/lib/gcc/%s/%s/include" % (get.HOST(), verMajor) , "gcc/include-fixed/%s" % header) # Not needed pisitools.removeDir("/usr/lib/gcc/*/*/include-fixed") pisitools.removeDir("/usr/lib/gcc/*/*/install-tools") # This one comes with binutils #pisitools.remove("/usr/lib*/libiberty.a") # cc symlink pisitools.dosym("/usr/bin/gcc" , "/usr/bin/cc") # /lib/cpp symlink for legacy X11 stuff pisitools.dosym("/usr/bin/cpp", "/lib/cpp") pisitools.dosym("/usr/bin/x86_64-pc-linux-gnu-gcc-ar", "/usr/bin/x86_64-pc-linux-gnu-ar") # Remove our options section from crt stuff removePisiLinuxSection("%s/usr/lib/" % get.installDIR()) if get.ARCH() == "x86_64": removePisiLinuxSection("%s/usr/lib32/" % get.installDIR()) # autoload gdb pretty printers gdbpy_dir = "/usr/share/gdb/auto-load/usr/lib/" pisitools.dodir(gdbpy_dir) gdbpy_files = shelltools.ls("%s/usr/lib/libstdc++*gdb.py*" % get.installDIR()) for i in gdbpy_files: pisitools.domove("/usr/lib/%s" % shelltools.baseName(i), gdbpy_dir) if arch == "x86-64": pisitools.remove("/usr/lib32/libstdc++*gdb.py*")
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) # Move pam module to /lib pisitools.domove("/usr/lib/security/pam_pkcs11.so", "/lib") # Remove *.[l]a files and empty security directory shelltools.system("rm -rf %s/usr/lib/%s/*.{a,la}" % (get.installDIR(), get.srcNAME())) pisitools.removeDir("/usr/lib/security") # Create necessary directories pisitools.dodir("/etc/pam_pkcs11/cacerts") pisitools.dodir("/etc/pam_pkcs11/crls") # Install conf files for f in shelltools.ls("%s/usr/share/%s/*conf*" % (get.installDIR(), get.srcNAME())): pisitools.insinto("/etc/pam_pkcs11", f, shelltools.baseName(f).rstrip(".example")) pisitools.doman("doc/*.[18]") pisitools.dodoc("NEWS", "README", "doc/README*") pisitools.dohtml("doc/api/*.html")
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))
def testBaseName(self): from pisi.actionsapi.shelltools import baseName assert 'dependency.pdf' == baseName('doc/dependency.pdf') assert 'Arphic' == baseName('licenses/Arphic') assert not 'Atmel' == baseName('tools/atmel.py')
def install(): shelltools.cd("%s/texlive-core/" % get.workDIR()) pisitools.dodir("/usr/share") wanteddirs = [] for file_ in shelltools.ls(get.workDIR()): if shelltools.isDirectory(file_) and not "texmf" in file_: wanteddirs.append(file_) for folder in wanteddirs: pisitools.insinto("/usr/share/texmf-dist", folder) # fix sandbox violations #pisitools.dosed("texmf-dist/scripts/texlive/texlinks.sh", '"\$symlinkdir', r'"%s/$symlinkdir' % get.installDIR()) # Recursively copy on directory on top of another, overwrite duplicate files too if shelltools.can_access_directory("texmf-dist"): copy_tree("texmf-dist", "%s/usr/share/texmf-dist" % get.installDIR()) ## chmod of script files script_dir = get.installDIR() + "/usr/share/texmf-dist/scripts" if shelltools.can_access_directory(script_dir): for root, dirs, files in os.walk(script_dir): for name in files: shelltools.chmod(os.path.join(root, name), 0755) # copy TEXMFCONFIG tree pisitools.insinto("/etc/texmf/chktex/", "texmf-dist/chktex/chktexrc") pisitools.insinto("/etc/texmf/web2c/", "texmf-dist/web2c/mktex.cnf") pisitools.insinto("/etc/texmf/web2c/", "texmf-dist/web2c/updmap.cfg") pisitools.insinto("/etc/texmf/web2c/", "texmf-dist/web2c/fmtutil.cnf") pisitools.insinto("/etc/texmf/dvips/config/", "texmf-dist/dvips/config/config.ps") pisitools.insinto("/etc/texmf/dvipdfmx", "texmf-dist/dvipdfmx/dvipdfmx.cfg") pisitools.insinto("/etc/texmf/tex/generic/config/", "texmf-dist/tex/generic/config/pdftexconfig.tex") #pisitools.insinto("/etc/texmf/tex/generic/config/", "texmf-dist/tex/generic/config/language.dat") #pisitools.insinto("/etc/texmf/tex/generic/config/", "texmf-dist/tex/generic/config/language.def") pisitools.insinto("/etc/texmf/ttf2pk", "texmf-dist/ttf2pk/ttf2pk.cfg") pisitools.insinto("/etc/texmf/xdvi", "texmf-dist/xdvi/XDvi") # link programs from /usr/share/texmf-dist/scripts linked_scripts=""" a2ping/a2ping.pl accfonts/mkt1font accfonts/vpl2ovp accfonts/vpl2vpl adhocfilelist/adhocfilelist.sh arara/arara.sh bundledoc/arlatex bundledoc/bundledoc checkcites/checkcites.lua chktex/chkweb.sh chktex/deweb.pl context/perl/mptopdf.pl context/stubs/unix/context context/stubs/unix/ctxtools context/stubs/unix/luatools context/stubs/unix/mtxrun context/stubs/unix/pstopdf context/stubs/unix/texexec context/stubs/unix/texmfstart ctanify/ctanify ctanupload/ctanupload.pl de-macro/de-macro dosepsbin/dosepsbin.pl dtxgen/dtxgen dviasm/dviasm.py epstopdf/epstopdf.pl findhyph/findhyph fontools/afm2afm fontools/autoinst fontools/ot2kpx fragmaster/fragmaster.pl installfont/installfont-tl latex2man/latex2man latexdiff/latexdiff-vc.pl latexdiff/latexdiff.pl latexdiff/latexrevise.pl latexfileversion/latexfileversion latexmk/latexmk.pl latexpand/latexpand ltxfileinfo/ltxfileinfo lua2dox/lua2dox_filter luaotfload/luaotfload-tool.lua match_parens/match_parens mf2pt1/mf2pt1.pl mkjobtexmf/mkjobtexmf.pl oberdiek/pdfatfi.pl pdfcrop/pdfcrop.pl pdfjam/pdf180 pdfjam/pdf270 pdfjam/pdf90 pdfjam/pdfbook pdfjam/pdfflip pdfjam/pdfjam pdfjam/pdfjam-pocketmod pdfjam/pdfjam-slides3up pdfjam/pdfjam-slides6up pdfjam/pdfjoin pdfjam/pdfnup pdfjam/pdfpun pfarrei/a5toa4.tlu pfarrei/pfarrei.tlu pkfix-helper/pkfix-helper pkfix/pkfix.pl ps2eps/ps2eps.pl purifyeps/purifyeps simpdftex/simpdftex sty2dtx/sty2dtx.pl texcount/texcount.pl texdef/texdef.pl texdiff/texdiff texdirflatten/texdirflatten texdoc/texdoc.tlu texdoctk/texdoctk.pl texlive/allcm.sh texlive/allneeded.sh texlive/dvi2fax.sh texlive/dvired.sh texlive/e2pall.sh texlive/fmtutil-sys.sh texlive/fmtutil.sh texlive/fontinst.sh texlive/kpsetool.sh texlive/kpsewhere.sh texlive/ps2frag.sh texlive/pslatex.sh texlive/rungs.tlu texlive/texconfig-dialog.sh texlive/texconfig-sys.sh texlive/texconfig.sh texlive/texlinks.sh texlive/updmap-sys.sh texlive/updmap.pl texliveonfly/texliveonfly.py texloganalyser/texloganalyser thumbpdf/thumbpdf.pl typeoutfileinfo/typeoutfileinfo.sh xindy/texindy.pl xindy/xindy.pl """ for p in linked_scripts.split(): bn = shelltools.baseName(p).split(".")[0] if shelltools.isFile("%s/usr/share/texmf-dist/scripts/%s" % (get.installDIR(), p)): pisitools.dosym("/usr/share/texmf-dist/scripts/%s" % p, "/usr/bin/%s" % bn) #? pisitools.dosym("/usr/share/texmf-dist/scripts/listings-ext/listings-ext.sh", "/usr/bin/listings-ext.sh") pisitools.dosym("allcm", "/usr/bin/allec") pisitools.dosym("fmtutil", "/usr/bin/mktexfmt") pisitools.dosym("kpsetool", "/usr/bin/kpsexpand") pisitools.dosym("kpsetool", "/usr/bin/kpsepath") pisitools.dosym("epstopdf", "/usr/bin/repstopdf") pisitools.dosym("pdfcrop", "/usr/bin/rpdfcrop") pisitools.dosym("luaotfload-tool", "/usr/bin/mkluatexfontdb") #remove unneded pisitools.removeDir("/usr/share/texmf-dist/scripts/context/stubs/mswin") pisitools.removeDir("/usr/share/texmf-dist/scripts/context/stubs/win64") #remove conflicts files with texlive-bin pisitools.remove("/usr/share/texmf-dist/dvipdfmx/dvipdfmx.cfg") pisitools.remove("/usr/share/texmf-dist/dvips/base/*.pro") pisitools.remove("/usr/share/texmf-dist/dvips/gsftopk/render.ps") pisitools.remove("/usr/share/texmf-dist/fonts/cmap/dvipdfmx/EUC-UCS2") pisitools.remove("/usr/share/texmf-dist/fonts/enc/dvips/base/7t.enc") pisitools.remove("/usr/share/texmf-dist/fonts/enc/ttf2pk/base/T1-WGL4.enc") pisitools.remove("/usr/share/texmf-dist/fonts/map/dvipdfmx/cid-x.map") pisitools.removeDir("/usr/share/texmf-dist/fonts/sfd/ttf2pk") pisitools.remove("/usr/share/texmf-dist/scripts/context/stubs/unix/*jit") pisitools.removeDir("/usr/share/texmf-dist/scripts/crossrefware") pisitools.remove("/usr/share/texmf-dist/ttf2pk/ttf2pk.cfg") pisitools.remove("/usr/share/texmf-dist/ttf2pk/VPS.rpl") pisitools.remove("/usr/share/texmf-dist/web2c/mktex*") pisitools.removeDir("/usr/share/texmf-dist/xdvi") pisitools.removeDir("/usr/share/texmf-dist/bibtex/csf/base") pisitools.remove("/usr/share/texmf-dist/chktex/chktexrc")
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/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")
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")
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")
def install(): shelltools.cd("%s/build" % get.workDIR()) conf = "DESTDIR=%s \ prefix=%s \ bindir=%s \ includedir=%s/include \ datadir=%s \ mandir=%s/man \ infodir=%s/info \ LIBPATH=%s \ ${GCC_INSTALL_TARGET}" % (get.installDIR(), PREFIX, BINPATH, LIBPATH, DATAPATH, DATAPATH, DATAPATH, LIBPATH) autotools.make(conf) for file in shelltools.ls("%s/build/gcc/include/*" % get.workDIR()): if shelltools.isLink(file): shelltools.unlink(file) autotools.rawInstall("DESTDIR=%s" % get.installDIR()) # This one comes with binutils pisitools.remove("/usr/lib/libiberty.a") for file in ("%s/libstdc++.la" % LIBPATH, "%s/libsupc++.la" % LIBPATH): pisitools.dosed("%s%s" % (get.installDIR(), file), "^libdir.*", "libdir=%s" % shelltools.baseName(file)) # Move Fortran libs to LIBPATH pisitools.domove("/usr/lib/gcc/%s/lib*" % get.HOST(), LIBPATH) # Move <cxxabi.h> to compiler-specific directories pisitools.move("%s/cxxabi.h" % STDCXX_INCDIR, "%s/include/" % LIBPATH) # These should be symlinks for binary in ("gcc", "g++", "c++"): pisitools.remove("%s/%s" % (BINPATH, binary)) pisitools.dosym("%s-%s" % (get.HOST(), binary), "%s/%s" % (BINPATH, binary)) # /usr/bin symlinks pisitools.dosym("%s/%s" % (BINPATH, binary), "/usr/bin/%s" % binary) # /usr/bin symlinks pisitools.dosym("%s/gcc" % BINPATH, "/usr/bin/cc") pisitools.dosym("%s/cpp" % BINPATH, "/usr/bin/cpp") # i686-... symlinks pisitools.dosym("%s/gcc" % BINPATH, "/usr/bin/%s-gcc" % get.HOST()) pisitools.dosym("%s/g++" % BINPATH, "/usr/bin/%s-g++" % get.HOST()) pisitools.dosym("%s/c++" % BINPATH, "/usr/bin/%s-c++" % get.HOST()) pisitools.dosym("%s/g77" % BINPATH, "/usr/bin/%s-g77" % get.HOST()) # For some reason, g77 and gcjh gets made instead of ${CTARGET}-g77... this makes it safe pisitools.domove("%s/g77" % BINPATH, "%s/" % BINPATH, "%s-g77" % get.HOST()) pisitools.dosym("%s-g77" % get.HOST(), "%s/g77" % BINPATH) # Fix libstdc++ path pisitools.dosed( "%s/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libstdc++.la" % get.installDIR(), "libdir=libstdc\\+\\+.la", "libdir='/usr/lib/gcc/i686-pc-linux-gnu/3.4.6'")