diff --git a/Graphics/Framebuffer.hs b/Graphics/Framebuffer.hs
new file mode 100644
--- /dev/null
+++ b/Graphics/Framebuffer.hs
@@ -0,0 +1,9 @@
+{-|
+This module reexports the functions you probably want to use. "Graphics.Framebuffer.Internal" does all the heavy lifting.
+ -}
+
+module Graphics.Framebuffer
+	( getVarScreenInfo
+	, C'fb_var_screeninfo(..)
+	) where
+import Graphics.Framebuffer.Internal
diff --git a/Graphics/Framebuffer/Internal.hsc b/Graphics/Framebuffer/Internal.hsc
new file mode 100644
--- /dev/null
+++ b/Graphics/Framebuffer/Internal.hsc
@@ -0,0 +1,29 @@
+module Graphics.Framebuffer.Internal where
+#strict_import
+#include <linux/fb.h>
+#include <bindings.dsl.h>
+
+import System.IO
+import System.Posix.IO
+import System.Posix.Types
+
+#starttype struct fb_var_screeninfo
+#field xres , Word32
+#field yres , Word32
+#field bits_per_pixel , Word32
+#stoptype
+
+#num FBIOGET_VSCREENINFO
+#num FBIOPUT_VSCREENINFO
+#num FBIOGET_FSCREENINFO
+#num FBIOGETCMAP
+#num FBIOPUTCMAP
+#num FBIOPAN_DISPLAY
+
+#ccall ioctl , Fd -> CInt -> Ptr <struct fb_var_screeninfo> -> IO CInt
+
+-- | Asks the properties of the supplied framebuffer device
+getVarScreenInfo :: Handle -> IO C'fb_var_screeninfo
+getVarScreenInfo h = do
+	fd <- handleToFd h
+	alloca $ \ptr -> c'ioctl fd c'FBIOGET_VSCREENINFO ptr >> peek ptr
diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,14 @@
+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+                    Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar
+  22 rue de Plaisance, 75014 Paris, France
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. You just DO WHAT THE FUCK YOU WANT TO.
+
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/linux-framebuffer.cabal b/linux-framebuffer.cabal
new file mode 100644
--- /dev/null
+++ b/linux-framebuffer.cabal
@@ -0,0 +1,35 @@
+cabal-version:       2.0
+name:                linux-framebuffer
+version:             0
+synopsis:            Linux fbdev (framebuffer device, /dev/fbX) utility functions
+-- description:
+license:             OtherLicense
+license-file:        LICENSE
+author:              Sergey Alirzaev
+maintainer:          zl29ah@gmail.com
+-- copyright:
+category:            Graphics
+build-type:          Simple
+
+library
+  ghc-options:        -fno-warn-tabs
+  -- other-extensions:
+  build-depends:       base >= 4 && < 5,
+                       bindings-DSL >= 1.0.16 && < 1.1,
+                       unix ^>= 2.7.2.2
+  -- hs-source-dirs:
+  default-language:    Haskell2010
+  default-extensions:
+    ForeignFunctionInterface
+  exposed-modules:
+    Graphics.Framebuffer
+    Graphics.Framebuffer.Internal
+
+Source-repository head
+  type:              git
+  location:          https://github.com/l29ah/linux-framebuffer
+
+Source-repository this
+  type:              git
+  location:          https://github.com/l29ah/linux-framebuffer
+  tag:               0
