public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Andreas Bierfert <awjb@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/fluxbox] epel9: - enable nls and imlib2
Date: Mon, 09 Nov 2026 11:54:03 GMT	[thread overview]
Message-ID: <179422524325.1.1645858637215743181.rpms-fluxbox-e372ea5fe259@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/fluxbox
            Branch : epel9
            Commit : e372ea5fe259ecd8583596fada76f53089501fc9
            Author : Andreas Bierfert <awjb@fedoraproject.org>
            Date   : 2005-11-29T15:56:10+00:00
            Stats  : +254/-39 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/fluxbox/c/e372ea5fe259ecd8583596fada76f53089501fc9?branch=epel9

            Log:
            - enable nls and imlib2
- require artwizaleczepka instead of providing it...
- add menu script from Rudolf Kastel (- devel: switch to modular x BR)

---
diff --git a/fluxbox-xdg-menu.py b/fluxbox-xdg-menu.py
new file mode 100644
index 0000000..e2fc47e
--- /dev/null
+++ b/fluxbox-xdg-menu.py
@@ -0,0 +1,224 @@
+#!/usr/bin/python2
+"""Menu Generator for Fluxbox
+
+Generates a menu for Fluxbox using the freedesktop.org standards
+
+Usage: fluxbox-fdo-menugen.py [options]
+
+Options:
+  -l ..., --lang=...      create the menu using a language. Default = $LANG
+  -h, --help              show this help
+  -f ..., --file=...      output the menu into a file. Default = ~/.fluxbox/menu
+  --with-icons         do not put icons for applications in the menu
+  --stdout                output the menu to standard output
+
+"""
+
+__author__ = "Rudolf Kastl , Antonio Gomes"
+__version__ = "$Revision: 1.0 $"
+__date__ = "$Date: 2005/04/09 17:46:19 $"
+__license__ = "GPL"
+
+
+import os,re,sys,glob,getopt
+import xdg.Menu,xdg.DesktopEntry,xdg.IconTheme
+
+def usage():
+	print __doc__
+
+def header(wm="fluxbox"):
+	return """
+[begin] (Fluxbox)
+	[exec] (Web Browser) {htmlview}
+	[exec] (Email) {evolution}
+	[exec] (Terminal) {gnome-terminal}
+	[exec] (Irc) {xchat}
+	[separator]\n"""
+
+def footer(wm="fluxbox"):
+	return """
+	[submenu] (Fluxbox Menu)
+		[config] (Configure)
+		[submenu] (System Styles) {Choose a style...}
+			[stylesdir] (/usr/share/fluxbox/styles)
+			[stylesdir] (/usr/share/commonbox/styles/)
+		[end]
+		[submenu] (User Styles) {Choose a style...}
+			[stylesdir] (~/.fluxbox/styles)
+		[end]
+		[workspaces]   (Workspace List)
+		[submenu] (Tools)
+			[exec] (Window name) {xprop WM_CLASS|cut -d \" -f 2|xmessage -file - -center}
+			[exec] (Screenshot - JPG) {import screenshot.jpg && display -resize 50% screenshot.jpg}
+			[exec] (Screenshot - PNG) {import screenshot.png && display -resize 50% screenshot.png}
+			[exec] (Run) {fbrun }
+			[exec] (Regen Menu) {fluxbox-generate_menu --with-icons}
+		[end]
+		[submenu] (Window)
+			[restart] (kde) {startkde}
+			[restart] (openbox) {openbox}
+			[restart] (gnome) {gnome-session}
+		[end]
+		[exec] (Lock screen) {xscreensaver-command -lock}
+		[commanddialog] (Fluxbox Command)
+		[reconfig] (Reload config)
+		[restart] (Restart)
+		[separator]
+		[exit] (Exit)
+	[end]
+[end]\n"""	
+
+def checkWm(entry, wm="fluxbox"):
+	if entry.DesktopEntry.getOnlyShowIn() != []:
+		entry.Show = False
+	if entry.DesktopEntry.getNotShowIn() != []:
+		if isinstance(entry, xdg.Menu.MenuEntry):
+			if wm in entry.DesktopEntry.getNotShowIn():
+				entry.Show = False
+			else:
+				entry.Show = True 
+	
+#def findIcon(icon):
+#	"""Finds the path and filename for the given icon name
+#		e.g. gaim --> /usr/share/pixmaps/gaim.png
+#		e.g. fart.png --> /usr/share/pixmaps/fart.png
+#	"""
+#	if os.path.isfile(icon): return icon
+#	paths = ["~/.icons","/usr/share/pixmaps","/usr/share/icons"]
+#	for path in paths:
+#		for dirpath , dirnames, filenames in os.walk(os.path.expanduser(path)):
+#			for filename in filenames:
+#				pattern = '^%s\.(png|jpg|gif|xpm)' % icon # matches <filename>.<something>
+#				if icon == filename or re.search(pattern, filename):
+#					return os.path.join(dirpath,filename)
+
+
+def findIcon(icon):
+	"""Finds the path and filename for the given icon name
+		e.g. gaim --> /usr/share/pixmaps/gaim.png
+		e.g. fart.png --> /usr/share/pixmaps/fart.png
+	"""
+	global paths
+	global locs
+
+	# Case Icon=/path/to/file.extension
+	if os.path.isfile(icon): return icon
+
+
+	# Case Icon=file.extension	
+
+	if re.search("^\w+.*\.\w{3}$",icon):
+		names=[icon]
+	# Case Icon=file
+	elif re.search("^\w+.*$",icon):
+		names=[icon+".png",icon+".xpm",icon+".jpg"]
+	else:
+		names=[]
+
+	for path in paths:	
+		for name in names:
+			if (os.path.isfile(path+name)):
+				locs.append(path)
+				return (path+name).encode('utf8')
+
+
+def parseMenu(menu,depth=1):
+	global wm
+	global use_icons
+	if use_icons:
+		print "%s[submenu] (%s) <%s> " % ( (depth*"\t"), menu.getName().encode('utf8'), findIcon(menu.getIcon()) )
+	else:
+		print "%s[submenu] (%s) " % ( (depth*"\t"), menu.getName().encode('utf8'), )
+	depth += 1
+	for entry in menu.getEntries():
+		if isinstance(entry, xdg.Menu.Menu):
+			parseMenu(entry,depth)
+		elif isinstance(entry, xdg.Menu.MenuEntry):
+			checkWm(entry,wm)
+			if entry.Show == False: continue
+			if use_icons:
+				print "%s[exec] (%s) {%s} <%s> " % ( (depth*"\t"), entry.DesktopEntry.getName().encode("utf8"), entry.DesktopEntry.getExec().split()[0], findIcon(entry.DesktopEntry.getIcon()) )
+			else:
+				print "%s[exec] (%s) {%s} " % ( (depth*"\t"), entry.DesktopEntry.getName().encode("utf8"), entry.DesktopEntry.getExec().split()[0] )
+		elif isinstance(entry,xdg.Menu.Separator):
+			print "%s[separator]" % (depth*"\t")
+		elif isinstance(entry.xdg.Menu.Header):
+			print "%s%s" % ( (depth*"\t"), entry.Name )
+	depth -= 1
+	print "%s[end]" % (depth*"\t")
+
+
+def main(argv):
+# Setting the default values
+	global locs
+	locs=[]
+	global wm
+	wm = "fluxbox"
+	global file
+	file = "~/.fluxbox/menu"
+	global use_icons
+	use_icons = False
+	lang = os.getenv("LANG","C")
+	file = os.path.expanduser("~/.fluxbox/menu")
+	
+	try:
+		opts, args = getopt.getopt(argv, "hf:dl:d", ["help","lang=","file=","with-icons","stdout"])
+	except getopt.GetoptError:
+		usage()
+		sys.exit(2)
+	for opt, arg in opts:
+		if opt in ("-h", "--help"):
+			usage()
+			sys.exit()
+		elif opt in ("-l", "--lang"):
+			lang = arg
+		elif opt in ("-f", "--file"):
+			file = os.path.expanduser(arg)
+		elif opt == '--with-icons':
+			use_icons = True		
+			global paths
+			locations = \
+			['/usr/share/pixmaps/', \
+			'/usr/share/icons/hicolor/24x24/apps/', \
+			'/usr/share/icons/hicolor/32x32/apps/', \
+			'/usr/share/icons/hicolor/48x48/apps/', \
+			'/usr/share/icons/hicolor/24x24/stock/generic/', \
+			'/usr/share/icons/HighContrastLargePrintInverse/48x48/apps/', \
+			'/usr/share/icons/crystalsvg/16x16/apps/', \
+			'/usr/share/icons/crystalsvg/32x32/apps/', \
+			'/usr/share/icons/crystalsvg/48x48/apps/', \
+			'/usr/share/icons/crystalsvg/48x48/devices/', \
+			'/usr/share/icons/', \
+			'/usr/share/icons/hicolor/32x32/apps/', \
+			'/usr/share/icons/Bluecurve/24x24/stock/', \
+			'/usr/share/icons/Bluecurve/48x48/filesystems/']
+			paths=locations
+#			for path in locations:
+#				paths+=glob.glob(path+"/*/")+glob.glob(path+"/*/*/")
+#			print paths
+		elif opt == '--stdout':
+			file = sys.stdout
+
+
+	fsock = open(file,'w')
+	saveout = sys.stdout
+	sys.stdout = fsock
+
+	menu=xdg.Menu.parse()
+# is done automatically now
+#	menu.setLocale(lang)
+
+	print header()
+	parseMenu(menu)
+	print footer()
+
+	sys.stdout = saveout
+#	print menu
+if __name__ == "__main__":
+	main(sys.argv[1:])
+
+#WindowMaker Reminder
+#>>> p=re.compile("(\).*),(\s*\))")
+#>>> p.search("((ola),(ola),)").groups()
+#('),(ola)', ')')
+

diff --git a/fluxbox.spec b/fluxbox.spec
index bd0356a..f822f6b 100644
--- a/fluxbox.spec
+++ b/fluxbox.spec
@@ -1,6 +1,6 @@
 Name:           fluxbox
 Version:        0.9.14
-Release:        1%{?dist}
+Release:        2%{?dist}
 
 Summary:	Window Manager based on Blackbox
 
@@ -12,14 +12,23 @@ Source0:        http://download.sourceforge.net/fluxbox/fluxbox-0.9.14.tar.bz2
 Source1:        Xclients.%{name}
 Source2:        FluxBox
 Source3:        fluxbox.desktop
-Source4:        artwiz-aleczapka.tar.bz2
+Source4:        fluxbox-xdg-menu.py
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot
-BuildRequires:	xorg-x11-devel
-Buildrequires:	zlib-devel
-Requires(post):   chkfontpath
-Requires(postun): chkfontpath
-
+BuildRequires:  imlib2-devel
+BuildRequires:	zlib-devel
+BuildRequires:  libICE-devel
+BuildRequires:  libSM-devel
+BuildRequires:  libX11-devel
+BuildRequires:  libXext-devel
+BuildRequires:  libXft-devel
+BuildRequires:  libXinerama-devel
+BuildRequires:  libXpm-devel
+BuildRequires:  libXrandr-devel
+BuildRequires:  libXrender-devel
+
+Requires(post): python
+Requires:       artwiz-aleczapka-fonts
 
 %description
 
@@ -38,7 +47,9 @@ Have a look at the homepage for more info ;)
 %configure      --enable-xft \
                 --enable-gnome \
                 --enable-kde \
-                --enable-xinerama
+                --enable-xinerama \
+		--enable-imlib2 \
+		--enable-nls
 
 make %{?_smp_mflags}
 
@@ -49,44 +60,20 @@ make install DESTDIR=$RPM_BUILD_ROOT
 
 # make gdm users happy
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/apps/switchdesk/
-install -m 0755 %SOURCE1 $RPM_BUILD_ROOT%{_datadir}/apps/switchdesk/
+install -m 0755 -p %SOURCE1 $RPM_BUILD_ROOT%{_datadir}/apps/switchdesk/
 
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/gdm/Sessions
-install -m 0755 %SOURCE2 $RPM_BUILD_ROOT%{_sysconfdir}/X11/gdm/Sessions/
+install -m 0755 -p %SOURCE2 $RPM_BUILD_ROOT%{_sysconfdir}/X11/gdm/Sessions/
 
 # this is for Fedora Core
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/dm/Sessions
-install -m 0755 %SOURCE3 $RPM_BUILD_ROOT%{_sysconfdir}/X11/dm/Sessions/
+install -m 0755 -p %SOURCE3 $RPM_BUILD_ROOT%{_sysconfdir}/X11/dm/Sessions/
 
-# artwiz fonts
-mkdir -p $RPM_BUILD_ROOT%{_libdir}/X11/fonts/
-tar xjf %SOURCE4 -C $RPM_BUILD_ROOT%{_libdir}/X11/fonts/
+install -m 0755 -p %SOURCE4 $RPM_BUILD_ROOT%{_bindir}/fluxbox-xdg-menu
 
 %post
 # New menu-system
-%{_bindir}/fluxbox-generate_menu \
-	-kg -in -ds\
-	-p %{_usr} \
-	-o %{_datadir}/fluxbox/menu \
-	-m Fluxbox-0.9.14 2>&1 > /dev/null
-
-
-#artwiz fontz
-cd %{_libdir}/X11/fonts/artwiz-aleczapka
-fc-cache -f ./
-%{_sbindir}/chkfontpath -q -a %{_libdir}/X11/fonts/artwiz-aleczapka:unscaled
-
-tmp=`fgrep "<dir>%{_libdir}/X11/fonts/artwiz-aleczapka</dir>" %{_sysconfdir}/fonts/local.conf`
-if [ -z "$tmp" ];
-	then sed -i "s,</fontconfig>,<dir>%{_libdir}/X11/fonts/artwiz-aleczapka</dir>\n</fontconfig>," %{_sysconfdir}/fonts/local.conf
-fi
-
-%postun
-if [ "$1" -eq "0" ]; then # complete removal, not upgrade
-	%{_sbindir}/chkfontpath -q -r %{_libdir}/X11/fonts/artwiz-aleczapka;
-	sed -i "\%<dir>%{_libdir}/X11/fonts/artwiz-aleczapka</dir>%d" %{_sysconfdir}/fonts/local.conf
-fi
-
+%{_bindir}/fluxbox-xdg-menu --with-icons
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -102,9 +89,13 @@ rm -rf $RPM_BUILD_ROOT
 %{_sysconfdir}/X11/gdm/Sessions/FluxBox
 %{_sysconfdir}/X11/dm/Sessions/fluxbox.desktop
 
-%{_libdir}/X11/fonts/artwiz-aleczapka
-
 %changelog
+* Thu Nov 10 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
+0.9.14-2
+- enable nls and imlib2
+- require artwizaleczepka instead of providing it...
+- add menu script from Rudolf Kastel
+
 * Thu Sep 15 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
 0.9.14-1
 - version upgrade

                 reply	other threads:[~2026-11-09 11:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179422524325.1.1645858637215743181.rpms-fluxbox-e372ea5fe259@fedoraproject.org \
    --to=awjb@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox