diff --git a/examples/Makefile b/examples/Makefile
new file mode 100644
--- /dev/null
+++ b/examples/Makefile
@@ -0,0 +1,14 @@
+PROGS = upload.fcgi download.fcgi printinput.fcgi hello.fcgi
+
+GHCFLAGS = -package fastcgi -fwarn-unused-imports
+
+.PHONY: all clean
+
+all: $(PROGS)
+
+%.fcgi: %.hs
+	ghc $(GHCFLAGS) --make -o $@ $^ 
+
+clean:
+	-rm -f *.hi *.o
+	-rm -f $(PROGS)
diff --git a/examples/download.hs b/examples/download.hs
new file mode 100644
--- /dev/null
+++ b/examples/download.hs
@@ -0,0 +1,18 @@
+-- Takes server file path from the file parameter and sends
+-- that to the client.
+-- WARNING: this script is a SECURITY RISK and only for 
+-- demo purposes. Do not put it on a public web server.
+
+import Network.FastCGI
+
+form = concat ["<html><body><form>",
+               "<input type='text' name='file' /><br />",
+               "<input type='submit' />",
+               "</form></body></html>"]
+
+sendFile f = do setHeader "Content-type" "application/octet-stream"
+                outputFile f
+
+cgiMain = getInput "file" >>= maybe (output form) sendFile
+
+main = runFastCGI cgiMain
diff --git a/examples/hello.hs b/examples/hello.hs
new file mode 100644
--- /dev/null
+++ b/examples/hello.hs
@@ -0,0 +1,5 @@
+import Network.FastCGI
+
+cgiMain = output "Hello World!"
+
+main = runFastCGI cgiMain
diff --git a/examples/printinput.hs b/examples/printinput.hs
new file mode 100644
--- /dev/null
+++ b/examples/printinput.hs
@@ -0,0 +1,35 @@
+-- Prints the values of all CGI variables and inputs, and some 
+-- process information.
+
+import Control.Monad (liftM)
+import Data.Maybe (fromJust)
+
+import Control.Concurrent
+import System.Posix.Process (getProcessID)
+
+import Network.FastCGI
+
+printinput :: CGI CGIResult
+printinput = do setHeader "Content-type" "text/plain"
+                vs <- getVars
+                is <- getInputNames
+                i <- mapM prInput is
+                pid <- liftIO getProcessID
+                threadId <- liftIO myThreadId
+                let tid = concat $ drop 1 $ words $ show threadId
+                output $ unlines ["Environment:", prVars vs,
+	                          "Inputs:", unlines i,
+	                          "Process ID: " ++ show pid,
+	                          "Thread ID:  " ++ tid]
+
+prVars vs = unlines [k ++ ": " ++ x | (k,x) <- vs ]
+
+prInput :: String -> CGI String
+prInput i = do v <- liftM fromJust (getInput i)
+               f <- getInputFilename i
+               return $ case f of
+                          Just n -> i ++ ": File\nfilename=" ++ n
+                                    ++ "\ncontents=" ++ v
+                          Nothing -> i ++ ": " ++ v 
+
+main = runFastCGIorCGI printinput
diff --git a/examples/upload.hs b/examples/upload.hs
new file mode 100644
--- /dev/null
+++ b/examples/upload.hs
@@ -0,0 +1,32 @@
+-- Accepts file uploads and saves the files in the given directory.
+-- WARNING: this script is a SECURITY RISK and only for 
+-- demo purposes. Do not put it on a public web server.
+
+import Control.Monad (liftM)
+import Data.Maybe (fromJust)
+
+import qualified Data.ByteString.Lazy as BS
+import Network.FastCGI
+
+dir = "upload"
+
+cgiMain = do m <- getInputFilename "file"
+             case m of 
+               Just n  -> saveFile n
+               Nothing -> output form
+
+saveFile n =
+    do
+    cont <- liftM fromJust $ getInputFPS "file"
+    let p = dir ++ "/" ++ basename n
+    liftIO $ BS.writeFile p cont
+    output $ "Saved as <a href='" ++ p ++ "'>" ++ p ++ "</a>."
+
+form = concat ["<html><body><form method='post' enctype='multipart/form-data'>",
+               "<input type='file' name='file' /><br />",
+               "<input type='submit' />",
+               "</form></body></html>"]
+
+basename = reverse . takeWhile (`notElem` "/\\") . reverse
+
+main = runFastCGI cgiMain
diff --git a/fastcgi.buildinfo.in b/fastcgi.buildinfo.in
new file mode 100644
--- /dev/null
+++ b/fastcgi.buildinfo.in
@@ -0,0 +1,3 @@
+ghc-options: -optc@CPPFLAGS@
+cc-options:  @CPPFLAGS@
+ld-options:  @LDFLAGS@
diff --git a/fastcgi.cabal b/fastcgi.cabal
--- a/fastcgi.cabal
+++ b/fastcgi.cabal
@@ -1,16 +1,17 @@
 Name:           fastcgi
-Version:        3001.0.2
+Version:        3001.0.2.1
 Copyright:      Bjorn Bringert, Lemmih
 Maintainer:     bjorn@bringert.net
 License:        BSD3
 license-file:   LICENSE
+Category:       Network
 Synopsis:       A Haskell library for writing FastCGI programs
 Description:
  This library lets you write FastCGI programs. This package reuses the
  cgi package API, making it very easy to port CGI programs to FastCGI.
 Cabal-version: >= 1.2.0
 build-type:     Configure
-extra-source-files: configure
+extra-source-files: configure fastcgi.buildinfo.in
 
 flag small_base
   description: Choose the new smaller, split-up base package.
