diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+* 0.9.8 (2015-10-08)
+- better %license logic
+- fix handling of versions without '.'
+- no duplicate test deps
+
 * 0.9.7 (2015-08-28)
 - only list buildable executables in spec file
 - bring back 'build' as an alias for 'local'
diff --git a/cabal-rpm.cabal b/cabal-rpm.cabal
--- a/cabal-rpm.cabal
+++ b/cabal-rpm.cabal
@@ -1,5 +1,5 @@
 Name:                cabal-rpm
-Version:             0.9.7
+Version:             0.9.8
 Synopsis:            RPM packaging tool for Haskell Cabal-based packages
 Description:
     This package provides a RPM packaging tool for Haskell Cabal-based packages.
diff --git a/src/Commands/Spec.hs b/src/Commands/Spec.hs
--- a/src/Commands/Spec.hs
+++ b/src/Commands/Spec.hs
@@ -226,9 +226,9 @@
       put $ "%package" +-+ ghcPkg
       putHdr "Summary" $ "Haskell" +-+ pkg_name +-+ "library"
       case distro of
-        Fedora -> return ()
         SUSE -> putHdr "Group" "System/Libraries"
         RHEL5 -> putHdr "Group" "System Environment/Libraries"
+        _ -> return ()
       putNewline
       put $ "%description" +-+ ghcPkg
       put $ wrapGenDesc $ "This package provides the Haskell" +-+ pkg_name +-+ "shared library."
@@ -236,9 +236,9 @@
     put $ "%package" +-+ ghcPkgDevel
     putHdr "Summary" $ "Haskell" +-+ pkg_name +-+ "library development files"
     case distro of
-      Fedora -> return ()
       RHEL5 -> putHdr "Group" "Development/Libraries"
       SUSE -> putHdr "Group" "Development/Libraries/Other"
+      _ -> return ()
     unless (distro == SUSE) $
       putHdr "Provides" $ (if binlib then "ghc-%{name}" else "%{name}") ++ "-static = %{version}-%{release}"
     putHdr "Requires" "ghc-compiler = %{ghc_version}"
@@ -254,10 +254,6 @@
     put $ wrapGenDesc $ "This package provides the Haskell" +-+ pkg_name +-+ "library development files."
     putNewline
 
-  when (distro == RHEL5) $ do
-    put "%global %license %%doc"
-    putNewline
-
   put "%prep"
   put $ "%setup -q" ++ (if pkgname /= name then " -n %{pkg_name}-%{version}" else "")
   putNewline
@@ -272,23 +268,24 @@
   put "%install"
   put $ "%ghc_" ++ pkgType ++ "_install"
 
+  let execs = sort $ map exeName $ filter isBuildable $ executables pkgDesc
+  when selfdep $ do
+    putNewline
+    put $ "%ghc_fix_dynamic_rpath" +-+ intercalate " " (map (\ p -> if p == name then "%{pkg_name}" else p) execs)
+
   let licensefiles =
 #if defined(MIN_VERSION_Cabal) && MIN_VERSION_Cabal(1,20,0)
         licenseFiles pkgDesc
 #else
         if null (licenseFile pkgDesc) then [] else [licenseFile pkgDesc]
 #endif
-  unless (null licensefiles) $ do
+  unless (null licensefiles || distro /= Fedora) $ do
     putNewline
     put $ "rm %{buildroot}%{ghc_pkgdocdir}/" ++
       case length licensefiles of
            1 -> head licensefiles
            _ -> "{" ++ intercalate "," licensefiles ++ "}"
 
-  let execs = sort $ map exeName $ filter isBuildable $ executables pkgDesc
-  when selfdep $ do
-    putNewline
-    put $ "%ghc_fix_dynamic_rpath" +-+ intercalate " " (map (\ p -> if p == name then "%{pkg_name}" else p) execs)
   putNewline
   putNewline
 
@@ -312,12 +309,14 @@
 
   docs <- findDocs cabalPath licensefiles
 
+  let license_macro = if (distro == Fedora) then "%license" else "%doc"
+
   when hasExecPkg $ do
     put "%files"
     when (distro /= Fedora) $ put "%defattr(-,root,root,-)"
     -- Add the license file to the main package only if it wouldn't
     -- otherwise be empty.
-    mapM_ (\ l -> put $ "%license" +-+ l) licensefiles
+    mapM_ (\ l -> put $ license_macro +-+ l) licensefiles
     unless (null docs) $
       put $ "%doc" +-+ unwords docs
 
@@ -333,7 +332,7 @@
         develFiles = if binlib then "-f ghc-%{name}-devel.files" else "-f %{name}-devel.files"
     put $ "%files" +-+ ghcPkg +-+ baseFiles
     when (distro /= Fedora) $ put "%defattr(-,root,root,-)"
-    mapM_ (\ l -> put $ "%license" +-+ l) licensefiles
+    mapM_ (\ l -> put $ license_macro +-+ l) licensefiles
     -- be strict for now
 --      unless (null (dataFiles pkgDesc) || binlib) $
 --        put "%{_datadir}/%{pkg_name}-%{version}"
diff --git a/src/Dependencies.hs b/src/Dependencies.hs
--- a/src/Dependencies.hs
+++ b/src/Dependencies.hs
@@ -123,7 +123,7 @@
                 -> String           -- ^self
                 -> [String]         -- ^depends
 testsuiteDependencies pkgDesc self =
-  map showDep . delete self . filter excludedPkgs . map depName . nub $ concatMap targetBuildDepends $ map testBuildInfo $ testSuites pkgDesc
+  map showDep . delete self . filter excludedPkgs . nub . map depName $ concatMap targetBuildDepends $ map testBuildInfo $ testSuites pkgDesc
 
 missingPackages :: PackageDescription -> IO [String]
 missingPackages pkgDesc = do
diff --git a/src/Main.hs b/src/Main.hs
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -27,7 +27,7 @@
 import Setup (parseArgs)
 
 import Control.Exception (bracket)
-import System.Directory	(removeDirectoryRecursive)
+import System.Directory (removeDirectoryRecursive)
 import System.Environment (getArgs)
 
 main :: IO ()
diff --git a/src/PackageUtils.hs b/src/PackageUtils.hs
--- a/src/PackageUtils.hs
+++ b/src/PackageUtils.hs
@@ -202,7 +202,7 @@
 
 tryUnpack :: String -> IO (FilePath, Maybe FilePath)
 tryUnpack pkg = do
-  pkgver <- if '.' `elem` pkg then return pkg else latestPkg pkg
+  pkgver <- if stripVersion pkg == pkg then latestPkg pkg else return pkg
   isdir <- doesDirectoryExist pkgver
   if isdir
     then do
