diff --git a/ChangeLog.md b/ChangeLog.md
new file mode 100644
--- /dev/null
+++ b/ChangeLog.md
@@ -0,0 +1,3 @@
+### 3.0.1
+
++ Initial release
diff --git a/GdkX11.overrides b/GdkX11.overrides
new file mode 100644
--- /dev/null
+++ b/GdkX11.overrides
@@ -0,0 +1,2 @@
+pkg-config-name xlib x11
+
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,13 +1,13 @@
-The gi-gdkx113 library and included works are provided under the terms of the
+The gi-gdkx11 library and included works are provided under the terms of the
 GNU Library General Public License (LGPL) version 2.1 with the following
 exception:
 
-Static linking of applications or any other source to the gi-gdkx113 library
+Static linking of applications or any other source to the gi-gdkx11 library
 does not constitute a modified or derivative work and does not require
 the author(s) to provide source code for said work, to link against the
-shared gi-gdkx113 libraries, or to link their applications against a
-user-supplied version of gi-gdkx113. If you link applications to a modified
-version of gi-gdkx113, then the changes to gi-gdkx113 must be provided under the
+shared gi-gdkx11 libraries, or to link their applications against a
+user-supplied version of gi-gdkx11. If you link applications to a modified
+version of gi-gdkx11, then the changes to gi-gdkx11 must be provided under the
 terms of the LGPL.
 
 ----------------------------------------------------------------------------
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,2 +1,6 @@
-# Information
-This is a compatibility package. For newer projects we recommend that you use [gi-gdkx113](/package/gi-gdkx113) instead.
+# Documentation
+Autogenerated documentation for this package can be found at
+
+[https://hackage.haskell.org/package/gi-gdkx11-4.0.1/docs/GI-GdkX11.html](https://hackage.haskell.org/package/gi-gdkx11-4.0.1/docs/GI-GdkX11.html)
+
+For general documentation on using [haskell-gi](https://github.com/haskell-gi/haskell-gi) based bindings, see [the project page](https://github.com/haskell-gi/haskell-gi) or [the Wiki](https://github.com/haskell-gi/haskell-gi/wiki).
diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,5 +1,18 @@
-import Data.GI.CodeGen.CabalHooks (setupCompatWrapper)
-import qualified GI.GdkX11.Config as Cfg
+{-# LANGUAGE OverloadedStrings #-}
 
+import Data.GI.CodeGen.CabalHooks (setupBinding, TaggedOverride(..))
+
+import qualified GI.GObject.Config as GObject
+import qualified GI.Gdk.Config as Gdk
+import qualified GI.Gio.Config as Gio
+import qualified GI.Xlib.Config as Xlib
+
+
 main :: IO ()
-main = setupCompatWrapper "gi-gdkx113" Cfg.modules
+main = setupBinding name version verbose overridesFile inheritedOverrides outputDir
+  where name = "GdkX11"
+        version = "4.0"
+        overridesFile = Just "GdkX11.overrides"
+        verbose = False
+        outputDir = Nothing
+        inheritedOverrides = [TaggedOverride "inherited:GObject" GObject.overrides, TaggedOverride "inherited:Gdk" Gdk.overrides, TaggedOverride "inherited:Gio" Gio.overrides, TaggedOverride "inherited:Xlib" Xlib.overrides]
diff --git a/gi-gdkx11.cabal b/gi-gdkx11.cabal
--- a/gi-gdkx11.cabal
+++ b/gi-gdkx11.cabal
@@ -1,29 +1,90 @@
-name:           gi-gdkx11
-version:        3.0.17
-synopsis:       GdkX11 3.x bindings (compatibility layer)
-description:    This package re-exports (for backward compatibility)
-                the haskell-gi generated bindings in the gi-gdkx113 package.
-homepage:       https://github.com/haskell-gi/haskell-gi
-license:        LGPL-2.1
-license-file:   LICENSE
-author:         Iñaki García Etxebarria
-maintainer:     Iñaki García Etxebarria
-category:       Bindings
-build-type:     Custom
-cabal-version:  2.0
+name:                 gi-gdkx11
+version:              4.0.1
+synopsis:             GdkX11 bindings
+description:          Bindings for GdkX11, autogenerated by haskell-gi.
+homepage:             https://github.com/haskell-gi/haskell-gi
+license:              LGPL-2.1
+license-file:         LICENSE
+author:               Will Thompson, Iñaki García Etxebarria and Jonas Platte
+maintainer:           Iñaki García Etxebarria
+category:             Bindings
+build-type:           Custom
+cabal-version:        1.24
 
-extra-source-files: README.md
+extra-source-files: README.md ChangeLog.md stack.yaml GdkX11.overrides
 
 custom-setup
- setup-depends:
-   base >= 4.11 && <5,
-   haskell-gi ^>= 0.26.14,
-   gi-gdkx113 ^>= 3.0.17
+      setup-depends: base >= 4.9 && < 5,
+                     Cabal >= 1.24,
+                     haskell-gi >= 0.23 && < 0.24,
+                     gi-gobject == 2.0.*,
+                     gi-gdk == 4.0.*,
+                     gi-gio == 2.0.*,
+                     gi-cairo == 1.0.*,
+                     gi-xlib == 2.0.*
 
 library
-    ghc-options: -Wall
+      default-language: Haskell2010
+      default-extensions: NoImplicitPrelude, ScopedTypeVariables, CPP, OverloadedStrings, NegativeLiterals, ConstraintKinds, TypeFamilies, MultiParamTypeClasses, KindSignatures, FlexibleInstances, UndecidableInstances, DataKinds, FlexibleContexts, UndecidableSuperClasses
+      other-extensions: PatternSynonyms, ViewPatterns, TypeApplications
+      ghc-options: -fno-warn-unused-imports -fno-warn-warnings-deprecations
 
-    build-depends: base >= 4.11 && <5,
-                   gi-gdkx113 ^>= 3.0.17
+      pkgconfig-depends: gtk4-x11
+      build-depends: base >= 4.7 && <5,
+                     haskell-gi-base >= 0.23 && < 0.24,
+                     haskell-gi >= 0.23.0 && < 0.24,
+                     haskell-gi-overloading < 1.1,
+                     gi-gobject == 2.0.*,
+                     gi-gdk == 4.0.*,
+                     gi-gio == 2.0.*,
+                     gi-cairo == 1.0.*,
+                     gi-xlib == 2.0.*,
+                     bytestring >= 0.10 && < 1,
+                     containers >= 0.5 && < 1,
+                     text >= 1.0 && < 2,
+                     transformers >= 0.4 && < 1
 
-    default-language: Haskell2010
+      -- Disable overloading when compiling under GHC 8.2.x
+      -- see https://ghc.haskell.org/trac/ghc/ticket/14382
+      if impl(ghc == 8.2.*)
+              build-depends: haskell-gi-overloading == 0.0
+
+      -- Note that the following list of exposed modules and autogen
+      -- modules is for documentation purposes only, so that some
+      -- documentation appears in hackage. The actual list of modules
+      -- to be built will be built at configure time, based on the
+      -- available introspection data.
+
+      exposed-modules: GI.GdkX11.Config,
+                       GI.GdkX11,
+                       GI.GdkX11.Functions,
+                       GI.GdkX11.Objects,
+                       GI.GdkX11.Objects.X11AppLaunchContext,
+                       GI.GdkX11.Objects.X11DeviceCore,
+                       GI.GdkX11.Objects.X11DeviceManagerCore,
+                       GI.GdkX11.Objects.X11DeviceManagerXI2,
+                       GI.GdkX11.Objects.X11DeviceXI2,
+                       GI.GdkX11.Objects.X11Display,
+                       GI.GdkX11.Objects.X11Drag,
+                       GI.GdkX11.Objects.X11GLContext,
+                       GI.GdkX11.Objects.X11Keymap,
+                       GI.GdkX11.Objects.X11Monitor,
+                       GI.GdkX11.Objects.X11Screen,
+                       GI.GdkX11.Objects.X11Surface
+
+      autogen-modules: GI.GdkX11.Config,
+                       GI.GdkX11,
+                       GI.GdkX11.Functions,
+                       GI.GdkX11.Objects,
+                       GI.GdkX11.Objects.X11AppLaunchContext,
+                       GI.GdkX11.Objects.X11DeviceCore,
+                       GI.GdkX11.Objects.X11DeviceManagerCore,
+                       GI.GdkX11.Objects.X11DeviceManagerXI2,
+                       GI.GdkX11.Objects.X11DeviceXI2,
+                       GI.GdkX11.Objects.X11Display,
+                       GI.GdkX11.Objects.X11Drag,
+                       GI.GdkX11.Objects.X11GLContext,
+                       GI.GdkX11.Objects.X11Keymap,
+                       GI.GdkX11.Objects.X11Monitor,
+                       GI.GdkX11.Objects.X11Screen,
+                       GI.GdkX11.Objects.X11Surface
diff --git a/stack.yaml b/stack.yaml
new file mode 100644
--- /dev/null
+++ b/stack.yaml
@@ -0,0 +1,3 @@
+packages:
+- '.'
+resolver: lts-13.7
