openbox rebuild
This commit is contained in:
@@ -11,6 +11,7 @@ from pisi.actionsapi import shelltools
|
||||
|
||||
|
||||
def setup():
|
||||
shelltools.export("PYTHON", "/usr/bin/python3")
|
||||
shelltools.export("AUTOPOINT", "true")
|
||||
autotools.autoreconf("-fiv")
|
||||
autotools.configure("--disable-static \
|
||||
@@ -18,7 +19,7 @@ def setup():
|
||||
--with-x \
|
||||
--enable-nls \
|
||||
--sysconfdir=/etc \
|
||||
--libexecdir=/usr/libexec/openbox \
|
||||
--libexecdir=/usr/libexec \
|
||||
--enable-startup-notification \
|
||||
--docdir=/%s/%s" % (get.docDIR(), get.srcNAME()))
|
||||
|
||||
|
||||
Executable → Regular
+33
-6
@@ -1,6 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openbox_menu xmlns="http://openbox.org/"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://openbox.org/">
|
||||
<menu id="root-menu" label="obmenu-generator" execute="/usr/bin/obmenu-generator"/>
|
||||
</openbox_menu>
|
||||
<?xml version="1.0" encoding="windows-1252"?>
|
||||
<openbox_menu xmlns="http://openbox.org/3.4/menu">
|
||||
|
||||
<menu id="applications-menu" label="Applications" execute="/usr/libexec/openbox-xdg-menu applications"/>
|
||||
<menu id="preferences-menu" label="Preferences" execute="/usr/libexec/openbox-xdg-menu preferences"/>
|
||||
<menu id="administration-menu" label="Administration" execute="/usr/libexec/openbox-xdg-menu system-settings"/>
|
||||
<menu id="terminals-menu" label="Terminals" execute="/usr/libexec/openbox-xdg-menu /etc/xdg/openbox/terminals"/>
|
||||
|
||||
<menu id="root-menu" label="Openbox 3">
|
||||
<separator label="Openbox"/>
|
||||
<menu id="applications-menu"/>
|
||||
<menu id="preferences-menu"/>
|
||||
<menu id="administration-menu"/>
|
||||
<separator/>
|
||||
<menu id="terminals-menu"/>
|
||||
<separator/>
|
||||
<item label="Reconfigure">
|
||||
<action name="Reconfigure"/>
|
||||
</item>
|
||||
<item label="Exit">
|
||||
<action name="Exit">
|
||||
<prompt>yes</prompt>
|
||||
</action>
|
||||
</item>
|
||||
<separator/>
|
||||
<item label="Log Out">
|
||||
<action name="SessionLogout">
|
||||
<prompt>yes</prompt>
|
||||
</action>
|
||||
</item>
|
||||
</menu>
|
||||
|
||||
</openbox_menu>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Index: openbox-3.5.2/data/xsession/openbox-gnome-session.in
|
||||
===================================================================
|
||||
--- openbox-3.5.2.orig/data/xsession/openbox-gnome-session.in
|
||||
+++ openbox-3.5.2/data/xsession/openbox-gnome-session.in
|
||||
@@ -18,6 +18,9 @@ VER=$(gnome-session --version 2>/dev/nul
|
||||
MAJOR=$(echo $VER | cut -d . -f 1)
|
||||
MINOR=$(echo $VER | cut -d . -f 2)
|
||||
|
||||
+# use gnome menus (gentoo bug #291965)
|
||||
+export XDG_MENU_PREFIX=gnome-
|
||||
+
|
||||
# run GNOME with Openbox as its window manager
|
||||
|
||||
if test $MAJOR -lt 2 || (test $MAJOR = 2 && test $MINOR -le 22); then
|
||||
@@ -0,0 +1,126 @@
|
||||
diff --git a/data/autostart/openbox-xdg-autostart b/data/autostart/openbox-xdg-autostart
|
||||
index 04a17a199..f2c75bbdd 100755
|
||||
--- a/data/autostart/openbox-xdg-autostart
|
||||
+++ b/data/autostart/openbox-xdg-autostart
|
||||
@@ -19,6 +19,8 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
+from __future__ import print_function
|
||||
+
|
||||
ME="openbox-xdg-autostart"
|
||||
VERSION="1.1"
|
||||
|
||||
@@ -28,9 +30,9 @@ try:
|
||||
from xdg.DesktopEntry import DesktopEntry
|
||||
from xdg.Exceptions import ParsingError
|
||||
except ImportError:
|
||||
- print
|
||||
- print >>sys.stderr, "ERROR:", ME, "requires PyXDG to be installed"
|
||||
- print
|
||||
+ print()
|
||||
+ print("ERROR:", ME, "requires PyXDG to be installed", file=sys.stderr)
|
||||
+ print()
|
||||
sys.exit(1)
|
||||
|
||||
def main(argv=sys.argv):
|
||||
@@ -51,7 +53,7 @@ def main(argv=sys.argv):
|
||||
try:
|
||||
autofile = AutostartFile(path)
|
||||
except ParsingError:
|
||||
- print "Invalid .desktop file: " + path
|
||||
+ print("Invalid .desktop file: " + path)
|
||||
else:
|
||||
if not autofile in files:
|
||||
files.append(autofile)
|
||||
@@ -99,9 +101,9 @@ class AutostartFile:
|
||||
|
||||
def _alert(self, str, info=False):
|
||||
if info:
|
||||
- print "\t ", str
|
||||
+ print("\t ", str)
|
||||
else:
|
||||
- print "\t*", str
|
||||
+ print("\t*", str)
|
||||
|
||||
def _showInEnvironment(self, envs, verbose=False):
|
||||
default = not self.de.getOnlyShowIn()
|
||||
@@ -146,14 +148,14 @@ class AutostartFile:
|
||||
|
||||
def display(self, envs):
|
||||
if self._shouldRun(envs):
|
||||
- print "[*] " + self.de.getName()
|
||||
+ print("[*] " + self.de.getName())
|
||||
else:
|
||||
- print "[ ] " + self.de.getName()
|
||||
+ print("[ ] " + self.de.getName())
|
||||
self._alert("File: " + self.path, info=True)
|
||||
if self.de.getExec():
|
||||
self._alert("Executes: " + self.de.getExec(), info=True)
|
||||
self._shouldRun(envs, True)
|
||||
- print
|
||||
+ print()
|
||||
|
||||
def run(self, envs):
|
||||
here = os.getcwd()
|
||||
@@ -165,34 +167,34 @@ class AutostartFile:
|
||||
os.chdir(here)
|
||||
|
||||
def show_help():
|
||||
- print "Usage:", ME, "[OPTION]... [ENVIRONMENT]..."
|
||||
- print
|
||||
- print "This tool will run xdg autostart .desktop files"
|
||||
- print
|
||||
- print "OPTIONS"
|
||||
- print " --list Show a list of the files which would be run"
|
||||
- print " Files which would be run are marked with an asterix"
|
||||
- print " symbol [*]. For files which would not be run,"
|
||||
- print " information is given for why they are excluded"
|
||||
- print " --help Show this help and exit"
|
||||
- print " --version Show version and copyright information"
|
||||
- print
|
||||
- print "ENVIRONMENT specifies a list of environments for which to run autostart"
|
||||
- print "applications. If none are specified, only applications which do not "
|
||||
- print "limit themselves to certain environments will be run."
|
||||
- print
|
||||
- print "ENVIRONMENT can be one or more of:"
|
||||
- print " GNOME Gnome Desktop"
|
||||
- print " KDE KDE Desktop"
|
||||
- print " ROX ROX Desktop"
|
||||
- print " XFCE XFCE Desktop"
|
||||
- print " Old Legacy systems"
|
||||
- print
|
||||
+ print("Usage:", ME, "[OPTION]... [ENVIRONMENT]...")
|
||||
+ print()
|
||||
+ print("This tool will run xdg autostart .desktop files")
|
||||
+ print()
|
||||
+ print("OPTIONS")
|
||||
+ print(" --list Show a list of the files which would be run")
|
||||
+ print(" Files which would be run are marked with an asterix")
|
||||
+ print(" symbol [*]. For files which would not be run,")
|
||||
+ print(" information is given for why they are excluded")
|
||||
+ print(" --help Show this help and exit")
|
||||
+ print(" --version Show version and copyright information")
|
||||
+ print()
|
||||
+ print("ENVIRONMENT specifies a list of environments for which to run autostart")
|
||||
+ print("applications. If none are specified, only applications which do not ")
|
||||
+ print("limit themselves to certain environments will be run.")
|
||||
+ print()
|
||||
+ print("ENVIRONMENT can be one or more of:")
|
||||
+ print(" GNOME Gnome Desktop")
|
||||
+ print(" KDE KDE Desktop")
|
||||
+ print(" ROX ROX Desktop")
|
||||
+ print(" XFCE XFCE Desktop")
|
||||
+ print(" Old Legacy systems")
|
||||
+ print()
|
||||
|
||||
def show_version():
|
||||
- print ME, VERSION
|
||||
- print "Copyright (c) 2008 Dana Jansens"
|
||||
- print
|
||||
+ print(ME, VERSION)
|
||||
+ print("Copyright (c) 2008 Dana Jansens")
|
||||
+ print()
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -0,0 +1,113 @@
|
||||
diff -up openbox-3.6.1/data/autostart/openbox-xdg-autostart.python3 openbox-3.6.1/data/autostart/openbox-xdg-autostart
|
||||
--- openbox-3.6.1/data/autostart/openbox-xdg-autostart.python3 2013-04-17 14:27:27.000000000 +0200
|
||||
+++ openbox-3.6.1/data/autostart/openbox-xdg-autostart 2018-04-17 15:52:23.849765020 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
|
||||
# openbox-xdg-autostart runs things based on the XDG autostart specification
|
||||
# Copyright (C) 2008 Dana Jansens
|
||||
@@ -28,9 +28,9 @@ try:
|
||||
from xdg.DesktopEntry import DesktopEntry
|
||||
from xdg.Exceptions import ParsingError
|
||||
except ImportError:
|
||||
- print
|
||||
- print >>sys.stderr, "ERROR:", ME, "requires PyXDG to be installed"
|
||||
- print
|
||||
+ print()
|
||||
+ print("ERROR:", ME, "requires PyXDG to be installed", file=sys.stderr)
|
||||
+ print()
|
||||
sys.exit(1)
|
||||
|
||||
def main(argv=sys.argv):
|
||||
@@ -51,7 +51,7 @@ def main(argv=sys.argv):
|
||||
try:
|
||||
autofile = AutostartFile(path)
|
||||
except ParsingError:
|
||||
- print "Invalid .desktop file: " + path
|
||||
+ print("Invalid .desktop file: " + path)
|
||||
else:
|
||||
if not autofile in files:
|
||||
files.append(autofile)
|
||||
@@ -99,9 +99,9 @@ class AutostartFile:
|
||||
|
||||
def _alert(self, str, info=False):
|
||||
if info:
|
||||
- print "\t ", str
|
||||
+ print("\t ", str)
|
||||
else:
|
||||
- print "\t*", str
|
||||
+ print("\t*", str)
|
||||
|
||||
def _showInEnvironment(self, envs, verbose=False):
|
||||
default = not self.de.getOnlyShowIn()
|
||||
@@ -146,9 +146,9 @@ class AutostartFile:
|
||||
|
||||
def display(self, envs):
|
||||
if self._shouldRun(envs):
|
||||
- print "[*] " + self.de.getName()
|
||||
+ print("[*] " + self.de.getName())
|
||||
else:
|
||||
- print "[ ] " + self.de.getName()
|
||||
+ print("[ ] " + self.de.getName())
|
||||
self._alert("File: " + self.path, info=True)
|
||||
if self.de.getExec():
|
||||
self._alert("Executes: " + self.de.getExec(), info=True)
|
||||
@@ -165,33 +165,33 @@ class AutostartFile:
|
||||
os.chdir(here)
|
||||
|
||||
def show_help():
|
||||
- print "Usage:", ME, "[OPTION]... [ENVIRONMENT]..."
|
||||
- print
|
||||
- print "This tool will run xdg autostart .desktop files"
|
||||
- print
|
||||
- print "OPTIONS"
|
||||
- print " --list Show a list of the files which would be run"
|
||||
- print " Files which would be run are marked with an asterix"
|
||||
- print " symbol [*]. For files which would not be run,"
|
||||
- print " information is given for why they are excluded"
|
||||
- print " --help Show this help and exit"
|
||||
- print " --version Show version and copyright information"
|
||||
- print
|
||||
- print "ENVIRONMENT specifies a list of environments for which to run autostart"
|
||||
- print "applications. If none are specified, only applications which do not "
|
||||
- print "limit themselves to certain environments will be run."
|
||||
- print
|
||||
- print "ENVIRONMENT can be one or more of:"
|
||||
- print " GNOME Gnome Desktop"
|
||||
- print " KDE KDE Desktop"
|
||||
- print " ROX ROX Desktop"
|
||||
- print " XFCE XFCE Desktop"
|
||||
- print " Old Legacy systems"
|
||||
+ print("Usage:", ME, "[OPTION]... [ENVIRONMENT]...")
|
||||
+ print()
|
||||
+ print("This tool will run xdg autostart .desktop files")
|
||||
+ print()
|
||||
+ print("OPTIONS")
|
||||
+ print(" --list Show a list of the files which would be run")
|
||||
+ print(" Files which would be run are marked with an asterix")
|
||||
+ print(" symbol [*]. For files which would not be run,")
|
||||
+ print(" information is given for why they are excluded")
|
||||
+ print(" --help Show this help and exit")
|
||||
+ print(" --version Show version and copyright information")
|
||||
+ print()
|
||||
+ print("ENVIRONMENT specifies a list of environments for which to run autostart")
|
||||
+ print("applications. If none are specified, only applications which do not ")
|
||||
+ print("limit themselves to certain environments will be run.")
|
||||
+ print
|
||||
+ print("ENVIRONMENT can be one or more of:")
|
||||
+ print(" GNOME Gnome Desktop")
|
||||
+ print(" KDE KDE Desktop")
|
||||
+ print(" ROX ROX Desktop")
|
||||
+ print(" XFCE XFCE Desktop")
|
||||
+ print(" Old Legacy systems")
|
||||
print
|
||||
|
||||
def show_version():
|
||||
- print ME, VERSION
|
||||
- print "Copyright (c) 2008 Dana Jansens"
|
||||
+ print(ME, VERSION)
|
||||
+ print("Copyright (c) 2008 Dana Jansens")
|
||||
print
|
||||
|
||||
if __name__ == "__main__":
|
||||
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
|
||||
|
||||
<Menu>
|
||||
<Name>Terminals</Name>
|
||||
|
||||
<!-- Read standard .desktop file locations -->
|
||||
<DefaultAppDirs/>
|
||||
|
||||
<!-- Read in overrides and child menus from applications.d -->
|
||||
<DefaultMergeDirs/>
|
||||
|
||||
<Include>
|
||||
<Category>TerminalEmulator</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
@@ -0,0 +1,108 @@
|
||||
#!/usr/bin/python3
|
||||
#
|
||||
# Copyright (C) 2008 Red Hat, Inc.
|
||||
#
|
||||
# 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 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author(s): Luke Macken <lmacken@redhat.com>
|
||||
# Miroslav Lichvar <mlichvar@redhat.com>
|
||||
# Edward Sheldrake <ejsheldrake@gmail.com>
|
||||
|
||||
|
||||
import xdg.Menu, xdg.DesktopEntry, xdg.Config
|
||||
import re, sys, os
|
||||
from xml.sax.saxutils import escape
|
||||
|
||||
icons = True
|
||||
try:
|
||||
import gi
|
||||
gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk
|
||||
except ImportError:
|
||||
icons = False
|
||||
|
||||
def icon_attr(entry):
|
||||
if icons is False:
|
||||
return ''
|
||||
|
||||
name = entry.getIcon()
|
||||
|
||||
if os.path.exists(name):
|
||||
return ' icon="' + name + '"'
|
||||
|
||||
# work around broken .desktop files
|
||||
# unless the icon is a full path it should not have an extension
|
||||
name = re.sub('\..{3,4}$', '', name)
|
||||
|
||||
# imlib2 cannot load svg
|
||||
iconinfo = theme.lookup_icon(name, 22, Gtk.IconLookupFlags.NO_SVG)
|
||||
if iconinfo:
|
||||
iconfile = iconinfo.get_filename()
|
||||
if hasattr(iconinfo, 'free'):
|
||||
iconinfo.free()
|
||||
if iconfile:
|
||||
return ' icon="' + iconfile + '"'
|
||||
return ''
|
||||
|
||||
def escape_utf8(s):
|
||||
if sys.version_info[0] < 3 and isinstance(s, unicode):
|
||||
s = s.encode('utf-8', 'xmlcharrefreplace')
|
||||
return escape(s)
|
||||
|
||||
def entry_name(entry):
|
||||
return escape_utf8(entry.getName())
|
||||
|
||||
def walk_menu(entry):
|
||||
if isinstance(entry, xdg.Menu.Menu) and entry.Show is True:
|
||||
print('<menu id="%s" label="%s"%s>' \
|
||||
% (entry_name(entry),
|
||||
entry_name(entry),
|
||||
escape_utf8(icon_attr(entry))))
|
||||
list(map(walk_menu, entry.getEntries()))
|
||||
print('</menu>')
|
||||
elif isinstance(entry, xdg.Menu.MenuEntry) and entry.Show is True:
|
||||
name = entry_name(entry.DesktopEntry)
|
||||
print(' <item label="%s"%s>' % (name.replace('"', ''),
|
||||
escape_utf8(icon_attr(entry.DesktopEntry))))
|
||||
command = re.sub(' -caption "%c"| -caption %c',
|
||||
' -caption "%s"' % name,
|
||||
escape_utf8(entry.DesktopEntry.getExec()))
|
||||
command = re.sub(' [^ ]*%[fFuUdDnNickvm]', '', command)
|
||||
if entry.DesktopEntry.getTerminal():
|
||||
command = 'xterm -title "%s" -e %s' % (name, command)
|
||||
print(' <action name="Execute">' + \
|
||||
'<command>%s</command></action>' % command)
|
||||
print(' </item>')
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
menufile = sys.argv[1] + '.menu'
|
||||
else:
|
||||
menufile = 'applications.menu'
|
||||
|
||||
lang = os.environ.get('LANG')
|
||||
if lang:
|
||||
xdg.Config.setLocale(lang)
|
||||
|
||||
# lie to get the same menu as in GNOME
|
||||
xdg.Config.setWindowManager('GNOME')
|
||||
|
||||
if icons:
|
||||
theme = Gtk.IconTheme.get_default()
|
||||
|
||||
menu = xdg.Menu.parse(menufile)
|
||||
|
||||
print('<?xml version="1.0" encoding="UTF-8"?>')
|
||||
print('<openbox_pipe_menu>')
|
||||
list(map(walk_menu, menu.getEntries()))
|
||||
print('</openbox_pipe_menu>')
|
||||
@@ -33,6 +33,10 @@
|
||||
<Patch>openbox-3.5.0-which-2.20.patch</Patch>
|
||||
<Patch>openbox-3.5.0-title-matching.patch</Patch>
|
||||
<Patch>openbox-default-theme.patch</Patch>
|
||||
|
||||
<Patch>openbox-3.5.2-gnome-session.patch</Patch>
|
||||
<Patch>openbox-3.6.1-py3-xdg.patch</Patch>
|
||||
<!-- <Patch>openbox-python3.patch</Patch> -->
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -76,8 +80,11 @@
|
||||
<AdditionalFile owner="root" permission="0755" target="/usr/bin/obmenu-generator">obmenu-generator</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0755" target="/etc/xdg/obmenu-generator/schema.pl">schema.pl</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/xdg/openbox/menu.xml">menu.xml</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/xdg/openbox/autostart">autostart</AdditionalFile>
|
||||
<!-- <AdditionalFile owner="root" permission="0644" target="/etc/xdg/openbox/autostart">autostart</AdditionalFile> -->
|
||||
<AdditionalFile owner="root" permission="0644" target="/usr/share/openbox/kedicik.png">kedicik.png</AdditionalFile>
|
||||
|
||||
<AdditionalFile owner="root" permission="0755" target="/usr/libexec/openbox-xdg-menu">xdg-menu</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/xdg/openbox/terminals.menu">terminals.menu</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
</Package>
|
||||
|
||||
@@ -100,6 +107,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="4">
|
||||
<Date>2021-12-13</Date>
|
||||
<Version>3.6.1</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="3">
|
||||
<Date>2020-01-25</Date>
|
||||
<Version>3.6.1</Version>
|
||||
|
||||
Reference in New Issue
Block a user