Kaydet (Commit) 6e3d5072 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

Refreshed actions functions

Unuseful actionsapi functions and modules such as qt4 modules.
üst a40c6ccc
......@@ -11,73 +11,59 @@
#
# Please read the COPYING file.
# standard python modules
import os
import gettext
__trans = gettext.translation('inary', fallback=True)
_ = __trans.gettext
# Inary Modules
import inary.context as ctx
# ActionsAPI Modules
import inary.actionsapi
import inary.actionsapi.get as get
from inary.actionsapi.shelltools import system
from inary.actionsapi.shelltools import can_access_file
from inary.actionsapi import get
from inary.actionsapi import cmaketools
from inary.actionsapi import shelltools
class ConfigureError(inary.actionsapi.Error):
def __init__(self, value=''):
inary.actionsapi.Error.__init__(self, value)
self.value = value
ctx.ui.error(value)
if can_access_file('config.log'):
ctx.ui.error(_('\n!!! Please attach the config.log to your bug report:\n{}/config.log').format(os.getcwd()))
basename = "kde5"
class MakeError(inary.actionsapi.Error):
def __init__(self, value=''):
inary.actionsapi.Error.__init__(self, value)
self.value = value
ctx.ui.error(value)
prefix = "/{}".format(get.defaultprefixDIR())
libdir = "{}/lib".format(prefix)
bindir = "{}/bin".format(prefix)
libexecdir = "{}/lib".format(prefix)
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)
qmldir = "{}/lib/qt5/qml".format(prefix)
plugindir = "{}/lib/qt5/plugins".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)
includedir = "{}/include".format(prefix)
docdir = "/{0}/{1}".format(get.docDIR(), basename)
htmldir = "{}/html".format(docdir)
wallpapersdir = "{}/share/wallpapers".format(prefix)
class InstallError(inary.actionsapi.Error):
def __init__(self, value=''):
inary.actionsapi.Error.__init__(self, value)
self.value = value
ctx.ui.error(value)
def configure(parameters = '', installPrefix = prefix, sourceDir = '..'):
''' parameters -DLIB_INSTALL_DIR="hede" -DSOMETHING_USEFUL=1'''
def configure(parameters = ''):
''' parameters = '--with-nls --with-libusb --with-something-usefull '''
if can_access_file('configure'):
args = './configure \
--prefix={0} \
--build={1} \
--with-x \
--enable-mitshm \
--with-xinerama \
--with-qt-dir={2} \
--enable-mt \
--with-qt-libraries={2}/lib \
--disable-dependency-tracking \
--disable-debug \
{3}'.format(get.kdeDIR(), get.HOST(), get.qtDIR(), parameters)
shelltools.makedirs("build")
shelltools.cd("build")
if system(args):
raise ConfigureError(_('Configure failed.'))
else:
raise ConfigureError(_('No configure script found.'))
cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \
-DKDE_INSTALL_LIBEXECDIR={0} \
-DCMAKE_INSTALL_LIBDIR=lib \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DKDE_INSTALL_QMLDIR={1} \
-DKDE_INSTALL_SYSCONFDIR={2} \
-DKDE_INSTALL_PLUGINDIR={3} \
-DECM_MKSPECS_INSTALL_DIR={4} \
-DBUILD_TESTING=OFF \
-DKDE_INSTALL_LIBDIR=lib \
-Wno-dev \
-DCMAKE_INSTALL_PREFIX={5}".format(libexecdir, qmldir, sysconfdir, plugindir, moduledir, prefix), installPrefix, sourceDir)
def make(parameters = ''):
'''make source with given parameters = "all" || "doc" etc.'''
if system('make {0} {1}'.format(get.makeJOBS(), parameters)):
raise MakeError(_('Make failed.'))
shelltools.cd("..")
def install(parameters = 'install'):
if can_access_file('Makefile'):
args = 'make DESTDIR={0} destdir={0} {1}'.format(get.installDIR(), parameters)
def make(parameters = ''):
cmaketools.make('-C build {}'.format(parameters))
if system(args):
raise InstallError(_('Install failed.'))
else:
raise InstallError(_('No Makefile found.'))
def install(parameters = '', argument = 'install'):
cmaketools.install('-C build {}'.format(parameters), argument)
# -*- coding: utf-8 -*-
#
# Main fork Pisi: Copyright (C) 2005 - 2011, Tubitak/UEKAE
#
# Copyright (C) 2016 - 2018, Suleyman POYRAZ (Zaryob)
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
# ActionsAPI Modules
from inary.actionsapi import get
from inary.actionsapi import cmaketools
from inary.actionsapi import shelltools
basename = "kde4"
prefix = "/{}".format(get.defaultprefixDIR())
libdir = "{}/lib".format(prefix)
bindir = "{}/bin".format(prefix)
modulesdir = "{0}/{1}".format(libdir, basename)
libexecdir = "{}/libexec".format(modulesdir)
iconsdir = "{}/share/icons".format(prefix)
applicationsdir = "{0}/share/applications/{1}".format(prefix, basename)
mandir = "/{}".format(get.manDIR())
sharedir = "{0}/share/{1}".format(prefix, basename)
appsdir = "{}/apps".format(sharedir)
configdir = "{}/config".format(sharedir)
sysconfdir= "/etc"
servicesdir = "{}/services".format(sharedir)
servicetypesdir = "{}/servicetypes".format(sharedir)
includedir = "{0}/include/{1}".format(prefix, basename)
docdir = "/{0}/{1}".format(get.docDIR(), basename)
htmldir = "{}/html".format(docdir)
wallpapersdir = "{}/share/wallpapers".format(prefix)
def configure(parameters = '', installPrefix = prefix, sourceDir = '..'):
''' parameters -DLIB_INSTALL_DIR="hede" -DSOMETHING_USEFUL=1'''
shelltools.makedirs("build")
shelltools.cd("build")
cmaketools.configure("-DDATA_INSTALL_DIR:PATH={0} \
-DINCLUDE_INSTALL_DIR:PATH={1} \
-DCONFIG_INSTALL_DIR:PATH={2} \
-DLIBEXEC_INSTALL_DIR:PATH={3} \
-DSYSCONF_INSTALL_DIR:PATH={4} \
-DHTML_INSTALL_DIR:PATH={5} \
-DMAN_INSTALL_DIR:PATH={6} \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DLIB_INSTALL_DIR:PATH={7} {8}".format(appsdir, includedir, configdir, libexecdir, sysconfdir, htmldir, mandir, libdir, parameters), installPrefix, sourceDir)
shelltools.cd("..")
def make(parameters = ''):
cmaketools.make('-C build {}'.format(parameters))
def install(parameters = '', argument = 'install'):
cmaketools.install('-C build {}'.format(parameters), argument)
# -*- coding: utf-8 -*-
#
# Main fork Pisi: Copyright (C) 2005 - 2011, Tubitak/UEKAE
#
# Copyright (C) 2016 - 2018, Suleyman POYRAZ (Zaryob)
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
# ActionsAPI Modules
from inary.actionsapi import get
from inary.actionsapi import cmaketools
from inary.actionsapi import shelltools
basename = "kde5"
prefix = "/{}".format(get.defaultprefixDIR())
libdir = "{}/lib".format(prefix)
bindir = "{}/bin".format(prefix)
libexecdir = "{}/lib".format(prefix)
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)
qmldir = "{}/lib/qt5/qml".format(prefix)
plugindir = "{}/lib/qt5/plugins".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)
includedir = "{}/include".format(prefix)
docdir = "/{0}/{1}".format(get.docDIR(), basename)
htmldir = "{}/html".format(docdir)
wallpapersdir = "{}/share/wallpapers".format(prefix)
def configure(parameters = '', installPrefix = prefix, sourceDir = '..'):
''' parameters -DLIB_INSTALL_DIR="hede" -DSOMETHING_USEFUL=1'''
shelltools.makedirs("build")
shelltools.cd("build")
cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \
-DKDE_INSTALL_LIBEXECDIR={0} \
-DCMAKE_INSTALL_LIBDIR=lib \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DKDE_INSTALL_QMLDIR={1} \
-DKDE_INSTALL_SYSCONFDIR={2} \
-DKDE_INSTALL_PLUGINDIR={3} \
-DECM_MKSPECS_INSTALL_DIR={4} \
-DBUILD_TESTING=OFF \
-DKDE_INSTALL_LIBDIR=lib \
-Wno-dev \
-DCMAKE_INSTALL_PREFIX={5}".format(libexecdir, qmldir, sysconfdir, plugindir, moduledir, prefix), installPrefix, sourceDir)
shelltools.cd("..")
def make(parameters = ''):
cmaketools.make('-C build {}'.format(parameters))
def install(parameters = '', argument = 'install'):
cmaketools.install('-C build {}'.format(parameters), argument)
# -*- coding: utf-8 -*-
#
# Main fork Pisi: Copyright (C) 2005 - 2011, Tubitak/UEKAE
#
# Copyright (C) 2016 - 2018, Suleyman POYRAZ (Zaryob)
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
import glob
import gettext
__trans = gettext.translation('inary', fallback=True)
_ = __trans.gettext
# Inary Modules
import inary.context as ctx
# ActionsAPI Modules
import inary.actionsapi
# ActionsAPI Modules
from inary.actionsapi import get
from inary.actionsapi import cmaketools
from inary.actionsapi import shelltools
basename = "qt4"
prefix = "/{}".format(get.defaultprefixDIR())
libdir = "{}/lib".format(prefix)
bindir = "{}/bin".format(prefix)
datadir = "{0}/share/{1}".format(prefix, basename)
includedir = "{}/include".format(prefix)
docdir = "/{0}/{1}".format(get.docDIR(), basename)
examplesdir = "{0}/{1}/examples".format(libdir, basename)
demosdir = "{0}/{1}/demos".format(libdir, basename)
importdir = "{0}/{1}/imports".format(libdir, basename)
plugindir = "{0}/{1}/plugins".format(libdir, basename)
translationdir = "{}/translations".format(datadir)
sysconfdir= "/etc"
qmake = "{}/qmake".format(bindir)
class ConfigureError(inary.actionsapi.Error):
def __init__(self, value=''):
inary.actionsapi.Error.__init__(self, value)
self.value = value
ctx.ui.error(value)
def configure(projectfile='', parameters='', installPrefix=prefix):
if projectfile != '' and not shelltools.can_access_file(projectfile):
raise ConfigureError(_("Project file '{}' not found.").format(projectfile))
profiles = glob.glob("*.pro")
if len(profiles) > 1 and projectfile == '':
raise ConfigureError(_("It seems there are more than one .pro file, you must specify one. (Possible .pro files: {})").format(", ".join(profiles)))
shelltools.system("{0} -makefile {1} PREFIX='{2}' QMAKE_CFLAGS+='{3.CFLAGS()}' QMAKE_CXXFLAGS+='{3.CXXFLAGS()}' {4}".format(qmake, projectfile, installPrefix, get, parameters))
def make(parameters=''):
cmaketools.make(parameters)
def install(parameters='', argument='install'):
cmaketools.install('INSTALL_ROOT="{0}" {1}'.format(get.installDIR(), parameters), argument)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment