diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2012 Peter Simons <simons@cryp.to>
+Copyright (c) 2012-2016 Peter Simons <simons@cryp.to>
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/Main.hs b/Main.hs
--- a/Main.hs
+++ b/Main.hs
@@ -1,11 +1,17 @@
+{-# LANGUAGE CPP #-}
+
 module Main ( main ) where
 
 import Distribution.Package
 import Distribution.PackageDescription
 import Distribution.PackageDescription.Parse
 import Distribution.PackageDescription.PrettyPrint
-import Distribution.Version
+#if MIN_VERSION_Cabal(1,25,0)
+import Distribution.Types.Dependency
+import Distribution.Types.LegacyExeDependency
+#endif
 import Distribution.Verbosity
+import Distribution.Version
 import System.Environment
 
 main :: IO ()
@@ -18,32 +24,42 @@
                                    , condExecutables = map (fmap relaxExeTree) (condExecutables pkg)
                                    , condTestSuites = map (fmap relaxTestTree) (condTestSuites pkg)
                                    }
-  where
-    relaxTreeConstraints :: CondTree v [Dependency] a -> CondTree v [Dependency] a
-    relaxTreeConstraints ct = ct { condTreeConstraints = map relax (condTreeConstraints ct) }
 
-    relaxLibraryTree :: CondTree v [Dependency] Library -> CondTree v [Dependency] Library
-    relaxLibraryTree ct = relaxTreeConstraints $ ct { condTreeData = relaxLibrary (condTreeData ct) }
+relaxTreeConstraints :: CondTree v [Dependency] a -> CondTree v [Dependency] a
+relaxTreeConstraints ct = ct { condTreeConstraints = map relax (condTreeConstraints ct) }
 
-    relaxExeTree :: CondTree v [Dependency] Executable -> CondTree v [Dependency] Executable
-    relaxExeTree ct = relaxTreeConstraints $ ct { condTreeData = relaxExe (condTreeData ct) }
+relaxLibraryTree :: CondTree v [Dependency] Library -> CondTree v [Dependency] Library
+relaxLibraryTree ct = relaxTreeConstraints $ ct { condTreeData = relaxLibrary (condTreeData ct) }
 
-    relaxTestTree :: CondTree v [Dependency] TestSuite -> CondTree v [Dependency] TestSuite
-    relaxTestTree ct = relaxTreeConstraints $ ct { condTreeData = relaxTest (condTreeData ct) }
+relaxExeTree :: CondTree v [Dependency] Executable -> CondTree v [Dependency] Executable
+relaxExeTree ct = relaxTreeConstraints $ ct { condTreeData = relaxExe (condTreeData ct) }
 
-    relaxLibrary :: Library -> Library
-    relaxLibrary l = l { libBuildInfo = relaxBuildInfo (libBuildInfo l) }
+relaxTestTree :: CondTree v [Dependency] TestSuite -> CondTree v [Dependency] TestSuite
+relaxTestTree ct = relaxTreeConstraints $ ct { condTreeData = relaxTest (condTreeData ct) }
 
-    relaxExe :: Executable -> Executable
-    relaxExe e = e { buildInfo = relaxBuildInfo (buildInfo e) }
+relaxLibrary :: Library -> Library
+relaxLibrary l = l { libBuildInfo = relaxBuildInfo (libBuildInfo l) }
 
-    relaxTest :: TestSuite -> TestSuite
-    relaxTest t = t { testBuildInfo = relaxBuildInfo (testBuildInfo t) }
+relaxExe :: Executable -> Executable
+relaxExe e = e { buildInfo = relaxBuildInfo (buildInfo e) }
 
-    relaxBuildInfo :: BuildInfo -> BuildInfo
-    relaxBuildInfo bi = bi { buildTools = map relax (buildTools bi)
-                           , targetBuildDepends = map relax (targetBuildDepends bi)
-                           }
+relaxTest :: TestSuite -> TestSuite
+relaxTest t = t { testBuildInfo = relaxBuildInfo (testBuildInfo t) }
 
-    relax :: Dependency -> Dependency
-    relax (Dependency d _) = Dependency d anyVersion
+relaxBuildInfo :: BuildInfo -> BuildInfo
+relaxBuildInfo bi = bi { buildTools = map relax (buildTools bi)
+                       , targetBuildDepends = map relax (targetBuildDepends bi)
+                       }
+
+class DependencyType a where
+  relax :: a -> a
+
+instance DependencyType Dependency where
+  relax (Dependency d _) = Dependency d anyVersion
+
+#if MIN_VERSION_Cabal(1,25,0)
+
+instance DependencyType LegacyExeDependency where
+  relax (LegacyExeDependency d _) = LegacyExeDependency d anyVersion
+
+#endif
diff --git a/jailbreak-cabal.cabal b/jailbreak-cabal.cabal
--- a/jailbreak-cabal.cabal
+++ b/jailbreak-cabal.cabal
@@ -1,21 +1,34 @@
-Name:                   jailbreak-cabal
-Version:                1.3.1
-Synopsis:               Strip version restrictions from build dependencies in Cabal files.
-License:                BSD3
-License-file:           LICENSE
-Author:                 Peter Simons <simons@cryp.to>
-Maintainer:             Peter Simons <simons@cryp.to>
-Homepage:               http://github.com/peti/jailbreak-cabal
-Category:               Distribution
-Build-type:             Simple
-Cabal-version:          >= 1.6
-Tested-with:            GHC >= 6.10.4 && <= 8.0.1
-Description:            Strip version restrictions from build dependencies in Cabal files.
+-- This file has been generated from package.yaml by hpack version 0.15.0.
+--
+-- see: https://github.com/sol/hpack
 
-Source-Repository head
-  Type:                 git
-  Location:             git://github.com/peti/jailbreak-cabal.git
+name:                   jailbreak-cabal
+version:                1.3.2
+synopsis:               Strip version restrictions from build dependencies in Cabal files.
+description:            Strip version restrictions from build dependencies in Cabal files.
+category:               Distribution
+stability:              stable
+homepage:               https://github.com/peti/jailbreak-cabal#readme
+bug-reports:            https://github.com/peti/jailbreak-cabal/issues
+author:                 Peter Simons,
+                        Joel Taylor,
+                        Nikolay Amiantov,
+                        aszlig
+maintainer:             Peter Simons <simons@cryp.to>
+license:                BSD3
+license-file:           LICENSE
+tested-with:            GHC > 7 && <= 8.1
+build-type:             Simple
+cabal-version:          >= 1.10
 
-Executable jailbreak-cabal
-  Main-is:              Main.hs
-  Build-depends:        base >= 3 && < 5, Cabal == 1.20.* || >= 1.23
+source-repository head
+  type: git
+  location: https://github.com/peti/jailbreak-cabal
+
+executable jailbreak-cabal
+  main-is: Main.hs
+  ghc-options: -Wall
+  build-depends:
+    base >= 3 && < 5,
+    Cabal == 1.20.* || >= 1.23
+  default-language: Haskell2010
