def doman(*sourceFiles, pageDirectory=None): """inserts the man pages in the list of files into /usr/share/man/""" '''example call: inarytools.doman("man.1", "sulin.*")''' manDIR = join_path(get.installDIR(), get.manDIR()) if not can_access_directory(manDIR): makedirs(manDIR) for sourceFile in sourceFiles: sourceFileGlob = glob.glob(sourceFile) if len(sourceFileGlob) == 0: ctx.ui.warning( _("No file matched pattern \"{}\"").format(sourceFile)) for source in sourceFileGlob: compressed = source.endswith("gz") and source if compressed: source = source[:-3] try: if not pageDirectory: pageDirectory = source[source.rindex('.') + 1:] except ValueError: ctx.ui.warning( _('ActionsAPI [doman]: Wrong man page file: \"{}\"'). format(source)) manPDIR = join_path(manDIR, '/man{}'.format(pageDirectory)) makedirs(manPDIR) if not compressed: system('install -m 0644 {0} {1}'.format(source, manPDIR)) else: uncompress(compressed, targetDir=manPDIR)
def configure(parameters=''): """configure source with given parameters = "--with-nls --with-libusb --with-something-usefull""" if can_access_file('configure'): gnuconfig_update() prefix = get.emul32prefixDIR() if get.buildTYPE( ) == "emul32" else get.defaultprefixDIR() args = './configure \ --prefix=/{0} \ --build={1} \ --mandir=/{2} \ --infodir=/{3} \ --datadir=/{4} \ --sysconfdir=/{5} \ --localstatedir=/{6} \ --libexecdir=/{7} \ {8}{9}'.format( prefix, get.HOST(), get.manDIR(), get.infoDIR(), get.dataDIR(), get.confDIR(), get.localstateDIR(), get.libexecDIR(), "--libdir=/usr/lib32 " if get.buildTYPE() == "emul32" else "", parameters) if system(args): raise ConfigureError(_('Configure failed.')) else: raise ConfigureError( _('No configure script found. (\"{}\" file not found.)'.format( "configure")))
def setup(): inarytools.dosed("config/override.m4", "2.64", "2.69") shelltools.system( 'sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure') shelltools.makedirs("build") shelltools.cd("build") shelltools.export("PYTHON", "/usr/bin/python3") shelltools.system("../configure \ --prefix=/{0} \ --build={1} \ --mandir=/{2} \ --libdir=/{0}/lib \ --infodir=/{3} \ --datadir=/{4} \ --sysconfdir=/{5} \ --localstatedir=/{6} \ --libexecdir=/{7} \ --with-system-readline \ --with-separate-debug-dir=/usr/lib/debug \ --with-gdb-datadir=/usr/share/gdb \ --with-python=/usr/bin/{8} \ --with-pythondir=/usr/lib/{8}/site-packages \ --disable-nls \ --disable-rpath \ --with-expat".format(get.defaultprefixDIR(), get.HOST(), get.manDIR(), get.infoDIR(), get.dataDIR(), get.confDIR(), get.localstateDIR(), get.libexecDIR(), get.curPYTHON()))
def install(): if get.buildTYPE() == "emul32": options = "LIBDIR=/usr/lib32" else: options = "LIBDIR=/usr/lib" autotools.rawInstall( "PREFIX=/usr BUILD_STATIC_LIB=0 MANDIR=/%s PROG_EXTRA=sensord DESTDIR=%s %s user_install" % (get.manDIR(), get.installDIR(), options)) inarytools.dodoc("CHANGES", "CONTRIBUTORS", "README")
def install(parameters='', argument='install'): """install source into install directory with given parameters""" args = 'DESTDIR={0} \ prefix=/{1} \ datadir=/{2} \ infodir=/{3} \ localstatedir=/{4} \ mandir=/{5} \ sysconfdir=/{6} \ {7} \ {8}'.format(get.installDIR(), get.defaultprefixDIR(), get.dataDIR(), get.infoDIR(), get.localstateDIR(), get.manDIR(), get.confDIR(), parameters, argument) rawInstall(args)
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) autotools.make("mandir=%s/%s install-man" % (get.installDIR(), get.manDIR())) #~ autotools.install("mandir=%s/%s" % (get.installDIR(), get.manDIR())) # Use dircolors from the package inarytools.insinto("/etc", "src/dircolors.hin", "DIR_COLORS") # move critical files into /bin for f in movetobin: inarytools.domove("/usr/bin/%s" % f, "/bin/") for f in symtousrbin: inarytools.dosym("../../bin/%s" % f, "/usr/bin/%s" % f) inarytools.dodoc("AUTHORS", "ChangeLog*", "NEWS", "README*", "THANKS", "TODO")
def configure(parameters=''): """configure source with given parameters = "--with-nls --with-libusb --with-something-usefull""" prefix = get.defaultprefixDIR() if get.buildTYPE() == "emul32": prefix = get.emul32prefixDIR() args = '--prefix=/{0} \ --build={1} \ --mandir=/{2} \ --infodir=/{3} \ --datadir=/{4} \ --sysconfdir=/{5} \ --localstatedir=/{6} \ --libexecdir=/{7} \ --libdir=/{8}\ {9}'.format(prefix, get.HOST(), get.manDIR(), get.infoDIR(), get.dataDIR(), get.confDIR(), get.localstateDIR(), get.libexecDIR(), get.libDIR(), parameters) rawConfigure(args)
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) for prog in ["faillog", "hostname", "login", "lastlog", "uptime"]: if os.path.isfile("{}/usr/bin/{}".format(get.installDIR(), prog)): os.unlink("{}/usr/bin/{}".format(get.installDIR(), prog)) autotools.make("mandir=%s/%s install-man" % (get.installDIR(), get.manDIR())) #~ autotools.install("mandir=%s/%s" % (get.installDIR(), get.manDIR())) # Use dircolors from the package inarytools.insinto("/etc", "src/dircolors.hin", "DIR_COLORS") # move critical files into /bin for f in movetobin: inarytools.domove("/usr/bin/%s" % f, "/bin/") for f in symtousrbin: inarytools.dosym("../../bin/%s" % f, "/usr/bin/%s" % f) inarytools.dodoc("AUTHORS", "ChangeLog*", "NEWS", "README*", "THANKS", "TODO")
def setup(): autotools.autoreconf("-vif") args = '../configure \ --prefix=/{0} \ --build={1} \ --mandir=/{2} \ --infodir=/{3} \ --datadir=/{4} \ --sysconfdir=/{5} \ --localstatedir=/{6} \ --libexecdir=/{7} \ --libdir=/usr/lib '.format(get.defaultprefixDIR(), get.HOST(), get.manDIR(), get.infoDIR(), get.dataDIR(), get.confDIR(), get.localstateDIR(), get.libexecDIR()) shelltools.makedirs("build-python3") shelltools.cd("build-python3") shelltools.system(args + "PYTHON=/usr/bin/python3 --with-python") shelltools.cd("..") shelltools.makedirs("build-python2") shelltools.cd("build-python2") shelltools.system(args + "PYTHON=/usr/bin/python2 --with-python")
def install(parameters='', argument='install'): """install source into install directory with given parameters""" args = 'make prefix={0}/{1} \ datadir={0}/{2} \ infodir={0}/{3} \ localstatedir={0}/{4} \ mandir={0}/{5} \ sysconfdir={0}/{6} \ {7} \ {8}'.format(get.installDIR(), get.defaultprefixDIR(), get.dataDIR(), get.infoDIR(), get.localstateDIR(), get.manDIR(), get.confDIR(), parameters, argument) if system(args): raise InstallError(_('Install failed.')) else: fixInfoDir() if get.buildTYPE() == "emul32": fixpc() if isDirectory("{}/emul32".format(get.installDIR())): removeDir("/emul32")
def install(): autotools.rawInstall("PREFIX=%s MANDIR=%s" % (get.installDIR(), get.manDIR())) inarytools.dodir("/etc/logrotate.d") inarytools.dobin("examples/logrotate.cron", "/etc/cron.daily")
headerdir = "{0}/include/{1}".format(prefix, basename) datadir = "{0}/share/{1}".format(prefix, basename) docdir = "/{0}/{1}".format(get.docDIR(), basename) archdatadir = "{0}/{1}".format(libdir, qtbasename) examplesdir = "{0}/{1}/examples".format(libdir, qtbasename) importdir = "{0}/{1}/imports".format(libdir, qtbasename) plugindir = "{0}/{1}/plugins".format(libdir, qtbasename) qmldir = "{0}/{1}/qmldir".format(libdir, qtbasename) testdir = "{0}/share/{1}".format(prefix, basename) translationdir = "{0}/translations".format(datadir) # KDE 5 specific variables iconsdir = "{}/share/icons".format(prefix) applicationsdir = "{0}/share/applications/{1}".format(prefix, basename) mandir = "/{}".format(get.manDIR()) sharedir = "{}/share".format(prefix) localedir = "{}/share/locale".format(prefix) moduledir = "{}/lib/qt5/mkspecs/modules".format(prefix) pythondir = "{}/bin/python".format(prefix) appsdir = "{}".format(sharedir) sysconfdir = "/etc" configdir = "{}/xdg".format(sysconfdir) servicesdir = "{}/services".format(sharedir) servicetypesdir = "{}/servicetypes".format(sharedir) htmldir = "{}/html".format(docdir) wallpapersdir = "{}/share/wallpapers".format(prefix) def configure(parameters='', installPrefix=prefix, sourceDir='..'): """ parameters -DLIB_INSTALL_DIR="hede" -DSOMETHING_USEFUL=1"""
def install(): autotools.rawInstall("DESTDIR=%s sysconfdir=/%s mandir=/%s" % (get.installDIR(), get.confDIR(), get.manDIR())) inarytools.dodoc("COPYING", "NEWS")
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2018 Suleyman POYRAZ (Zaryob) # Licensed under the GNU General Public License, version 2. # See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt from inary.actionsapi import inarytools from inary.actionsapi import autotools from inary.actionsapi import get InstDir = get.installDIR() manDir = get.manDIR() def setup(): autotools.rawConfigure("--with-diffutils \ --prefix=/%s \ --host=%s \ " % (get.defaultprefixDIR(), \ get.HOST())) def build(): autotools.make() def install(): autotools.rawInstall( "prefix=%s/usr \ man1dir=%s/%s/man1 \