diff --git a/cblrepo.cabal b/cblrepo.cabal
--- a/cblrepo.cabal
+++ b/cblrepo.cabal
@@ -1,5 +1,5 @@
 name: cblrepo
-version: 0.19.1
+version: 0.20.0
 cabal-version: >= 1.6
 license: OtherLicense
 license-file: LICENSE-2.0
@@ -63,7 +63,8 @@
         optparse-applicative ==0.12.*,
         safe ==0.3.*,
         containers ==0.5.*,
-        utf8-string ==1.0.*
+        utf8-string ==1.0.*,
+        text
 
 Source-Repository head
     Type:                 git
diff --git a/src/PkgDB.hs b/src/PkgDB.hs
--- a/src/PkgDB.hs
+++ b/src/PkgDB.hs
@@ -60,6 +60,9 @@
 import System.IO.Error
 import qualified Distribution.Package as P
 import qualified Distribution.Version as V
+import qualified Data.Version as DV
+import Text.ParserCombinators.ReadP (readP_to_S)
+import Data.Text (unpack)
 
 import Data.Aeson
 import Data.Aeson.TH (deriveJSON, defaultOptions, Options(..), SumEncoding(..))
@@ -253,7 +256,18 @@
         s = C.unlines $ map encode $ sort db
 
 -- {{{1 JSON instances
-$(deriveJSON defaultOptions { sumEncoding = ObjectWithSingleField, allNullaryToStringTag = False } ''V.Version)
+-- $(deriveJSON defaultOptions { sumEncoding = ObjectWithSingleField, allNullaryToStringTag = False } ''V.Version)
+instance ToJSON V.Version where
+  toJSON = toJSON . DV.showVersion
+  toEncoding = toEncoding . DV.showVersion
+
+instance FromJSON V.Version where
+  parseJSON = withText "Version" $ go . readP_to_S DV.parseVersion . unpack
+    where
+      go [(v,[])] = return v
+      go (_ : xs) = go xs
+      go _        = fail $ "could not parse Version"
+
 $(deriveJSON defaultOptions { sumEncoding = ObjectWithSingleField, allNullaryToStringTag = False } ''V.VersionRange)
 $(deriveJSON defaultOptions { sumEncoding = ObjectWithSingleField, allNullaryToStringTag = False } ''FlagName)
 $(deriveJSON defaultOptions { sumEncoding = ObjectWithSingleField, allNullaryToStringTag = False } ''Pkg)
diff --git a/src/Util/Misc.hs b/src/Util/Misc.hs
--- a/src/Util/Misc.hs
+++ b/src/Util/Misc.hs
@@ -57,7 +57,7 @@
 dbName = progName ++ ".db"
 
 ghcDefVersion = Version [7, 10, 3] []
-ghcDefRelease = 1 :: Int
+ghcDefRelease = 2 :: Int
 ghcVersionDep :: Version -> Int -> String
 ghcVersionDep ghcVer ghcRel = "ghc=" ++ display ghcVer ++ "-" ++ show ghcRel
 
diff --git a/src/Util/Translation.hs b/src/Util/Translation.hs
--- a/src/Util/Translation.hs
+++ b/src/Util/Translation.hs
@@ -21,26 +21,26 @@
 import Util.Misc
 import Util.Dist
 
-import Prelude hiding ( (<$>) )
-import Control.Monad
-import Control.Monad.Trans
-import Control.Monad.Trans.Except
-import Data.Char
-import Data.List
-import Data.Maybe
-import Data.Monoid hiding ((<>))
-import Data.Version
-import Distribution.Package as P
-import Distribution.PackageDescription as PD
-import Distribution.Text
-import System.Directory
-import System.Exit
-import System.FilePath
-import System.Process
-import System.Unix.Directory
-import Text.PrettyPrint.ANSI.Leijen hiding((</>))
-
+import           Control.Monad
+import           Control.Monad.Trans
+import           Control.Monad.Trans.Except
 import qualified Data.ByteString.Lazy as BSL (writeFile)
+import           Data.Char
+import           Data.List
+import           Data.Maybe
+import           Data.Monoid hiding ((<>))
+import           Data.Version
+import           Distribution.Package as P
+import           Distribution.PackageDescription as PD
+import           Distribution.Text
+import           Prelude hiding ( (<$>) )
+import           System.Directory
+import           System.Exit
+import           System.FilePath
+import           System.IO
+import           System.Process
+import           System.Unix.Directory
+import           Text.PrettyPrint.ANSI.Leijen hiding((</>))
 
 -- {{{1 ShQuotedString
 newtype ShQuotedString = ShQuotedString String
@@ -268,27 +268,21 @@
             , empty, preUpgradeFunction
             , empty, postUpgradeFunction
             , empty, preRemoveFunction
-            , empty, postRemoveFunction
             , empty
             ]
             where
                 postInstallFunction = text "post_install() {" <>
-                    nest 4 (empty <$> text "${HS_DIR}/register.sh --verbose=0" <$>
-                        text "/usr/share/doc/ghc/html/libraries/arch-gen-contents-index") <$>
+                    nest 4 (empty <$> text "${HS_DIR}/register.sh --verbose=0") <$>
                     char '}'
                 preUpgradeFunction = text "pre_upgrade() {" <>
                     nest 4 (empty <$> text "${HS_DIR}/unregister.sh --verbose=0") <$>
                     char '}'
                 postUpgradeFunction = text "post_upgrade() {" <>
-                    nest 4 (empty <$> text "${HS_DIR}/register.sh --verbose=0" <$>
-                        text "/usr/share/doc/ghc/html/libraries/arch-gen-contents-index") <$>
+                    nest 4 (empty <$> text "${HS_DIR}/register.sh --verbose=0") <$>
                     char '}'
                 preRemoveFunction = text "pre_remove() {" <>
                     nest 4 (empty <$> text "${HS_DIR}/unregister.sh --verbose=0") <$>
                     char '}'
-                postRemoveFunction = text "post_remove() {" <>
-                    nest 4 (empty <$> text "/usr/share/doc/ghc/html/libraries/arch-gen-contents-index") <$>
-                    char '}'
 
 -- {{{1 extra instances
 instance Pretty Version where
@@ -392,11 +386,13 @@
 addHashes ap cbl tmpDir = let
         hashes = map (filter (`elem` "1234567890abcdef")) . lines . drop 11
         pkgbuildFn = tmpDir </> "PKGBUILD"
+        installFn = tmpDir </> apPkgName ap <.> "install"
         cblFn = tmpDir </> "original.cabal"
         pkgbuildPatch = apPkgbuildPatch ap
     in do
         liftIO $ copyPatches tmpDir ap
-        liftIO $ writeFile pkgbuildFn (show $ pretty ap)
+        liftIO $ withFile pkgbuildFn WriteMode (`hPutDoc` pretty ap)
+        liftIO $ withFile installFn WriteMode (`hPutDoc` (pretty $ aiFromAP ap))
         maybe (return ()) (void . applyPatch pkgbuildFn) pkgbuildPatch
         liftIO $ BSL.writeFile cblFn cbl
         (ec, out, _) <- liftIO $ withWorkingDirectory tmpDir (readProcessWithExitCode "makepkg" ["-g"] "")
