mambabase: update Makefile and mambabase for rpm packaging

This commit is contained in:
Silvan Calarco 2019-10-20 14:21:26 +02:00
parent 39bc23faf6
commit 0d81a89138
6 changed files with 19 additions and 22 deletions

View File

@ -23,7 +23,6 @@ endif
PACKAGE = desktop-base-openmamba
DISTROID = openmamba
WITHKDE3 := 1
WITHKDE3TOOLS := 1
RPM_VENDOR = openmamba
@ -60,12 +59,7 @@ mambareportdatadir = ${datadir}/openmamba/mambareport
mambaimagesdir = ${datadir}/openmamba/images
xramdrdatadir = ${datadir}/openmamba/xramdr
iconsdir = ${datadir}/icons/hicolor
kdeprefixdir = $(shell kde-config --prefix)
kdedatadir = $(kdeprefixdir)/share
kdeautostartdir = ${kdedatadir}/autostart
kdeconfigdir = ${kdedatadir}/config
localesdir = ${datadir}/locale
kdelocalesdir = ${kdedatadir}/locale
pck_desktop = $(wildcard desktop/*.bz2)
systemlogodir = ${datadir}/pixmaps
xdg_appsdir = ${datadir}/applications
@ -133,15 +127,13 @@ dist-update: $(pck_infiles:.in=)
locales: $(pck_catalogs:.po=.mo) $(pck_catalogs1:.po=.mo)
install-locales: locales
ifeq ($(WITHKDE3TOOLS),1)
@for f in $(pck_catalogs); do\
lang=`echo $$f | sed 's,.*/\(.*\)\.po,\1,'`;\
echo "installing i18n file for language \`$$lang'...";\
dir="$(DESTDIR)$(kdelocalesdir)/$$lang/LC_MESSAGES";\
dir="$(DESTDIR)$(datadir)/locale/$$lang/LC_MESSAGES";\
$(INSTALL_DIR) $$dir;\
$(INSTALL_DATA) $${f/.po/.mo} $$dir/mambabase.mo;\
done
endif
@for f in $(pck_catalogs1); do\
lang=`echo $$f | sed 's,.*/\(.*\)\.po,\1,'`;\
echo "installing i18n file for language \`$$lang'...";\
@ -210,12 +202,14 @@ install-icons:
install-mambabase:
@$(INSTALL_DIR) $(DESTDIR)$(mambabasedatadir)
$(INSTALL_SCRIPT) mambabase/mambabase.sh $(DESTDIR)$(mambabasedatadir)
ifeq ($(WITHKDE3TOOLS),1)
$(INSTALL_SCRIPT) mambabase/mambabase.kmdr $(DESTDIR)$(mambabasedatadir)
$(INSTALL_SCRIPT) mambabase/mambabase $(DESTDIR)$(bindir)/mambabase
$(INSTALL_SCRIPT) mambabase/mambabase.py $(DESTDIR)$(mambabasedatadir)
$(INSTALL_SCRIPT) mambabase/mambabase-pkggroups-parser.sh $(DESTDIR)$(mambabasedatadir)
$(INSTALL_DATA) mambabase/mambabase.desktop $(DESTDIR)$(xdg_appsdir)
$(INSTALL_DATA) mambabase/mambabase-autostart.desktop $(DESTDIR)$(mambabasedatadir)
endif
$(INSTALL_DATA) mambabase/openmamba.png $(DESTDIR)$(mambabasedatadir)
$(INSTALL_DATA) mambabase/mambabase.png $(DESTDIR)$(mambabasedatadir)
cp mambabase/*.ui $(DESTDIR)$(mambabasedatadir)
install-mambareport:
$(INSTALL_SCRIPT) mambareport/openmamba-makereport $(DESTDIR)$(bindir)

2
mambabase/mambabase Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
/usr/bin/python3 /usr/share/openmamba/mambabase/mambabase.py

View File

@ -3,7 +3,7 @@
Name=mambabase
GenericName=openmamba components installer
GenericName[it]=Installazione componenti base di openmamba
Exec=kmdr-executor /usr/share/openmamba/mambabase/mambabase.kmdr
Exec=/usr/bin/mambabase
Icon=mamba
Terminal=0
Type=Application

View File

@ -3,7 +3,7 @@ Name=openmamba base components
Name[it]=Componenti base di openmamba
GenericName=openmamba base components installer
GenericName[it]=Installazione dei componenti base di openmamba
Exec=kmdr-executor /usr/share/openmamba/mambabase/mambabase.kmdr
Exec=/usr/bin/mambabase
Icon=mamba
Terminal=0
Type=Application

BIN
mambabase/mambabase.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -16,6 +16,7 @@ import gi
gi.require_version('PackageKitGlib', '1.0')
from gi.repository import PackageKitGlib as packagekit
DATADIR = os.path.dirname(os.path.realpath((__file__))) + "/"
class InstallThread(QtCore.QThread):
parent = None
@ -169,7 +170,7 @@ class MambabaseWizard(QtWidgets.QWizard):
class WelcomePage(QtWidgets.QWizardPage):
def __init__(self, parent=None):
super(WelcomePage, self).__init__(parent)
uic.loadUi('WelcomePage.ui', self)
uic.loadUi(DATADIR + "WelcomePage.ui", self)
self.show()
@ -179,7 +180,7 @@ class SelectGroupsPage(QtWidgets.QWizardPage):
def __init__(self, parent=None):
super(SelectGroupsPage, self).__init__(parent)
uic.loadUi('SelectGroupsPage.ui', self)
uic.loadUi(DATADIR + "SelectGroupsPage.ui", self)
self.loadPkgGroups()
self.show()
@ -197,7 +198,7 @@ class SelectGroupsPage(QtWidgets.QWizardPage):
'devel': self.inst_devel
}
# Load packages group db into a dict
result = subprocess.run(['/usr/libexec/mambabase-pkggroups-parser.sh'],
result = subprocess.run([DATADIR + "mambabase-pkggroups-parser.sh"],
stdout=subprocess.PIPE)
lines = result.stdout.decode('UTF-8').splitlines()
for line in lines:
@ -237,7 +238,7 @@ class SelectExtraPage(QtWidgets.QWizardPage):
def __init__(self, parent=None):
super(SelectExtraPage, self).__init__(parent)
uic.loadUi('SelectExtraPage.ui', self)
uic.loadUi(DATADIR + "SelectExtraPage.ui", self)
self.setCommitPage(True)
self.setExtras()
self.show()
@ -272,7 +273,7 @@ class InstallationPage(QtWidgets.QWizardPage):
def __init__(self, parent=None):
super(InstallationPage, self).__init__(parent)
uic.loadUi('InstallationPage.ui', self)
uic.loadUi(DATADIR + "InstallationPage.ui", self)
self.setCommitPage(True)
self.show()
@ -292,14 +293,14 @@ class InstallationPage(QtWidgets.QWizardPage):
class FinishPage(QtWidgets.QWizardPage):
def __init__(self, parent=None):
super(FinishPage, self).__init__(parent)
uic.loadUi('FinishPage.ui', self)
uic.loadUi(DATADIR + "FinishPage.ui", self)
self.show()
if __name__ == '__main__':
import sys
app = QtWidgets.QApplication(sys.argv)
app.setWindowIcon(QtGui.QIcon("mamba-128x128.png"))
app.setWindowIcon(QtGui.QIcon(DATADIR + "mambabase.png"))
gettext.install('mambabase', '/usr/share/locale')
wizard = MambabaseWizard()
wizard.show()