aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-10-09 17:57:05 -0400
committerB. Stack <bgstack15@gmail.com>2022-10-09 17:57:05 -0400
commita7738f4dc72c9445623cd6f5348d7a80d4e52690 (patch)
treeb336daf9b226783c39e6e985410cecf46484de3d /debian
downloadfbxkb-a7738f4dc72c9445623cd6f5348d7a80d4e52690.tar.gz
fbxkb-a7738f4dc72c9445623cd6f5348d7a80d4e52690.tar.bz2
fbxkb-a7738f4dc72c9445623cd6f5348d7a80d4e52690.zip
initial commit, straight from apt-get source
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog54
-rw-r--r--debian/control20
-rw-r--r--debian/copyright29
-rw-r--r--debian/dirs2
-rw-r--r--debian/docs1
-rw-r--r--debian/menu2
-rw-r--r--debian/patches/cross.patch14
-rw-r--r--debian/patches/debian-changes-0.6-1.1.patch163
-rw-r--r--debian/patches/dont-forcibly-strip.patch15
-rw-r--r--debian/patches/drop-extra-deps.patch13
-rw-r--r--debian/patches/fix-for-dh.patch20
-rw-r--r--debian/patches/replace-deprecated-gtk.patch63
-rw-r--r--debian/patches/respect-dpkg-buildflags.patch26
-rw-r--r--debian/patches/series10
-rw-r--r--debian/patches/show-us-flag.patch14
-rw-r--r--debian/patches/spelling.patch37
-rw-r--r--debian/patches/use-g_strdup.patch25
-rwxr-xr-xdebian/rules11
-rw-r--r--debian/source/format1
-rw-r--r--debian/watch2
20 files changed, 522 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..0c3bf08
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,54 @@
+fbxkb (0.6-3) unstable; urgency=medium
+
+ [ Andreas Beckmann ]
+ * QA upload.
+ * Set Maintainer to Debian QA Group. (See: #980961) (Closes: #978624)
+ * Switch to debhelper-compat (= 13).
+
+ [ Helmut Grohne ]
+ * Fix FTCBFS: (Closes: #901152)
+ + cross.patch: make pkg-config substitutable.
+ + Use the makefile build system as configure does not set up compilers.
+
+ -- Andreas Beckmann <anbe@debian.org> Mon, 25 Jan 2021 20:58:57 +0100
+
+fbxkb (0.6-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Add dependency on libgdk-pixbuf-xlib-2.0-dev. (Closes: #975673)
+ - The dependency also fixes FTBFS with gtk/gtk.h. (Closes: #975771)
+
+ -- Sudip Mukherjee <sudipm.mukherjee@gmail.com> Mon, 14 Dec 2020 20:31:49 +0000
+
+fbxkb (0.6-2) unstable; urgency=low
+
+ * New maintainer (Closes: #767970)
+ * Fix parsing of keyboard info, to show proper "us" flag. (Closes: #412254)
+ * Use g_strdup() before passing strings to g_hash_table_insert(),
+ to avoid use-after-free.
+ * Remove deprecated gtk_set_locale() and change deprecated gdk_window_lookup()
+ to gdk_x11_window_lookup_for_display().
+ This fixes "pointer-trouble-at-implicit" lintian error.
+ * Don't unconditionally strip fbxkb binary (Closes: #436824)
+ * Removed unnecessary dependencies.
+ * Added homepage, debian/watch, machine-readable debian/copyright.
+ * Switched to source format 3.0 (quilt)
+ * Bumped Standards-Version to 3.9.6
+
+ -- Dmitry Borisyuk <q1werty@i.com.ua> Wed, 05 Nov 2014 17:38:46 +0200
+
+fbxkb (0.6-1.1) unstable; urgency=low
+
+ * Non-maintainer upload. (Patch by Mònica Ramírez Arceda <monica@probeta.net>)
+ * eggtrayicon.c, fbxkb.c: Replace deprecated gdk_display and GDK_DISPLAY()
+ with gdk_x11_get_default_xdisplay().
+ * Link to X11 to build with binutils-gold. (Closes: #554280)
+
+ -- Konstantinos Margaritis <markos@debian.org> Fri, 31 Jan 2012 13:46:19 +0200
+
+fbxkb (0.6-1) unstable; urgency=low
+
+ * Initial Release.
+ * The correct manual page was added.
+
+ -- Vadim Vatlin <vatlin@sthbel.ru> Wed, 10 Jan 2007 17:29:30 +0300
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..6b212a9
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,20 @@
+Source: fbxkb
+Section: x11
+Priority: optional
+Maintainer: Debian QA Group <packages@qa.debian.org>
+Build-Depends:
+ debhelper-compat (= 13),
+ libgtk2.0-dev,
+ libxmu-dev,
+ libgdk-pixbuf-xlib-2.0-dev,
+Rules-Requires-Root: no
+Standards-Version: 3.9.6
+Homepage: http://fbxkb.sourceforge.net
+
+Package: fbxkb
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: X11 keyboard indicator and switcher
+ It shows a flag of current keyboard in a systray area and
+ allows you to switch to another one. It's written in C and
+ uses the GTK+2.4 library only (no GNOME is needed).
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..2eb8e07
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,29 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: fbxkb
+Upstream-Contact: Anatoly Asviyan <aanatoly@users.sf.net>
+Source: http://fbxkb.sf.net/
+Comment:
+ This package was debianized by Vadim Vatlin <vatlin@sthbel.ru> on
+ Wed, 10 Jan 2007 17:29:30 +0300.
+
+Files: *
+Copyright: Copyright (C) 2002 Anatoly Asviyan (aka Arsen)
+ Copyright (C) 2000 Peter Zelezny
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without
+ limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to
+ whom the Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+ SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000..254c543
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/fbxkb/images
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..168e5d2
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+CREDITS
diff --git a/debian/menu b/debian/menu
new file mode 100644
index 0000000..f8e1243
--- /dev/null
+++ b/debian/menu
@@ -0,0 +1,2 @@
+?package(fbxkb):needs="X11" section="Applications/System/Hardware"\
+ title="fbxkb" command="/usr/bin/fbxkb"
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch
new file mode 100644
index 0000000..15575ea
--- /dev/null
+++ b/debian/patches/cross.patch
@@ -0,0 +1,14 @@
+--- fbxkb-0.6.orig/Makefile.common
++++ fbxkb-0.6/Makefile.common
+@@ -20,8 +20,9 @@
+ endif
+
+ CC = gcc
+-LIBS = -lX11 $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu
+-INCS = $(shell pkg-config --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0)
++PKG_CONFIG ?= pkg-config
++LIBS = -lX11 $(shell $(PKG_CONFIG) --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu
++INCS = $(shell $(PKG_CONFIG) --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0)
+ CFLAGS ?= -O2 # overwriten by command line or env. variable
+ CFLAGS += -Wall # always nice to have
+ ifneq (,$(DEVEL))
diff --git a/debian/patches/debian-changes-0.6-1.1.patch b/debian/patches/debian-changes-0.6-1.1.patch
new file mode 100644
index 0000000..44046ed
--- /dev/null
+++ b/debian/patches/debian-changes-0.6-1.1.patch
@@ -0,0 +1,163 @@
+Description: changes in version 0.6-1.1
+ * Non-maintainer upload. (Patch by Mònica Ramírez Arceda <monica@probeta.net>)
+ * eggtrayicon.c, fbxkb.c: Replace deprecated gdk_display and GDK_DISPLAY()
+ with gdk_x11_get_default_xdisplay().
+ * Link to X11 to build with binutils-gold. (Closes: #554280)
+Author: Konstantinos Margaritis <markos@debian.org>
+Bug-Debian: https://bugs.debian.org/554280
+--- fbxkb-0.6.orig/fbxkb.c
++++ fbxkb-0.6/fbxkb.c
+@@ -456,7 +456,7 @@ init()
+
+ ENTER;
+ sym2pix = g_hash_table_new(g_str_hash, (GEqualFunc) my_str_equal);
+- dpy = GDK_DISPLAY();
++ dpy = gdk_x11_get_default_xdisplay();
+ a_XKB_RULES_NAMES = XInternAtom(dpy, "_XKB_RULES_NAMES", False);
+ if (a_XKB_RULES_NAMES == None)
+ ERR("_XKB_RULES_NAMES - can't get this atom\n");
+@@ -536,7 +536,7 @@ Xerror_handler(Display * d, XErrorEvent
+ char buf[256];
+
+ ENTER;
+- XGetErrorText(GDK_DISPLAY(), ev->error_code, buf, 256);
++ XGetErrorText(gdk_x11_get_default_xdisplay(), ev->error_code, buf, 256);
+ ERR( "fbxkb : X error: %s\n", buf);
+ RET();
+ }
+--- fbxkb-0.6.orig/eggtrayicon.c
++++ fbxkb-0.6/eggtrayicon.c
+@@ -153,7 +153,7 @@ egg_tray_icon_send_manager_message (EggT
+ #if HAVE_GTK_MULTIHEAD
+ display = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
+ #else
+- display = gdk_display;
++ display = gdk_x11_get_default_xdisplay();
+ #endif
+
+ gdk_error_trap_push ();
+@@ -181,7 +181,7 @@ egg_tray_icon_update_manager_window (Egg
+ #if HAVE_GTK_MULTIHEAD
+ xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
+ #else
+- xdisplay = gdk_display;
++ xdisplay = gdk_x11_get_default_xdisplay();
+ #endif
+
+ if (icon->manager_window != None)
+@@ -300,7 +300,7 @@ egg_tray_icon_new_for_screen (GdkScreen
+ EggTrayIcon*
+ egg_tray_icon_new (const gchar *name)
+ {
+- return egg_tray_icon_new_for_xscreen (DefaultScreenOfDisplay (gdk_display), name);
++ return egg_tray_icon_new_for_xscreen (DefaultScreenOfDisplay (gdk_x11_get_default_xdisplay()), name);
+ }
+
+ guint
+@@ -338,7 +338,7 @@ egg_tray_icon_send_message (EggTrayIcon
+ #if HAVE_GTK_MULTIHEAD
+ xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
+ #else
+- xdisplay = gdk_display;
++ xdisplay = gdk_x11_get_default_xdisplay();
+ #endif
+
+ ev.type = ClientMessage;
+--- fbxkb-0.6.orig/man/Makefile
++++ fbxkb-0.6/man/Makefile
+@@ -20,9 +20,8 @@ clean:
+
+
+ install: all
+-# install -d $(PREFIX)/share/man/man1
+-# install -m 644 $(TARGET) $(PREFIX)/share/man/man1
++ install -d $(PREFIX)/share/man/man1
++ install -m 644 $(TARGET) $(PREFIX)/share/man/man1
+
+ uninstall:
+-# rm -f $(PREFIX)/share/man/man1/$(TARGET)
+-
++ rm -f $(PREFIX)/share/man/man1/$(TARGET)
+--- fbxkb-0.6.orig/man/fbxkb.1
++++ fbxkb-0.6/man/fbxkb.1
+@@ -1,70 +1,25 @@
+ .\" man page originally for the Debian/GNU Linux system
+-.TH FBPANEL "1" "February 2004" "fbxkb 2.2" "User Commands"
++.TH FBXKB "1" "January 2007" "fbxkb 0.6" "User Commands"
+ .SH NAME
+-fbxkb \- a lightweight GTK2-based panel for UNIX desktop.
++fbxkb \- a lightweight X11 keyboard switcher.
+ .SH SYNOPSIS
+ .B fbxkb
+-[\fIOPTION\fR]
+ .br
+ .SH DESCRIPTION
+ .PP
+-fbxkb is desktop panel which provides graphical information and feedback about
+-desktop activity and allows interaction with the window manager.
+-It features:
+-.HP
+-\(bu taskbar \- shows a list of the managed windows (tasks)
+-.HP
+-\(bu pager \- thumbnailed view of the desktop.
+-.HP
+-\(bu launchbar \- buttons to quickly launch applications
+-.HP
+-\(bu show desktop \- button to iconify or shade all windows
+-.HP
+-\(bu image \- display an image
+-.HP
+-\(bu clock \- show the current time and/or date
+-.HP
+-\(bu system tray \- tray for XEMBED icons (aka docklets)
+-.PP
+-fbxkb requires NETWM (www.freedesktop.org) compliant window manager.
+-You can run many instances of fbxkb each with its own configuration
+-(see \fBOPTIONS\fR below).
++fbxkb is X11 keyboard switcher, which provides visual information
++about current keyboard. It shows a flag of current keyboard in a
++systray area and allows you to switch to another one.
++
++fbxkb requires NETWM (www.freedesktop.org) compliant window manager.
++It's written in C and uses the GTK+-2.4 library only (no GNOME is needed).
+
+ Most updated info about fbxkb can be found on its home page:
+ http://fbxkb.sf.net/
+-
+ .SH OPTIONS
+ .TP
+-\fB\-h\fR
+-\- print help message and exit.
+-.TP
+-\fB\-v\fR
+-\- print version and exit.
+-.TP
+-\fB\-p <name>\fR
+-\- use the profile <name>. The profile is loaded from the file ~/.fbxkb/<name>.
+-If that fails, fbxkb will load PREFIX/share/fbxkb/<name>. No \fB\-p\fR option is equivalent
+-to \fB\-p default\fR
+-.SH CUSTOMIZATION
+-To change default settings, copy profile file to your home directory
+-.br
+- mkdir -p ~/.fbxkb
+- cp PREFIX/share/fbxkb/default ~/.fbxkb
+-.br
+-and edit it. Default profile file contains comments and explanation inside,
+-so it should be easy. For full list of options please visit fbxkb's home page.
+-
+-.SH FILES
+-.TP
+-PREFIX/share/fbxkb
+-Directory with system-wide resources and default settings
+-.TP
+-~/.fbxkb/
+-Directory with the user's private profiles
+-.TP
+-~/.fbxkb/default
+-The user's default profile.
++fbxkb hasn't options. It just works.
+ .SH AUTHOR
+ fbxkb was written by Anatoly Asviyan <aanatoly@users.sf.net>.
+ This manual page was originally written for the
+-Debian GNU/Linux system by Shyamal Prasad <shyamal@member.fsf.org>.
++Debian GNU/Linux system by Vadim Vatlin <vatlin@sthbel.ru>.
diff --git a/debian/patches/dont-forcibly-strip.patch b/debian/patches/dont-forcibly-strip.patch
new file mode 100644
index 0000000..c8b509b
--- /dev/null
+++ b/debian/patches/dont-forcibly-strip.patch
@@ -0,0 +1,15 @@
+Descrpition: Don't strip fbxkb binary in Makefile, let dh_strip do this
+Author: Dmitry Borisyuk <q1werty@i.com.ua>
+Bug-Debian: https://bugs.debian.org/436824
+--- a/Makefile
++++ b/Makefile
+@@ -31,9 +31,6 @@
+ TARGET = fbxkb
+ $(TARGET): $(OBJ)
+ $(CC) $(LDFLAGS) $(LIBS) $(OBJ) -o $@
+-ifeq (,$(DEVEL))
+- strip $@
+-endif
+
+ all: $(TARGET)
+
diff --git a/debian/patches/drop-extra-deps.patch b/debian/patches/drop-extra-deps.patch
new file mode 100644
index 0000000..4c3957e
--- /dev/null
+++ b/debian/patches/drop-extra-deps.patch
@@ -0,0 +1,13 @@
+Description: use --as-needed linker flag to avoid unnecessary dependencies
+Author: Dmitry Borisyuk <q1werty@i.com.ua>
+--- a/Makefile
++++ b/Makefile
+@@ -30,7 +30,7 @@
+
+ TARGET = fbxkb
+ $(TARGET): $(OBJ)
+- $(CC) $(LDFLAGS) $(LIBS) $(OBJ) -o $@
++ $(CC) $(LDFLAGS) $(OBJ) -Wl,--as-needed $(LIBS) -o $@
+
+ all: $(TARGET)
+
diff --git a/debian/patches/fix-for-dh.patch b/debian/patches/fix-for-dh.patch
new file mode 100644
index 0000000..7bafad2
--- /dev/null
+++ b/debian/patches/fix-for-dh.patch
@@ -0,0 +1,20 @@
+Description: some fixes to make it work with default debian/rules
+ Adjust PREFIX if DESTDIR is defined - for dh_install* to work correctly
+ Linker option -lX11 moved here from debian/rules
+Author: Dmitry Borisyuk <q1werty@i.com.ua>
+--- a/Makefile.common
++++ b/Makefile.common
+@@ -15,8 +15,12 @@
+ endif
+ endif
+
++ifdef DESTDIR
++PREFIX := $(DESTDIR)/$(PREFIX)
++endif
++
+ CC = gcc
+-LIBS = $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu
++LIBS = -lX11 $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu
+ INCS = $(shell pkg-config --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0)
+ CFLAGS ?= -O2 # overwriten by command line or env. variable
+ CFLAGS += -Wall # always nice to have
diff --git a/debian/patches/replace-deprecated-gtk.patch b/debian/patches/replace-deprecated-gtk.patch
new file mode 100644
index 0000000..e4a2f15
--- /dev/null
+++ b/debian/patches/replace-deprecated-gtk.patch
@@ -0,0 +1,63 @@
+Description: Remove deprecated GTK functions
+ Remove gtk_set_locale() and change gdk_window_lookup() to gdk_x11_window_lookup_for_display().
+ Fixes "pointer-trouble-at-implicit" and "pointer-from-integer" warnings.
+Author: Dmitry Borisyuk <q1werty@i.com.ua>
+--- a/eggtrayicon.c
++++ b/eggtrayicon.c
+@@ -111,7 +111,7 @@
+ gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
+ icon->manager_window);
+ #else
+- gdkwin = gdk_window_lookup (icon->manager_window);
++ gdkwin = gdk_x11_window_lookup_for_display (gdk_display_get_default(), icon->manager_window);
+ #endif
+
+ gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
+@@ -120,7 +120,7 @@
+ #if HAVE_GTK_MULTIHEAD
+ root_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
+ #else
+- root_window = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
++ root_window = gdk_x11_window_lookup_for_display (gdk_display_get_default(), gdk_x11_get_default_root_xwindow ());
+ #endif
+
+ gdk_window_remove_filter (root_window, egg_tray_icon_manager_filter, icon);
+@@ -192,7 +192,7 @@
+ gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
+ icon->manager_window);
+ #else
+- gdkwin = gdk_window_lookup (icon->manager_window);
++ gdkwin = gdk_x11_window_lookup_for_display (gdk_display_get_default(), icon->manager_window);
+ #endif
+
+ gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
+@@ -218,7 +218,7 @@
+ gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
+ icon->manager_window);
+ #else
+- gdkwin = gdk_window_lookup (icon->manager_window);
++ gdkwin = gdk_x11_window_lookup_for_display (gdk_display_get_default(), icon->manager_window);
+ #endif
+
+ gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
+@@ -274,7 +274,7 @@
+ #if HAVE_GTK_MULTIHEAD
+ root_window = gdk_screen_get_root_window (gtk_widget_get_screen (screen));
+ #else
+- root_window = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
++ root_window = gdk_x11_window_lookup_for_display (gdk_display_get_default(), gdk_x11_get_default_root_xwindow ());
+ #endif
+
+ /* Add a root window filter so that we get changes on MANAGER */
+--- a/fbxkb.c
++++ b/fbxkb.c
+@@ -510,8 +510,7 @@
+ main(int argc, char *argv[], char *env[])
+ {
+ ENTER;
+- setlocale(LC_CTYPE, "");
+- gtk_set_locale();
++ setlocale(LC_ALL, "");
+ gtk_init(&argc, &argv);
+ XSetLocaleModifiers("");
+ XSetErrorHandler((XErrorHandler) Xerror_handler);
diff --git a/debian/patches/respect-dpkg-buildflags.patch b/debian/patches/respect-dpkg-buildflags.patch
new file mode 100644
index 0000000..f972fbd
--- /dev/null
+++ b/debian/patches/respect-dpkg-buildflags.patch
@@ -0,0 +1,26 @@
+Description: Respect default {C,CPP}FLAGS from dpkg-buildflags
+Author: Dmitry Borisyuk <q1werty@i.com.ua>
+--- a/Makefile.common
++++ b/Makefile.common
+@@ -18,7 +18,7 @@
+ CC = gcc
+ LIBS = $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu
+ INCS = $(shell pkg-config --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0)
+-CFLAGS = -O2 # overwriten by command line or env. variable
++CFLAGS ?= -O2 # overwriten by command line or env. variable
+ CFLAGS += -Wall # always nice to have
+ ifneq (,$(DEVEL))
+ CFLAGS := -g -Wall
+@@ -28,10 +28,10 @@
+ CFLAGS += -g -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
+
+ %.o: %.c
+- $(CC) $(CFLAGS) $(INCS) -c $<
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) -c $<
+
+ %.dep: %.c
+- $(CC) $(CFLAGS) $(INCS) -MM $< -o $@
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) -MM $< -o $@
+
+ .PHONY: all clean distclean install uninstall
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..57e85e0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,10 @@
+debian-changes-0.6-1.1.patch
+show-us-flag.patch
+use-g_strdup.patch
+replace-deprecated-gtk.patch
+spelling.patch
+dont-forcibly-strip.patch
+respect-dpkg-buildflags.patch
+drop-extra-deps.patch
+fix-for-dh.patch
+cross.patch
diff --git a/debian/patches/show-us-flag.patch b/debian/patches/show-us-flag.patch
new file mode 100644
index 0000000..5c86190
--- /dev/null
+++ b/debian/patches/show-us-flag.patch
@@ -0,0 +1,14 @@
+Description: Fix parsing of keyboard info, to show proper "us" flag
+Author: Dmitry Borisyuk <q1werty@i.com.ua>
+Bug-Debian: https://bugs.debian.org/412254
+--- a/fbxkb.c
++++ b/fbxkb.c
+@@ -372,7 +372,7 @@
+ *tmp = 0;
+
+ DBG("map=%s no=%d\n", tok, no);
+- if (!strcmp(tok, "pc") || !strcmp(tok, "group"))
++ if (!strcmp(tok, "pc") || (strlen(tok) != 2))
+ continue;
+
+ g_assert((no >= 0) && (no < ngroups));
diff --git a/debian/patches/spelling.patch b/debian/patches/spelling.patch
new file mode 100644
index 0000000..343cba3
--- /dev/null
+++ b/debian/patches/spelling.patch
@@ -0,0 +1,37 @@
+Description: Correct spelling
+Author: Dmitry Borisyuk <q1werty@i.com.ua>
+--- a/fbxkb.c
++++ b/fbxkb.c
+@@ -40,7 +40,7 @@
+
+ #define IMGPREFIX PREFIX "/share/fbxkb/images/"
+ /******************************************************************
+- * GLOBAL VARSIABLES *
++ * GLOBAL VARIABLES *
+ ******************************************************************/
+
+ /* X11 common stuff */
+@@ -48,7 +48,7 @@
+ static Display *dpy;
+ static int xkb_event_type;
+
+-/* internal state mashine */
++/* internal state machine */
+ static int cur_group;
+ static int ngroups;
+ static GHashTable *sym2pix;
+@@ -383,11 +383,11 @@
+ }
+ out:
+ XkbFreeKeyboard(kbd_desc_ptr, 0, True);
+- // sanity check: group numbering must be continous
++ // sanity check: group numbering must be continuous
+ for (i = 0; (i < XkbNumKbdGroups) && (group2info[i].sym != NULL); i++);
+ if (i != ngroups) {
+- ERR("kbd group numbering is not continous\n");
+- ERR("run 'xlsatoms | grep pc' to know what hapends\n");
++ ERR("kbd group numbering is not continuous\n");
++ ERR("run 'xlsatoms | grep pc' to know what happens\n");
+ exit(1);
+ }
+ out_us:
diff --git a/debian/patches/use-g_strdup.patch b/debian/patches/use-g_strdup.patch
new file mode 100644
index 0000000..9651da2
--- /dev/null
+++ b/debian/patches/use-g_strdup.patch
@@ -0,0 +1,25 @@
+Description: Use g_strdup() to pass strings to g_hash_table_insert()
+ Otherwise use-after-free happens soon.
+Author: Dmitry Borisyuk <q1werty@i.com.ua>
+--- a/fbxkb.c
++++ b/fbxkb.c
+@@ -266,7 +266,6 @@
+ {
+ GdkPixbuf *flag;
+ static GString *s = NULL;
+- char tmp[3];
+
+ ENTER;
+ g_assert(sym != NULL && strlen(sym) > 1);
+@@ -281,10 +280,7 @@
+ flag = gdk_pixbuf_new_from_file_at_size(s->str, 24, 24, NULL);
+ if (!flag)
+ RET(zzflag);
+- tmp[0] = sym[0];
+- tmp[1] = sym[1];
+- tmp[2] = 0;
+- g_hash_table_insert(sym2pix, tmp, flag);
++ g_hash_table_insert(sym2pix, g_strdup(sym), flag);
+ RET(flag);
+ }
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..05a4f69
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,11 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+ dh $@ --buildsystem=makefile
+
+override_dh_auto_configure:
+ ./configure --prefix=/usr
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..ed4d1a1
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://sf.net/fbxkb/fbxkb-([0-9\.]+)\.tgz
bgstack15