diff --git a/perl-Gtk2.spec b/perl-Gtk2.spec
index 61f1e86..544f2be 100644
--- a/perl-Gtk2.spec
+++ b/perl-Gtk2.spec
@@ -13,6 +13,7 @@ Group:          Development/Libraries
 License:        LGPLv2+
 URL:            http://search.cpan.org/dist/Gtk2/
 Source0:        http://www.cpan.org/authors/id/T/TS/TSCH/Gtk2-%{version}.tar.gz
+Source100:	xs-provides.sh
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  perl >= 2:5.8.0
@@ -26,7 +27,7 @@ Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $versi
 Requires:       perl(Glib) >= 1.200
 Requires:       perl(Cairo) >= 1.00
 
-%{?perl_default_filter}
+%define __elf_provides %{SOURCE100}
 
 %description
 This module allows you to write Gtk+ graphical user interfaces in a
diff --git a/xs-provides.sh b/xs-provides.sh
new file mode 100755
index 0000000..78070fa
--- /dev/null
+++ b/xs-provides.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+while read f; do
+    nm -sD "${f}" | grep -E 'XS_Gtk2.*_new$' \
+    | sed -e 's,^.*XS_Gtk2,perl(Gtk2,;s,__,::,g;s,_new,),' 
+done