diff --git a/cabal2spec.cabal b/cabal2spec.cabal
--- a/cabal2spec.cabal
+++ b/cabal2spec.cabal
@@ -1,5 +1,5 @@
 name:               cabal2spec
-version:            2.8.0
+version:            2.8.1
 synopsis:           Convert Cabal files into rpm spec files
 description:        Convert
                     Cabal files into a
@@ -14,7 +14,7 @@
 license-file:       LICENSE
 author:             Peter Simons, Bryan O'Sullivan, Jens Petersen
 maintainer:         simons@cryp.to
-tested-with:        GHC == 9.2.8 || == 9.4.8 || == 9.6.7 || == 9.8.4 || == 9.10.2 || == 9.12.2
+tested-with:        GHC == 9.2.8 || == 9.4.8 || == 9.6.7 || == 9.8.4 || == 9.10.3 || == 9.12.2 || == 9.14.1
 category:           Distribution
 homepage:           https://github.com/peti/cabal2spec
 build-type:         Simple
@@ -30,7 +30,7 @@
 library
   exposed-modules:  Cabal2Spec
   hs-source-dirs:   src
-  build-depends:    base > 4.12 && < 5, Cabal >= 3.14 && < 3.15, filepath, time >= 1.5
+  build-depends:    base > 4.12 && < 5, Cabal == 3.14.* || == 3.16.* || == 3.18.*, filepath, time >= 1.5
   default-language: Haskell2010
 
 executable cabal2spec
diff --git a/src/Cabal2Spec.hs b/src/Cabal2Spec.hs
--- a/src/Cabal2Spec.hs
+++ b/src/Cabal2Spec.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE CPP #-}
+
 module Cabal2Spec ( cabal2spec, createSpecFile, ForceBinary, RunTests, CopyrightYear ) where
 
 import Control.Monad
@@ -15,6 +17,9 @@
 import Distribution.System
 import Distribution.Text
 import Distribution.Types.ComponentRequestedSpec
+#if MIN_VERSION_Cabal(3,15,0)
+import Distribution.Types.DependencySatisfaction ( DependencySatisfaction(Satisfied) )
+#endif
 import Distribution.Utils.Path ( getSymbolicPath, makeSymbolicPath )
 import Distribution.Utils.ShortText ( fromShortText )
 import Distribution.Verbosity
@@ -29,11 +34,26 @@
 cabal2spec :: Platform -> CompilerId -> FlagAssignment -> ForceBinary -> RunTests -> Maybe CopyrightYear
            -> FilePath -> FilePath -> IO ()
 cabal2spec platform compilerId flags forceBinary runTests copyrightYear cabalFile specFile = do
-  gpd <- readGenericPackageDescription silent Nothing (makeSymbolicPath cabalFile)
-  case finalizePD flags requestedComponents (const True) platform (unknownCompilerInfo compilerId NoAbiTag) [] gpd of
+  gpd <- readGenericPackageDescription silentVerbosity Nothing (makeSymbolicPath cabalFile)
+  case finalizePD flags requestedComponents (const satisfied) platform (unknownCompilerInfo compilerId NoAbiTag) [] gpd of
     Left missing -> fail ("finalizePD: " ++ show missing)
     Right (pd,_) -> createSpecFile specFile pd forceBinary runTests flags copyrightYear
 
+#if MIN_VERSION_Cabal(3,15,0)
+satisfied :: DependencySatisfaction
+satisfied = Satisfied
+#else
+satisfied :: Bool
+satisfied = True
+#endif
+
+silentVerbosity :: Verbosity
+#if MIN_VERSION_Cabal(3,17,0)
+silentVerbosity = mkVerbosity defaultVerbosityHandles silent
+#else
+silentVerbosity = silent
+#endif
+
 requestedComponents :: ComponentRequestedSpec
 requestedComponents = defaultComponentRequestedSpec
 
@@ -51,8 +71,9 @@
 
 createSpecFile :: FilePath -> PackageDescription -> ForceBinary -> RunTests -> FlagAssignment -> Maybe CopyrightYear -> IO ()
 createSpecFile specFile pkgDesc forceBinary runTests flagAssignment copyrightYear = do
-  let deps :: [String]
-      deps = map showDevelDep deps' ++ map showProfDep deps'
+  let develDeps, profDeps :: [String]
+      develDeps = map showDevelDep deps'
+      profDeps = map showProfDep deps'
       deps' :: [String]
       selfdep :: Bool
       (deps', selfdep) = buildDependencies pkgDesc name
@@ -153,15 +174,19 @@
   putHdr "ExcludeArch" "%{ix86}"
 
   let fixedDeps = ["ghc-Cabal-devel", "ghc-rpm-macros"]
-  let alldeps = sort $ nub $ fixedDeps ++ deps ++ tools ++ clibs ++ pkgcfgs ++ ["pkgconfig" | not (null pkgcfgs)]
-  let extraTestDeps = sort $ testsuiteDeps \\ deps
-  unless (null $ alldeps ++ extraTestDeps) $ do
-    mapM_ (putHdr "BuildRequires") alldeps
-    unless (null extraTestDeps) $ do
-      put "%if %{with tests}"
-      mapM_ (putHdr "BuildRequires") extraTestDeps
-      put "%endif"
+  let unconditialDeps = sort $ nub $ fixedDeps ++ develDeps ++ tools ++ clibs ++ pkgcfgs ++ ["pkgconfig" | not (null pkgcfgs)]
+  let extraTestDeps = sort $ testsuiteDeps \\ (develDeps ++ profDeps)
 
+  mapM_ (putHdr "BuildRequires") unconditialDeps
+  unless (null profDeps) $ do
+    put "%if %{with ghc_prof}"
+    mapM_ (putHdr "BuildRequires") profDeps
+    put "%endif"
+  unless (null extraTestDeps) $ do
+    put "%if %{with tests}"
+    mapM_ (putHdr "BuildRequires") extraTestDeps
+    put "%endif"
+
   putNewline
 
   put "%description"
@@ -197,6 +222,7 @@
         , "This package provides the Haskell %{pkg_name} library documentation."
         , ""
         , ""
+        , "%if %{with ghc_prof}"
         , "%package -n ghc-%{pkg_name}-prof"
         , "Summary:        Haskell %{pkg_name} profiling library"
         , "Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}"
@@ -204,6 +230,7 @@
         , ""
         , "%description -n ghc-%{pkg_name}-prof"
         , "This package provides the Haskell %{pkg_name} profiling library."
+        , "%endif"
         , ""
         ]
 
@@ -293,7 +320,9 @@
     put "%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files"
     mapM_ (\ l -> put $ license_macro +-+ l) licensefiles
     putNewline
+    put "%if %{with ghc_prof}"
     put "%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files"
+    put "%endif"
     putNewline
 
   put "%changelog"
@@ -305,7 +334,7 @@
 
 findDocs :: [FilePath] -> [FilePath] -> IO [FilePath]
 findDocs contents licensefiles = do
-  let docs = filter likely (sort (nub (map (head . splitDirectories) contents)))
+  let docs = filter likely (sort (nub (concatMap (take 1 . splitDirectories) contents)))
   return $ if null licensefiles
            then docs
            else filter (`notElem` licensefiles) docs
diff --git a/test/golden-test-cases/ChasingBottoms.spec.golden b/test/golden-test-cases/ChasingBottoms.spec.golden
--- a/test/golden-test-cases/ChasingBottoms.spec.golden
+++ b/test/golden-test-cases/ChasingBottoms.spec.golden
@@ -30,18 +30,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-syb-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-syb-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-array-devel
 BuildRequires:  ghc-array-prof
@@ -155,6 +157,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -162,6 +165,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -193,6 +197,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENCE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/Clipboard.spec.golden b/test/golden-test-cases/Clipboard.spec.golden
--- a/test/golden-test-cases/Clipboard.spec.golden
+++ b/test/golden-test-cases/Clipboard.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-X11-devel
-BuildRequires:  ghc-X11-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-unix-devel
-BuildRequires:  ghc-unix-prof
 BuildRequires:  ghc-utf8-string-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-X11-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-unix-prof
 BuildRequires:  ghc-utf8-string-prof
+%endif
 
 %description
 /Clipboard/ is a library for easily interfacing with the system clipboard with
@@ -88,6 +90,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -95,6 +98,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -125,6 +129,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license license
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/FenwickTree.spec.golden b/test/golden-test-cases/FenwickTree.spec.golden
--- a/test/golden-test-cases/FenwickTree.spec.golden
+++ b/test/golden-test-cases/FenwickTree.spec.golden
@@ -30,12 +30,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-template-haskell-prof
+%endif
 
 %description
 Fenwick trees are a O(log N) data structure for updating cumulative sums.
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -109,6 +113,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/GPipe-GLFW.spec.golden b/test/golden-test-cases/GPipe-GLFW.spec.golden
--- a/test/golden-test-cases/GPipe-GLFW.spec.golden
+++ b/test/golden-test-cases/GPipe-GLFW.spec.golden
@@ -29,18 +29,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-GLFW-b-devel
-BuildRequires:  ghc-GLFW-b-prof
 BuildRequires:  ghc-GPipe-devel
-BuildRequires:  ghc-GPipe-prof
 BuildRequires:  ghc-async-devel
-BuildRequires:  ghc-async-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-stm-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-GLFW-b-prof
+BuildRequires:  ghc-GPipe-prof
+BuildRequires:  ghc-async-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-stm-prof
+%endif
 
 %description
 GPipe-GLFW is a utility library to enable the use of GLFW as the OpenGL window
@@ -72,6 +74,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -79,6 +82,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -109,6 +113,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/GenericPretty.spec.golden b/test/golden-test-cases/GenericPretty.spec.golden
--- a/test/golden-test-cases/GenericPretty.spec.golden
+++ b/test/golden-test-cases/GenericPretty.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-pretty-devel
-BuildRequires:  ghc-pretty-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-pretty-prof
+%endif
 
 %description
 GenericPretty is a Haskell library that supports automatic derivation of pretty
@@ -91,6 +93,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -98,6 +101,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -128,6 +132,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/HPDF.spec.golden b/test/golden-test-cases/HPDF.spec.golden
--- a/test/golden-test-cases/HPDF.spec.golden
+++ b/test/golden-test-cases/HPDF.spec.golden
@@ -30,28 +30,30 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base64-bytestring-devel
-BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-errors-devel
-BuildRequires:  ghc-errors-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-zlib-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base64-bytestring-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-errors-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-random-prof
+BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-zlib-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HTF-devel
 BuildRequires:  ghc-HTF-prof
@@ -89,6 +91,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -96,6 +99,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -129,6 +133,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/HTF.spec.golden b/test/golden-test-cases/HTF.spec.golden
--- a/test/golden-test-cases/HTF.spec.golden
+++ b/test/golden-test-cases/HTF.spec.golden
@@ -31,56 +31,58 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-Diff-devel
-BuildRequires:  ghc-Diff-prof
 BuildRequires:  ghc-HUnit-devel
-BuildRequires:  ghc-HUnit-prof
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base64-bytestring-devel
-BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-cpphs-devel
-BuildRequires:  ghc-cpphs-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-haskell-src-devel
-BuildRequires:  ghc-haskell-src-prof
 BuildRequires:  ghc-lifted-base-devel
-BuildRequires:  ghc-lifted-base-prof
 BuildRequires:  ghc-monad-control-devel
-BuildRequires:  ghc-monad-control-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-old-time-devel
-BuildRequires:  ghc-old-time-prof
 BuildRequires:  ghc-pretty-devel
-BuildRequires:  ghc-pretty-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-regex-compat-devel
-BuildRequires:  ghc-regex-compat-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unix-devel
-BuildRequires:  ghc-unix-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-xmlgen-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-Diff-prof
+BuildRequires:  ghc-HUnit-prof
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base64-bytestring-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-cpphs-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-haskell-src-prof
+BuildRequires:  ghc-lifted-base-prof
+BuildRequires:  ghc-monad-control-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-old-time-prof
+BuildRequires:  ghc-pretty-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-random-prof
+BuildRequires:  ghc-regex-compat-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-unix-prof
+BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-xmlgen-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-aeson-pretty-devel
 BuildRequires:  ghc-aeson-pretty-prof
@@ -135,6 +137,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -142,6 +145,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -177,6 +181,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/HTTP.spec.golden b/test/golden-test-cases/HTTP.spec.golden
--- a/test/golden-test-cases/HTTP.spec.golden
+++ b/test/golden-test-cases/HTTP.spec.golden
@@ -30,22 +30,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-network-uri-devel
-BuildRequires:  ghc-network-uri-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-time-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-network-uri-prof
+BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-time-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -138,6 +140,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -145,6 +148,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -178,6 +182,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/Hclip.spec.golden b/test/golden-test-cases/Hclip.spec.golden
--- a/test/golden-test-cases/Hclip.spec.golden
+++ b/test/golden-test-cases/Hclip.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-strict-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-strict-prof
+%endif
 
 %description
 A small cross-platform library for reading and modifying the system clipboard.
@@ -76,6 +78,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -83,6 +86,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -111,6 +115,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/MissingH.spec.golden b/test/golden-test-cases/MissingH.spec.golden
--- a/test/golden-test-cases/MissingH.spec.golden
+++ b/test/golden-test-cases/MissingH.spec.golden
@@ -30,40 +30,42 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-HUnit-devel
-BuildRequires:  ghc-HUnit-prof
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-hslogger-devel
-BuildRequires:  ghc-hslogger-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-old-locale-devel
-BuildRequires:  ghc-old-locale-prof
 BuildRequires:  ghc-old-time-devel
-BuildRequires:  ghc-old-time-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-regex-compat-devel
-BuildRequires:  ghc-regex-compat-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unix-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-HUnit-prof
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-hslogger-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-old-locale-prof
+BuildRequires:  ghc-old-time-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-random-prof
+BuildRequires:  ghc-regex-compat-prof
+BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unix-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -103,6 +105,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -110,6 +113,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -143,6 +147,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/ObjectName.spec.golden b/test/golden-test-cases/ObjectName.spec.golden
--- a/test/golden-test-cases/ObjectName.spec.golden
+++ b/test/golden-test-cases/ObjectName.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 This tiny package contains the class ObjectName, which corresponds to the
@@ -64,6 +66,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -71,6 +74,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -101,6 +105,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/Only.spec.golden b/test/golden-test-cases/Only.spec.golden
--- a/test/golden-test-cases/Only.spec.golden
+++ b/test/golden-test-cases/Only.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-deepseq-prof
+%endif
 
 %description
 This package provides the canonical anonymous 1-tuple type missing from Haskell
@@ -63,6 +65,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -70,6 +73,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -98,6 +102,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/QuasiText.spec.golden b/test/golden-test-cases/QuasiText.spec.golden
--- a/test/golden-test-cases/QuasiText.spec.golden
+++ b/test/golden-test-cases/QuasiText.spec.golden
@@ -29,18 +29,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-haskell-src-meta-devel
-BuildRequires:  ghc-haskell-src-meta-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-th-lift-instances-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-haskell-src-meta-prof
+BuildRequires:  ghc-template-haskell-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-th-lift-instances-prof
+%endif
 
 %description
 A QuasiQuoter for interpolating values into Text strings.
@@ -70,6 +72,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -77,6 +80,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/QuickCheck.spec.golden b/test/golden-test-cases/QuickCheck.spec.golden
--- a/test/golden-test-cases/QuickCheck.spec.golden
+++ b/test/golden-test-cases/QuickCheck.spec.golden
@@ -30,20 +30,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-tf-random-devel
-BuildRequires:  ghc-tf-random-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-random-prof
+BuildRequires:  ghc-template-haskell-prof
+BuildRequires:  ghc-tf-random-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 QuickCheck is a library for random testing of program properties.
@@ -89,6 +91,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -96,6 +99,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -129,6 +133,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/ReadArgs.spec.golden b/test/golden-test-cases/ReadArgs.spec.golden
--- a/test/golden-test-cases/ReadArgs.spec.golden
+++ b/test/golden-test-cases/ReadArgs.spec.golden
@@ -30,12 +30,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-system-filepath-devel
-BuildRequires:  ghc-system-filepath-prof
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-system-filepath-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
@@ -110,6 +112,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -117,6 +120,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -149,6 +153,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/SHA.spec.golden b/test/golden-test-cases/SHA.spec.golden
--- a/test/golden-test-cases/SHA.spec.golden
+++ b/test/golden-test-cases/SHA.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bytestring-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -80,6 +82,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -87,6 +90,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -118,6 +122,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/Strafunski-StrategyLib.spec.golden b/test/golden-test-cases/Strafunski-StrategyLib.spec.golden
--- a/test/golden-test-cases/Strafunski-StrategyLib.spec.golden
+++ b/test/golden-test-cases/Strafunski-StrategyLib.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-syb-devel
-BuildRequires:  ghc-syb-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-syb-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 This is a version of the StrategyLib library originally shipped with
@@ -72,6 +74,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -79,6 +82,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -107,6 +111,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/accelerate-fftw.spec.golden b/test/golden-test-cases/accelerate-fftw.spec.golden
--- a/test/golden-test-cases/accelerate-fftw.spec.golden
+++ b/test/golden-test-cases/accelerate-fftw.spec.golden
@@ -30,17 +30,19 @@
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-accelerate-devel
 BuildRequires:  ghc-accelerate-io-devel
-BuildRequires:  ghc-accelerate-io-prof
-BuildRequires:  ghc-accelerate-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-carray-devel
-BuildRequires:  ghc-carray-prof
 BuildRequires:  ghc-fft-devel
-BuildRequires:  ghc-fft-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-storable-complex-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-accelerate-prof
+BuildRequires:  ghc-accelerate-io-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-carray-prof
+BuildRequires:  ghc-fft-prof
 BuildRequires:  ghc-storable-complex-prof
+%endif
 
 %description
 An interface to the Fastest Fourier Transform in the West (FFTW) for the
@@ -71,6 +73,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -78,6 +81,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -106,6 +110,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/accelerate.spec.golden b/test/golden-test-cases/accelerate.spec.golden
--- a/test/golden-test-cases/accelerate.spec.golden
+++ b/test/golden-test-cases/accelerate.spec.golden
@@ -29,42 +29,44 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-ansi-wl-pprint-devel
-BuildRequires:  ghc-ansi-wl-pprint-prof
 BuildRequires:  ghc-base-devel
 BuildRequires:  ghc-base-orphans-devel
-BuildRequires:  ghc-base-orphans-prof
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-fclabels-devel
-BuildRequires:  ghc-fclabels-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-hashtables-devel
-BuildRequires:  ghc-hashtables-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unique-devel
-BuildRequires:  ghc-unique-prof
 BuildRequires:  ghc-unix-devel
-BuildRequires:  ghc-unix-prof
 BuildRequires:  ghc-unordered-containers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-ansi-wl-pprint-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-orphans-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-fclabels-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-hashtables-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-template-haskell-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-unique-prof
+BuildRequires:  ghc-unix-prof
 BuildRequires:  ghc-unordered-containers-prof
+%endif
 
 %description
 'Data.Array.Accelerate' defines an embedded array language for computations for
@@ -192,6 +194,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -199,6 +202,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -229,6 +233,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/active.spec.golden b/test/golden-test-cases/active.spec.golden
--- a/test/golden-test-cases/active.spec.golden
+++ b/test/golden-test-cases/active.spec.golden
@@ -30,18 +30,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-lens-devel
-BuildRequires:  ghc-lens-prof
 BuildRequires:  ghc-linear-devel
-BuildRequires:  ghc-linear-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroupoids-devel
-BuildRequires:  ghc-semigroupoids-prof
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-lens-prof
+BuildRequires:  ghc-linear-prof
+BuildRequires:  ghc-semigroupoids-prof
+BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -75,6 +77,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -82,6 +85,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -115,6 +119,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/adjunctions.spec.golden b/test/golden-test-cases/adjunctions.spec.golden
--- a/test/golden-test-cases/adjunctions.spec.golden
+++ b/test/golden-test-cases/adjunctions.spec.golden
@@ -29,36 +29,38 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-comonad-devel
-BuildRequires:  ghc-comonad-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-contravariant-devel
-BuildRequires:  ghc-contravariant-prof
 BuildRequires:  ghc-distributive-devel
-BuildRequires:  ghc-distributive-prof
 BuildRequires:  ghc-free-devel
-BuildRequires:  ghc-free-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-profunctors-devel
-BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroupoids-devel
-BuildRequires:  ghc-semigroupoids-prof
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-void-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-comonad-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-contravariant-prof
+BuildRequires:  ghc-distributive-prof
+BuildRequires:  ghc-free-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-profunctors-prof
+BuildRequires:  ghc-semigroupoids-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-tagged-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-void-prof
+%endif
 
 %description
 Adjunctions and representable functors.
@@ -88,6 +90,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -95,6 +98,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -125,6 +129,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/aeson-diff.spec.golden b/test/golden-test-cases/aeson-diff.spec.golden
--- a/test/golden-test-cases/aeson-diff.spec.golden
+++ b/test/golden-test-cases/aeson-diff.spec.golden
@@ -31,28 +31,30 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-edit-distance-vector-devel
-BuildRequires:  ghc-edit-distance-vector-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-optparse-applicative-devel
-BuildRequires:  ghc-optparse-applicative-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-edit-distance-vector-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-optparse-applicative-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-Glob-devel
 BuildRequires:  ghc-Glob-prof
@@ -100,6 +102,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -107,6 +110,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -143,6 +147,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/aeson-pretty.spec.golden b/test/golden-test-cases/aeson-pretty.spec.golden
--- a/test/golden-test-cases/aeson-pretty.spec.golden
+++ b/test/golden-test-cases/aeson-pretty.spec.golden
@@ -30,26 +30,28 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-compat-devel
-BuildRequires:  ghc-base-compat-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cmdargs-devel
-BuildRequires:  ghc-cmdargs-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-compat-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-cmdargs-prof
+%endif
 
 %description
 A JSON pretty-printing library compatible with aeson as well as a command-line
@@ -91,6 +93,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -98,6 +101,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -130,6 +134,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/algebraic-graphs.spec.golden b/test/golden-test-cases/algebraic-graphs.spec.golden
--- a/test/golden-test-cases/algebraic-graphs.spec.golden
+++ b/test/golden-test-cases/algebraic-graphs.spec.golden
@@ -30,12 +30,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -100,6 +102,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -107,6 +110,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -140,6 +144,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/amazonka-cloudtrail.spec.golden b/test/golden-test-cases/amazonka-cloudtrail.spec.golden
--- a/test/golden-test-cases/amazonka-cloudtrail.spec.golden
+++ b/test/golden-test-cases/amazonka-cloudtrail.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-amazonka-core-devel
-BuildRequires:  ghc-amazonka-core-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-amazonka-core-prof
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-amazonka-test-devel
 BuildRequires:  ghc-amazonka-test-prof
@@ -92,6 +94,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -99,6 +102,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -132,6 +136,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/amazonka-cloudwatch-logs.spec.golden b/test/golden-test-cases/amazonka-cloudwatch-logs.spec.golden
--- a/test/golden-test-cases/amazonka-cloudwatch-logs.spec.golden
+++ b/test/golden-test-cases/amazonka-cloudwatch-logs.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-amazonka-core-devel
-BuildRequires:  ghc-amazonka-core-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-amazonka-core-prof
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-amazonka-test-devel
 BuildRequires:  ghc-amazonka-test-prof
@@ -92,6 +94,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -99,6 +102,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -132,6 +136,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/amazonka-codedeploy.spec.golden b/test/golden-test-cases/amazonka-codedeploy.spec.golden
--- a/test/golden-test-cases/amazonka-codedeploy.spec.golden
+++ b/test/golden-test-cases/amazonka-codedeploy.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-amazonka-core-devel
-BuildRequires:  ghc-amazonka-core-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-amazonka-core-prof
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-amazonka-test-devel
 BuildRequires:  ghc-amazonka-test-prof
@@ -92,6 +94,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -99,6 +102,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -132,6 +136,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/amazonka-cognito-idp.spec.golden b/test/golden-test-cases/amazonka-cognito-idp.spec.golden
--- a/test/golden-test-cases/amazonka-cognito-idp.spec.golden
+++ b/test/golden-test-cases/amazonka-cognito-idp.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-amazonka-core-devel
-BuildRequires:  ghc-amazonka-core-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-amazonka-core-prof
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-amazonka-test-devel
 BuildRequires:  ghc-amazonka-test-prof
@@ -92,6 +94,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -99,6 +102,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -132,6 +136,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/amazonka-ecs.spec.golden b/test/golden-test-cases/amazonka-ecs.spec.golden
--- a/test/golden-test-cases/amazonka-ecs.spec.golden
+++ b/test/golden-test-cases/amazonka-ecs.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-amazonka-core-devel
-BuildRequires:  ghc-amazonka-core-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-amazonka-core-prof
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-amazonka-test-devel
 BuildRequires:  ghc-amazonka-test-prof
@@ -91,6 +93,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -98,6 +101,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -131,6 +135,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/amazonka-kms.spec.golden b/test/golden-test-cases/amazonka-kms.spec.golden
--- a/test/golden-test-cases/amazonka-kms.spec.golden
+++ b/test/golden-test-cases/amazonka-kms.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-amazonka-core-devel
-BuildRequires:  ghc-amazonka-core-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-amazonka-core-prof
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-amazonka-test-devel
 BuildRequires:  ghc-amazonka-test-prof
@@ -91,6 +93,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -98,6 +101,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -131,6 +135,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/amazonka-lightsail.spec.golden b/test/golden-test-cases/amazonka-lightsail.spec.golden
--- a/test/golden-test-cases/amazonka-lightsail.spec.golden
+++ b/test/golden-test-cases/amazonka-lightsail.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-amazonka-core-devel
-BuildRequires:  ghc-amazonka-core-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-amazonka-core-prof
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-amazonka-test-devel
 BuildRequires:  ghc-amazonka-test-prof
@@ -91,6 +93,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -98,6 +101,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -131,6 +135,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/amazonka-route53-domains.spec.golden b/test/golden-test-cases/amazonka-route53-domains.spec.golden
--- a/test/golden-test-cases/amazonka-route53-domains.spec.golden
+++ b/test/golden-test-cases/amazonka-route53-domains.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-amazonka-core-devel
-BuildRequires:  ghc-amazonka-core-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-amazonka-core-prof
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-amazonka-test-devel
 BuildRequires:  ghc-amazonka-test-prof
@@ -92,6 +94,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -99,6 +102,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -132,6 +136,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/amazonka-waf.spec.golden b/test/golden-test-cases/amazonka-waf.spec.golden
--- a/test/golden-test-cases/amazonka-waf.spec.golden
+++ b/test/golden-test-cases/amazonka-waf.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-amazonka-core-devel
-BuildRequires:  ghc-amazonka-core-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-amazonka-core-prof
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-amazonka-test-devel
 BuildRequires:  ghc-amazonka-test-prof
@@ -91,6 +93,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -98,6 +101,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -131,6 +135,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/api-field-json-th.spec.golden b/test/golden-test-cases/api-field-json-th.spec.golden
--- a/test/golden-test-cases/api-field-json-th.spec.golden
+++ b/test/golden-test-cases/api-field-json-th.spec.golden
@@ -30,18 +30,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-lens-devel
-BuildRequires:  ghc-lens-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-split-devel
-BuildRequires:  ghc-split-prof
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-lens-prof
+BuildRequires:  ghc-split-prof
+BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -75,6 +77,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -82,6 +85,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -113,6 +117,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/app-settings.spec.golden b/test/golden-test-cases/app-settings.spec.golden
--- a/test/golden-test-cases/app-settings.spec.golden
+++ b/test/golden-test-cases/app-settings.spec.golden
@@ -30,18 +30,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -151,6 +153,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -158,6 +161,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -189,6 +193,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/apply-refact.spec.golden b/test/golden-test-cases/apply-refact.spec.golden
--- a/test/golden-test-cases/apply-refact.spec.golden
+++ b/test/golden-test-cases/apply-refact.spec.golden
@@ -30,36 +30,38 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-filemanip-devel
-BuildRequires:  ghc-filemanip-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-ghc-devel
 BuildRequires:  ghc-ghc-exactprint-devel
-BuildRequires:  ghc-ghc-exactprint-prof
-BuildRequires:  ghc-ghc-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-optparse-applicative-devel
-BuildRequires:  ghc-optparse-applicative-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-refact-devel
-BuildRequires:  ghc-refact-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-syb-devel
-BuildRequires:  ghc-syb-prof
 BuildRequires:  ghc-temporary-devel
-BuildRequires:  ghc-temporary-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unix-compat-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-filemanip-prof
+BuildRequires:  ghc-ghc-prof
+BuildRequires:  ghc-ghc-exactprint-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-refact-prof
+BuildRequires:  ghc-syb-prof
+BuildRequires:  ghc-temporary-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unix-compat-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-optparse-applicative-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-silently-devel
 BuildRequires:  ghc-silently-prof
@@ -100,6 +102,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -107,6 +110,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -141,6 +145,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/async.spec.golden b/test/golden-test-cases/async.spec.golden
--- a/test/golden-test-cases/async.spec.golden
+++ b/test/golden-test-cases/async.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-stm-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-stm-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -83,6 +85,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -90,6 +93,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -123,6 +127,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/attoparsec-expr.spec.golden b/test/golden-test-cases/attoparsec-expr.spec.golden
--- a/test/golden-test-cases/attoparsec-expr.spec.golden
+++ b/test/golden-test-cases/attoparsec-expr.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 Port of parsec's expression parser to attoparsec.
@@ -62,6 +64,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -69,6 +72,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -99,6 +103,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/attoparsec-time.spec.golden b/test/golden-test-cases/attoparsec-time.spec.golden
--- a/test/golden-test-cases/attoparsec-time.spec.golden
+++ b/test/golden-test-cases/attoparsec-time.spec.golden
@@ -29,24 +29,26 @@
 Source0:        https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
-BuildRequires:  ghc-Cabal-prof
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
 BuildRequires:  ghc-base-prelude-devel
-BuildRequires:  ghc-base-prelude-prof
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cabal-doctest-devel
-BuildRequires:  ghc-cabal-doctest-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-prelude-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-Cabal-prof
+BuildRequires:  ghc-cabal-doctest-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-directory-prof
@@ -84,6 +86,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -91,6 +94,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -122,6 +126,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/avers-server.spec.golden b/test/golden-test-cases/avers-server.spec.golden
--- a/test/golden-test-cases/avers-server.spec.golden
+++ b/test/golden-test-cases/avers-server.spec.golden
@@ -29,54 +29,56 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-avers-api-devel
-BuildRequires:  ghc-avers-api-prof
 BuildRequires:  ghc-avers-devel
-BuildRequires:  ghc-avers-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base64-bytestring-devel
-BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-bytestring-conversion-devel
-BuildRequires:  ghc-bytestring-conversion-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-cookie-devel
-BuildRequires:  ghc-cookie-prof
 BuildRequires:  ghc-cryptonite-devel
-BuildRequires:  ghc-cryptonite-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-memory-devel
-BuildRequires:  ghc-memory-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-resource-pool-devel
-BuildRequires:  ghc-resource-pool-prof
 BuildRequires:  ghc-rethinkdb-client-driver-devel
-BuildRequires:  ghc-rethinkdb-client-driver-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-servant-devel
-BuildRequires:  ghc-servant-prof
 BuildRequires:  ghc-servant-server-devel
-BuildRequires:  ghc-servant-server-prof
 BuildRequires:  ghc-stm-devel
-BuildRequires:  ghc-stm-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-wai-devel
-BuildRequires:  ghc-wai-prof
 BuildRequires:  ghc-wai-websockets-devel
-BuildRequires:  ghc-wai-websockets-prof
 BuildRequires:  ghc-websockets-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-avers-prof
+BuildRequires:  ghc-avers-api-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base64-bytestring-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-bytestring-conversion-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-cookie-prof
+BuildRequires:  ghc-cryptonite-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-memory-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-resource-pool-prof
+BuildRequires:  ghc-rethinkdb-client-driver-prof
+BuildRequires:  ghc-servant-prof
+BuildRequires:  ghc-servant-server-prof
+BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-wai-prof
+BuildRequires:  ghc-wai-websockets-prof
 BuildRequires:  ghc-websockets-prof
+%endif
 
 %description
 Server implementation of the Avers API.
@@ -106,6 +108,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -113,6 +116,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -141,6 +145,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/aws.spec.golden b/test/golden-test-cases/aws.spec.golden
--- a/test/golden-test-cases/aws.spec.golden
+++ b/test/golden-test-cases/aws.spec.golden
@@ -30,78 +30,80 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base16-bytestring-devel
-BuildRequires:  ghc-base16-bytestring-prof
 BuildRequires:  ghc-base64-bytestring-devel
-BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-blaze-builder-devel
-BuildRequires:  ghc-blaze-builder-prof
 BuildRequires:  ghc-byteable-devel
-BuildRequires:  ghc-byteable-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-case-insensitive-devel
-BuildRequires:  ghc-case-insensitive-prof
 BuildRequires:  ghc-cereal-devel
-BuildRequires:  ghc-cereal-prof
 BuildRequires:  ghc-conduit-devel
 BuildRequires:  ghc-conduit-extra-devel
-BuildRequires:  ghc-conduit-extra-prof
-BuildRequires:  ghc-conduit-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-cryptonite-devel
-BuildRequires:  ghc-cryptonite-prof
 BuildRequires:  ghc-data-default-devel
-BuildRequires:  ghc-data-default-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-http-conduit-devel
-BuildRequires:  ghc-http-conduit-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-lifted-base-devel
-BuildRequires:  ghc-lifted-base-prof
 BuildRequires:  ghc-memory-devel
-BuildRequires:  ghc-memory-prof
 BuildRequires:  ghc-monad-control-devel
-BuildRequires:  ghc-monad-control-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-old-locale-devel
-BuildRequires:  ghc-old-locale-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-safe-devel
-BuildRequires:  ghc-safe-prof
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-utf8-string-devel
-BuildRequires:  ghc-utf8-string-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-xml-conduit-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base16-bytestring-prof
+BuildRequires:  ghc-base64-bytestring-prof
+BuildRequires:  ghc-blaze-builder-prof
+BuildRequires:  ghc-byteable-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-case-insensitive-prof
+BuildRequires:  ghc-cereal-prof
+BuildRequires:  ghc-conduit-prof
+BuildRequires:  ghc-conduit-extra-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-cryptonite-prof
+BuildRequires:  ghc-data-default-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-http-conduit-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-lifted-base-prof
+BuildRequires:  ghc-memory-prof
+BuildRequires:  ghc-monad-control-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-old-locale-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-safe-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-tagged-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-unordered-containers-prof
+BuildRequires:  ghc-utf8-string-prof
+BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-xml-conduit-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -155,6 +157,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -162,6 +165,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -195,6 +199,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/bbdb.spec.golden b/test/golden-test-cases/bbdb.spec.golden
--- a/test/golden-test-cases/bbdb.spec.golden
+++ b/test/golden-test-cases/bbdb.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-parsec-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
@@ -71,6 +73,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -78,6 +81,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -111,6 +115,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/benchpress.spec.golden b/test/golden-test-cases/benchpress.spec.golden
--- a/test/golden-test-cases/benchpress.spec.golden
+++ b/test/golden-test-cases/benchpress.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-time-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-bytestring-prof
+%endif
 
 %description
 Benchmarks actions and produces statistics such as min, mean, median, standard
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/binary-bits.spec.golden b/test/golden-test-cases/binary-bits.spec.golden
--- a/test/golden-test-cases/binary-bits.spec.golden
+++ b/test/golden-test-cases/binary-bits.spec.golden
@@ -30,12 +30,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bytestring-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -76,6 +78,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -83,6 +86,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -114,6 +118,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/binary-tagged.spec.golden b/test/golden-test-cases/binary-tagged.spec.golden
--- a/test/golden-test-cases/binary-tagged.spec.golden
+++ b/test/golden-test-cases/binary-tagged.spec.golden
@@ -30,42 +30,44 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-SHA-devel
-BuildRequires:  ghc-SHA-prof
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base16-bytestring-devel
-BuildRequires:  ghc-base16-bytestring-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-generics-sop-devel
-BuildRequires:  ghc-generics-sop-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-nats-devel
-BuildRequires:  ghc-nats-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-SHA-prof
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base16-bytestring-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-generics-sop-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-nats-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-tagged-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-bifunctors-devel
 BuildRequires:  ghc-bifunctors-prof
@@ -107,6 +109,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -114,6 +117,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -147,6 +151,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/bindings-uname.spec.golden b/test/golden-test-cases/bindings-uname.spec.golden
--- a/test/golden-test-cases/bindings-uname.spec.golden
+++ b/test/golden-test-cases/bindings-uname.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 This is a low-level binding to POSIX uname(3) function. Perhaps it shoule be
@@ -61,6 +63,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -68,6 +71,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -93,6 +97,8 @@
 
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/bioalign.spec.golden b/test/golden-test-cases/bioalign.spec.golden
--- a/test/golden-test-cases/bioalign.spec.golden
+++ b/test/golden-test-cases/bioalign.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-biocore-devel
-BuildRequires:  ghc-biocore-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-biocore-prof
+BuildRequires:  ghc-bytestring-prof
+%endif
 
 %description
 Data structures and helper functions for calculating alignments.
@@ -64,6 +66,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -71,6 +74,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -99,6 +103,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/bits.spec.golden b/test/golden-test-cases/bits.spec.golden
--- a/test/golden-test-cases/bits.spec.golden
+++ b/test/golden-test-cases/bits.spec.golden
@@ -29,18 +29,20 @@
 Source0:        https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
-BuildRequires:  ghc-Cabal-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytes-devel
-BuildRequires:  ghc-bytes-prof
 BuildRequires:  ghc-cabal-doctest-devel
-BuildRequires:  ghc-cabal-doctest-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytes-prof
+BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-Cabal-prof
+BuildRequires:  ghc-cabal-doctest-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-doctest-devel
 BuildRequires:  ghc-doctest-prof
@@ -74,6 +76,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -81,6 +84,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -114,6 +118,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/blank-canvas.spec.golden b/test/golden-test-cases/blank-canvas.spec.golden
--- a/test/golden-test-cases/blank-canvas.spec.golden
+++ b/test/golden-test-cases/blank-canvas.spec.golden
@@ -30,46 +30,48 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-compat-devel
-BuildRequires:  ghc-base-compat-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base64-bytestring-devel
-BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-colour-devel
-BuildRequires:  ghc-colour-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-data-default-class-devel
-BuildRequires:  ghc-data-default-class-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-kansas-comet-devel
-BuildRequires:  ghc-kansas-comet-prof
 BuildRequires:  ghc-mime-types-devel
-BuildRequires:  ghc-mime-types-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scotty-devel
-BuildRequires:  ghc-scotty-prof
 BuildRequires:  ghc-stm-devel
-BuildRequires:  ghc-stm-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-text-show-devel
-BuildRequires:  ghc-text-show-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-wai-devel
 BuildRequires:  ghc-wai-extra-devel
-BuildRequires:  ghc-wai-extra-prof
-BuildRequires:  ghc-wai-prof
 BuildRequires:  ghc-warp-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-compat-prof
+BuildRequires:  ghc-base64-bytestring-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-colour-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-data-default-class-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-kansas-comet-prof
+BuildRequires:  ghc-mime-types-prof
+BuildRequires:  ghc-scotty-prof
+BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-text-show-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-wai-prof
+BuildRequires:  ghc-wai-extra-prof
 BuildRequires:  ghc-warp-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-directory-prof
@@ -129,6 +131,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -136,6 +139,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -174,6 +178,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/blaze-html.spec.golden b/test/golden-test-cases/blaze-html.spec.golden
--- a/test/golden-test-cases/blaze-html.spec.golden
+++ b/test/golden-test-cases/blaze-html.spec.golden
@@ -30,16 +30,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-builder-devel
-BuildRequires:  ghc-blaze-builder-prof
 BuildRequires:  ghc-blaze-markup-devel
-BuildRequires:  ghc-blaze-markup-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-builder-prof
+BuildRequires:  ghc-blaze-markup-prof
+BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -85,6 +87,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -92,6 +95,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -125,6 +129,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/blaze-markup.spec.golden b/test/golden-test-cases/blaze-markup.spec.golden
--- a/test/golden-test-cases/blaze-markup.spec.golden
+++ b/test/golden-test-cases/blaze-markup.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-builder-devel
-BuildRequires:  ghc-blaze-builder-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-builder-prof
+BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -83,6 +85,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -90,6 +93,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -123,6 +127,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/blaze-svg.spec.golden b/test/golden-test-cases/blaze-svg.spec.golden
--- a/test/golden-test-cases/blaze-svg.spec.golden
+++ b/test/golden-test-cases/blaze-svg.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-markup-devel
-BuildRequires:  ghc-blaze-markup-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-markup-prof
+BuildRequires:  ghc-mtl-prof
+%endif
 
 %description
 A blazingly fast SVG combinator library for the Haskell programming language.
@@ -75,6 +77,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -82,6 +85,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -112,6 +116,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/blosum.spec.golden b/test/golden-test-cases/blosum.spec.golden
--- a/test/golden-test-cases/blosum.spec.golden
+++ b/test/golden-test-cases/blosum.spec.golden
@@ -30,26 +30,28 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-fasta-devel
-BuildRequires:  ghc-fasta-prof
 BuildRequires:  ghc-lens-devel
-BuildRequires:  ghc-lens-prof
 BuildRequires:  ghc-optparse-applicative-devel
-BuildRequires:  ghc-optparse-applicative-prof
 BuildRequires:  ghc-pipes-devel
-BuildRequires:  ghc-pipes-prof
 BuildRequires:  ghc-pipes-text-devel
-BuildRequires:  ghc-pipes-text-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-split-devel
-BuildRequires:  ghc-split-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-text-show-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-fasta-prof
+BuildRequires:  ghc-lens-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-text-show-prof
+BuildRequires:  ghc-optparse-applicative-prof
+BuildRequires:  ghc-pipes-prof
+BuildRequires:  ghc-pipes-text-prof
+BuildRequires:  ghc-split-prof
+%endif
 
 %description
 Generates BLOSUMs for use with finding the degree of amino acid conservation.
@@ -79,6 +81,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -86,6 +89,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -116,6 +120,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/boomerang.spec.golden b/test/golden-test-cases/boomerang.spec.golden
--- a/test/golden-test-cases/boomerang.spec.golden
+++ b/test/golden-test-cases/boomerang.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 Specify a single unified grammar which can be used for parsing and
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -102,6 +106,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/boxes.spec.golden b/test/golden-test-cases/boxes.spec.golden
--- a/test/golden-test-cases/boxes.spec.golden
+++ b/test/golden-test-cases/boxes.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-split-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-split-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -108,6 +112,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/brittany.spec.golden b/test/golden-test-cases/brittany.spec.golden
--- a/test/golden-test-cases/brittany.spec.golden
+++ b/test/golden-test-cases/brittany.spec.golden
@@ -31,68 +31,70 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-butcher-devel
-BuildRequires:  ghc-butcher-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cmdargs-devel
-BuildRequires:  ghc-cmdargs-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-czipwith-devel
-BuildRequires:  ghc-czipwith-prof
 BuildRequires:  ghc-data-tree-print-devel
-BuildRequires:  ghc-data-tree-print-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-extra-devel
-BuildRequires:  ghc-extra-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-ghc-boot-th-devel
-BuildRequires:  ghc-ghc-boot-th-prof
 BuildRequires:  ghc-ghc-devel
 BuildRequires:  ghc-ghc-exactprint-devel
-BuildRequires:  ghc-ghc-exactprint-prof
 BuildRequires:  ghc-ghc-paths-devel
-BuildRequires:  ghc-ghc-paths-prof
-BuildRequires:  ghc-ghc-prof
 BuildRequires:  ghc-hspec-devel
-BuildRequires:  ghc-hspec-prof
 BuildRequires:  ghc-monad-memo-devel
-BuildRequires:  ghc-monad-memo-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-multistate-devel
-BuildRequires:  ghc-multistate-prof
 BuildRequires:  ghc-neat-interpolation-devel
-BuildRequires:  ghc-neat-interpolation-prof
 BuildRequires:  ghc-pretty-devel
-BuildRequires:  ghc-pretty-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-safe-devel
-BuildRequires:  ghc-safe-prof
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-strict-devel
-BuildRequires:  ghc-strict-prof
 BuildRequires:  ghc-syb-devel
-BuildRequires:  ghc-syb-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-uniplate-devel
-BuildRequires:  ghc-uniplate-prof
 BuildRequires:  ghc-unsafe-devel
-BuildRequires:  ghc-unsafe-prof
 BuildRequires:  ghc-yaml-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-butcher-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-cmdargs-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-czipwith-prof
+BuildRequires:  ghc-data-tree-print-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-extra-prof
+BuildRequires:  ghc-ghc-prof
+BuildRequires:  ghc-ghc-boot-th-prof
+BuildRequires:  ghc-ghc-exactprint-prof
+BuildRequires:  ghc-ghc-paths-prof
+BuildRequires:  ghc-monad-memo-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-multistate-prof
+BuildRequires:  ghc-neat-interpolation-prof
+BuildRequires:  ghc-pretty-prof
+BuildRequires:  ghc-safe-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-strict-prof
+BuildRequires:  ghc-syb-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-uniplate-prof
+BuildRequires:  ghc-unsafe-prof
 BuildRequires:  ghc-yaml-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-hspec-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-parsec-devel
 BuildRequires:  ghc-parsec-prof
@@ -134,6 +136,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -141,6 +144,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -176,6 +180,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/broadcast-chan.spec.golden b/test/golden-test-cases/broadcast-chan.spec.golden
--- a/test/golden-test-cases/broadcast-chan.spec.golden
+++ b/test/golden-test-cases/broadcast-chan.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 A variation of "Control.Concurrent.Chan" from base, which allows to the easy
@@ -69,6 +71,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -76,6 +79,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/butcher.spec.golden b/test/golden-test-cases/butcher.spec.golden
--- a/test/golden-test-cases/butcher.spec.golden
+++ b/test/golden-test-cases/butcher.spec.golden
@@ -29,36 +29,38 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bifunctors-devel
-BuildRequires:  ghc-bifunctors-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deque-devel
-BuildRequires:  ghc-deque-prof
 BuildRequires:  ghc-either-devel
-BuildRequires:  ghc-either-prof
 BuildRequires:  ghc-extra-devel
-BuildRequires:  ghc-extra-prof
 BuildRequires:  ghc-free-devel
-BuildRequires:  ghc-free-prof
 BuildRequires:  ghc-microlens-devel
-BuildRequires:  ghc-microlens-prof
 BuildRequires:  ghc-microlens-th-devel
-BuildRequires:  ghc-microlens-th-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-multistate-devel
-BuildRequires:  ghc-multistate-prof
 BuildRequires:  ghc-pretty-devel
-BuildRequires:  ghc-pretty-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unsafe-devel
-BuildRequires:  ghc-unsafe-prof
 BuildRequires:  ghc-void-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bifunctors-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-deque-prof
+BuildRequires:  ghc-either-prof
+BuildRequires:  ghc-extra-prof
+BuildRequires:  ghc-free-prof
+BuildRequires:  ghc-microlens-prof
+BuildRequires:  ghc-microlens-th-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-multistate-prof
+BuildRequires:  ghc-pretty-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-unsafe-prof
 BuildRequires:  ghc-void-prof
+%endif
 
 %description
 See the <https://github.com/lspitzner/butcher/blob/master/README.md README> (it
@@ -89,6 +91,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -96,6 +99,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -126,6 +130,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/bzlib.spec.golden b/test/golden-test-cases/bzlib.spec.golden
--- a/test/golden-test-cases/bzlib.spec.golden
+++ b/test/golden-test-cases/bzlib.spec.golden
@@ -29,11 +29,13 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  libbz2-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+%endif
 
 %description
 This package provides a pure interface for compressing and decompressing
@@ -70,6 +72,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -77,6 +80,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -107,6 +111,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/case-insensitive.spec.golden b/test/golden-test-cases/case-insensitive.spec.golden
--- a/test/golden-test-cases/case-insensitive.spec.golden
+++ b/test/golden-test-cases/case-insensitive.spec.golden
@@ -30,16 +30,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -79,6 +81,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -86,6 +89,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -119,6 +123,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/cassava-conduit.spec.golden b/test/golden-test-cases/cassava-conduit.spec.golden
--- a/test/golden-test-cases/cassava-conduit.spec.golden
+++ b/test/golden-test-cases/cassava-conduit.spec.golden
@@ -30,26 +30,28 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bifunctors-devel
-BuildRequires:  ghc-bifunctors-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cassava-devel
-BuildRequires:  ghc-cassava-prof
 BuildRequires:  ghc-conduit-devel
 BuildRequires:  ghc-conduit-extra-devel
-BuildRequires:  ghc-conduit-extra-prof
-BuildRequires:  ghc-conduit-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bifunctors-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-cassava-prof
+BuildRequires:  ghc-conduit-prof
+BuildRequires:  ghc-conduit-extra-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -85,6 +87,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -92,6 +95,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -125,6 +129,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license etc/LICENCE.md
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/cassette.spec.golden b/test/golden-test-cases/cassette.spec.golden
--- a/test/golden-test-cases/cassette.spec.golden
+++ b/test/golden-test-cases/cassette.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 Combinator library for defining both type safe parsers and pretty printers
@@ -63,6 +65,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -70,6 +73,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -98,6 +102,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/cereal-text.spec.golden b/test/golden-test-cases/cereal-text.spec.golden
--- a/test/golden-test-cases/cereal-text.spec.golden
+++ b/test/golden-test-cases/cereal-text.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-cereal-devel
-BuildRequires:  ghc-cereal-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-cereal-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 Data.Text instances for the cereal serialization library.
@@ -69,6 +71,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -76,6 +79,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -106,6 +110,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/cheapskate.spec.golden b/test/golden-test-cases/cheapskate.spec.golden
--- a/test/golden-test-cases/cheapskate.spec.golden
+++ b/test/golden-test-cases/cheapskate.spec.golden
@@ -30,28 +30,30 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-html-devel
-BuildRequires:  ghc-blaze-html-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-data-default-devel
-BuildRequires:  ghc-data-default-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-syb-devel
-BuildRequires:  ghc-syb-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-uniplate-devel
-BuildRequires:  ghc-uniplate-prof
 BuildRequires:  ghc-xss-sanitize-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-html-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-data-default-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-syb-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-uniplate-prof
 BuildRequires:  ghc-xss-sanitize-prof
+BuildRequires:  ghc-bytestring-prof
+%endif
 
 %description
 This is an experimental Markdown processor in pure Haskell. It aims to process
@@ -88,6 +90,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -95,6 +98,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -127,6 +131,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/chell.spec.golden b/test/golden-test-cases/chell.spec.golden
--- a/test/golden-test-cases/chell.spec.golden
+++ b/test/golden-test-cases/chell.spec.golden
@@ -29,24 +29,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-ansi-terminal-devel
-BuildRequires:  ghc-ansi-terminal-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-options-devel
-BuildRequires:  ghc-options-prof
 BuildRequires:  ghc-patience-devel
-BuildRequires:  ghc-patience-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-ansi-terminal-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-options-prof
+BuildRequires:  ghc-patience-prof
+BuildRequires:  ghc-random-prof
+BuildRequires:  ghc-template-haskell-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 Chell is a simple and intuitive library for automated testing. It natively
@@ -98,6 +100,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -105,6 +108,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -133,6 +137,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license license.txt
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/clumpiness.spec.golden b/test/golden-test-cases/clumpiness.spec.golden
--- a/test/golden-test-cases/clumpiness.spec.golden
+++ b/test/golden-test-cases/clumpiness.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-tree-fun-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-tree-fun-prof
+%endif
 
 %description
 Calculate the clumpiness of leaf properties in a tree.
@@ -64,6 +66,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -71,6 +74,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -99,6 +103,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/code-page.spec.golden b/test/golden-test-cases/code-page.spec.golden
--- a/test/golden-test-cases/code-page.spec.golden
+++ b/test/golden-test-cases/code-page.spec.golden
@@ -30,8 +30,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 This library provides two modules:
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -108,6 +112,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/colorize-haskell.spec.golden b/test/golden-test-cases/colorize-haskell.spec.golden
--- a/test/golden-test-cases/colorize-haskell.spec.golden
+++ b/test/golden-test-cases/colorize-haskell.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-ansi-terminal-devel
-BuildRequires:  ghc-ansi-terminal-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-haskell-lexer-devel
-BuildRequires:  ghc-haskell-lexer-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-ansi-terminal-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-haskell-lexer-prof
+%endif
 
 %description
 Highligt Haskell source.
@@ -64,6 +66,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -71,6 +74,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -100,6 +104,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/countable.spec.golden b/test/golden-test-cases/countable.spec.golden
--- a/test/golden-test-cases/countable.spec.golden
+++ b/test/golden-test-cases/countable.spec.golden
@@ -30,8 +30,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-bytestring-prof
@@ -97,6 +99,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -104,6 +107,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -135,6 +139,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/cpu.spec.golden b/test/golden-test-cases/cpu.spec.golden
--- a/test/golden-test-cases/cpu.spec.golden
+++ b/test/golden-test-cases/cpu.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 Lowlevel cpu routines to get basic properties of the cpu platform, like
@@ -61,6 +63,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -68,6 +71,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -98,6 +102,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/criterion.spec.golden b/test/golden-test-cases/criterion.spec.golden
--- a/test/golden-test-cases/criterion.spec.golden
+++ b/test/golden-test-cases/criterion.spec.golden
@@ -31,64 +31,66 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-Glob-devel
-BuildRequires:  ghc-Glob-prof
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-ansi-wl-pprint-devel
-BuildRequires:  ghc-ansi-wl-pprint-prof
 BuildRequires:  ghc-base-compat-devel
-BuildRequires:  ghc-base-compat-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cassava-devel
-BuildRequires:  ghc-cassava-prof
 BuildRequires:  ghc-code-page-devel
-BuildRequires:  ghc-code-page-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-js-flot-devel
-BuildRequires:  ghc-js-flot-prof
 BuildRequires:  ghc-js-jquery-devel
-BuildRequires:  ghc-js-jquery-prof
 BuildRequires:  ghc-microstache-devel
-BuildRequires:  ghc-microstache-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-mwc-random-devel
-BuildRequires:  ghc-mwc-random-prof
 BuildRequires:  ghc-optparse-applicative-devel
-BuildRequires:  ghc-optparse-applicative-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-statistics-devel
-BuildRequires:  ghc-statistics-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-algorithms-devel
-BuildRequires:  ghc-vector-algorithms-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-Glob-prof
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-ansi-wl-pprint-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-compat-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-cassava-prof
+BuildRequires:  ghc-code-page-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-js-flot-prof
+BuildRequires:  ghc-js-jquery-prof
+BuildRequires:  ghc-microstache-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-mwc-random-prof
+BuildRequires:  ghc-optparse-applicative-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-statistics-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-vector-algorithms-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -140,6 +142,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -147,6 +150,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -188,6 +192,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/crypt-sha512.spec.golden b/test/golden-test-cases/crypt-sha512.spec.golden
--- a/test/golden-test-cases/crypt-sha512.spec.golden
+++ b/test/golden-test-cases/crypt-sha512.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cryptohash-sha512-devel
-BuildRequires:  ghc-cryptohash-sha512-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-cryptohash-sha512-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-quickcheck-instances-devel
 BuildRequires:  ghc-quickcheck-instances-prof
@@ -81,6 +83,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -88,6 +91,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -121,6 +125,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/crypto-random-api.spec.golden b/test/golden-test-cases/crypto-random-api.spec.golden
--- a/test/golden-test-cases/crypto-random-api.spec.golden
+++ b/test/golden-test-cases/crypto-random-api.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-entropy-devel
-BuildRequires:  ghc-entropy-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-entropy-prof
+%endif
 
 %description
 Simple random generators API for cryptography related code.
@@ -64,6 +66,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -71,6 +74,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -99,6 +103,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/csv.spec.golden b/test/golden-test-cases/csv.spec.golden
--- a/test/golden-test-cases/csv.spec.golden
+++ b/test/golden-test-cases/csv.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-parsec-prof
+%endif
 
 %description
 CSV loader and dumper
@@ -69,6 +71,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -76,6 +79,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license COPYING
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/data-accessor.spec.golden b/test/golden-test-cases/data-accessor.spec.golden
--- a/test/golden-test-cases/data-accessor.spec.golden
+++ b/test/golden-test-cases/data-accessor.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 In Haskell 98 the name of a record field is automatically also the name of a
@@ -113,6 +115,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -120,6 +123,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -148,6 +152,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/data-default-instances-containers.spec.golden b/test/golden-test-cases/data-default-instances-containers.spec.golden
--- a/test/golden-test-cases/data-default-instances-containers.spec.golden
+++ b/test/golden-test-cases/data-default-instances-containers.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-data-default-class-devel
-BuildRequires:  ghc-data-default-class-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-data-default-class-prof
+%endif
 
 %description
 Default instances for types in containers.
@@ -66,6 +68,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -73,6 +76,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -101,6 +105,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/data-endian.spec.golden b/test/golden-test-cases/data-endian.spec.golden
--- a/test/golden-test-cases/data-endian.spec.golden
+++ b/test/golden-test-cases/data-endian.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 This package provides helpers for converting endian-sensitive data.
@@ -60,6 +62,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -67,6 +70,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -95,6 +99,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/data-msgpack.spec.golden b/test/golden-test-cases/data-msgpack.spec.golden
--- a/test/golden-test-cases/data-msgpack.spec.golden
+++ b/test/golden-test-cases/data-msgpack.spec.golden
@@ -31,32 +31,34 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-data-binary-ieee754-devel
-BuildRequires:  ghc-data-binary-ieee754-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-groom-devel
-BuildRequires:  ghc-groom-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-void-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-data-binary-ieee754-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-unordered-containers-prof
+BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-void-prof
+BuildRequires:  ghc-groom-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
@@ -94,6 +96,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -101,6 +104,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -134,6 +138,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/data-serializer.spec.golden b/test/golden-test-cases/data-serializer.spec.golden
--- a/test/golden-test-cases/data-serializer.spec.golden
+++ b/test/golden-test-cases/data-serializer.spec.golden
@@ -30,22 +30,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cereal-devel
-BuildRequires:  ghc-cereal-prof
 BuildRequires:  ghc-data-endian-devel
-BuildRequires:  ghc-data-endian-prof
 BuildRequires:  ghc-parsers-devel
-BuildRequires:  ghc-parsers-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-split-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-cereal-prof
+BuildRequires:  ghc-data-endian-prof
+BuildRequires:  ghc-parsers-prof
+BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-split-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-tasty-devel
 BuildRequires:  ghc-tasty-prof
@@ -83,6 +85,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -90,6 +93,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -123,6 +127,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/deque.spec.golden b/test/golden-test-cases/deque.spec.golden
--- a/test/golden-test-cases/deque.spec.golden
+++ b/test/golden-test-cases/deque.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 An implementation of Double-Ended Queue (aka Dequeue or Deque) based on the
@@ -61,6 +63,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -68,6 +71,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -96,6 +100,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/dhall-bash.spec.golden b/test/golden-test-cases/dhall-bash.spec.golden
--- a/test/golden-test-cases/dhall-bash.spec.golden
+++ b/test/golden-test-cases/dhall-bash.spec.golden
@@ -30,28 +30,30 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-dhall-devel
-BuildRequires:  ghc-dhall-prof
 BuildRequires:  ghc-neat-interpolation-devel
-BuildRequires:  ghc-neat-interpolation-prof
 BuildRequires:  ghc-optparse-generic-devel
-BuildRequires:  ghc-optparse-generic-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-shell-escape-devel
-BuildRequires:  ghc-shell-escape-prof
 BuildRequires:  ghc-text-devel
 BuildRequires:  ghc-text-format-devel
-BuildRequires:  ghc-text-format-prof
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-trifecta-devel
-BuildRequires:  ghc-trifecta-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-dhall-prof
+BuildRequires:  ghc-neat-interpolation-prof
+BuildRequires:  ghc-shell-escape-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-text-format-prof
 BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-optparse-generic-prof
+BuildRequires:  ghc-trifecta-prof
+%endif
 
 %description
 Use this package if you want to compile Dhall expressions to Bash. You can use
@@ -88,6 +90,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -95,6 +98,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -125,6 +129,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/diagrams-solve.spec.golden b/test/golden-test-cases/diagrams-solve.spec.golden
--- a/test/golden-test-cases/diagrams-solve.spec.golden
+++ b/test/golden-test-cases/diagrams-solve.spec.golden
@@ -30,8 +30,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-deepseq-devel
 BuildRequires:  ghc-deepseq-prof
@@ -73,6 +75,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -80,6 +83,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -113,6 +117,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/discrimination.spec.golden b/test/golden-test-cases/discrimination.spec.golden
--- a/test/golden-test-cases/discrimination.spec.golden
+++ b/test/golden-test-cases/discrimination.spec.golden
@@ -29,34 +29,36 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-contravariant-devel
-BuildRequires:  ghc-contravariant-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-primitive-devel
-BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-profunctors-devel
-BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-promises-devel
-BuildRequires:  ghc-promises-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-void-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-contravariant-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-primitive-prof
+BuildRequires:  ghc-profunctors-prof
+BuildRequires:  ghc-promises-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-compat-prof
+BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-void-prof
+%endif
 
 %description
 This package provides fast, generic, linear-time discrimination and sorting.
@@ -93,6 +95,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -100,6 +103,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -130,6 +134,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/dotenv.spec.golden b/test/golden-test-cases/dotenv.spec.golden
--- a/test/golden-test-cases/dotenv.spec.golden
+++ b/test/golden-test-cases/dotenv.spec.golden
@@ -31,26 +31,28 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-compat-devel
-BuildRequires:  ghc-base-compat-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-megaparsec-devel
-BuildRequires:  ghc-megaparsec-prof
 BuildRequires:  ghc-optparse-applicative-devel
-BuildRequires:  ghc-optparse-applicative-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-yaml-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-compat-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-megaparsec-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-yaml-prof
+BuildRequires:  ghc-optparse-applicative-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-megaparsec-devel
@@ -109,6 +111,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -116,6 +119,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -155,6 +159,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/dotnet-timespan.spec.golden b/test/golden-test-cases/dotnet-timespan.spec.golden
--- a/test/golden-test-cases/dotnet-timespan.spec.golden
+++ b/test/golden-test-cases/dotnet-timespan.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 .NET TimeSpan.
@@ -60,6 +62,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -67,6 +70,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -97,6 +101,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/dpor.spec.golden b/test/golden-test-cases/dpor.spec.golden
--- a/test/golden-test-cases/dpor.spec.golden
+++ b/test/golden-test-cases/dpor.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroups-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-semigroups-prof
+%endif
 
 %description
 We can characterise the state of a concurrent computation by considering the
@@ -94,6 +96,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -101,6 +104,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -129,6 +133,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/drawille.spec.golden b/test/golden-test-cases/drawille.spec.golden
--- a/test/golden-test-cases/drawille.spec.golden
+++ b/test/golden-test-cases/drawille.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -69,6 +71,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -76,6 +79,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -107,6 +111,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/drifter-postgresql.spec.golden b/test/golden-test-cases/drifter-postgresql.spec.golden
--- a/test/golden-test-cases/drifter-postgresql.spec.golden
+++ b/test/golden-test-cases/drifter-postgresql.spec.golden
@@ -30,22 +30,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-drifter-devel
-BuildRequires:  ghc-drifter-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-postgresql-simple-devel
-BuildRequires:  ghc-postgresql-simple-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-drifter-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-postgresql-simple-prof
+BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-compat-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-either-devel
 BuildRequires:  ghc-either-prof
@@ -86,6 +88,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -93,6 +96,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -126,6 +130,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/ede.spec.golden b/test/golden-test-cases/ede.spec.golden
--- a/test/golden-test-cases/ede.spec.golden
+++ b/test/golden-test-cases/ede.spec.golden
@@ -30,48 +30,50 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-ansi-wl-pprint-devel
-BuildRequires:  ghc-ansi-wl-pprint-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bifunctors-devel
-BuildRequires:  ghc-bifunctors-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-comonad-devel
-BuildRequires:  ghc-comonad-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-double-conversion-devel
-BuildRequires:  ghc-double-conversion-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-free-devel
-BuildRequires:  ghc-free-prof
 BuildRequires:  ghc-lens-devel
-BuildRequires:  ghc-lens-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-parsers-devel
-BuildRequires:  ghc-parsers-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-text-devel
 BuildRequires:  ghc-text-format-devel
-BuildRequires:  ghc-text-format-prof
 BuildRequires:  ghc-text-manipulate-devel
-BuildRequires:  ghc-text-manipulate-prof
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-trifecta-devel
-BuildRequires:  ghc-trifecta-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-ansi-wl-pprint-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bifunctors-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-comonad-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-double-conversion-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-free-prof
+BuildRequires:  ghc-lens-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-parsers-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-text-format-prof
+BuildRequires:  ghc-text-manipulate-prof
+BuildRequires:  ghc-trifecta-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-tasty-devel
 BuildRequires:  ghc-tasty-golden-devel
@@ -129,6 +131,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -136,6 +139,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -174,6 +178,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/ekg-cloudwatch.spec.golden b/test/golden-test-cases/ekg-cloudwatch.spec.golden
--- a/test/golden-test-cases/ekg-cloudwatch.spec.golden
+++ b/test/golden-test-cases/ekg-cloudwatch.spec.golden
@@ -29,30 +29,32 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-amazonka-cloudwatch-devel
-BuildRequires:  ghc-amazonka-cloudwatch-prof
 BuildRequires:  ghc-amazonka-core-devel
-BuildRequires:  ghc-amazonka-core-prof
 BuildRequires:  ghc-amazonka-devel
-BuildRequires:  ghc-amazonka-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-ekg-core-devel
-BuildRequires:  ghc-ekg-core-prof
 BuildRequires:  ghc-lens-devel
-BuildRequires:  ghc-lens-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unordered-containers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-amazonka-prof
+BuildRequires:  ghc-amazonka-cloudwatch-prof
+BuildRequires:  ghc-amazonka-core-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-ekg-core-prof
+BuildRequires:  ghc-lens-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unordered-containers-prof
+%endif
 
 %description
 Push ekg metrics to Amazon Cloudwatch.
@@ -82,6 +84,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -89,6 +92,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -119,6 +123,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/emailaddress.spec.golden b/test/golden-test-cases/emailaddress.spec.golden
--- a/test/golden-test-cases/emailaddress.spec.golden
+++ b/test/golden-test-cases/emailaddress.spec.golden
@@ -30,32 +30,34 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bifunctors-devel
-BuildRequires:  ghc-bifunctors-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-email-validate-devel
-BuildRequires:  ghc-email-validate-prof
 BuildRequires:  ghc-http-api-data-devel
-BuildRequires:  ghc-http-api-data-prof
 BuildRequires:  ghc-opaleye-devel
-BuildRequires:  ghc-opaleye-prof
 BuildRequires:  ghc-path-pieces-devel
-BuildRequires:  ghc-path-pieces-prof
 BuildRequires:  ghc-persistent-devel
-BuildRequires:  ghc-persistent-prof
 BuildRequires:  ghc-postgresql-simple-devel
-BuildRequires:  ghc-postgresql-simple-prof
 BuildRequires:  ghc-product-profunctors-devel
-BuildRequires:  ghc-product-profunctors-prof
 BuildRequires:  ghc-profunctors-devel
-BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bifunctors-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-email-validate-prof
+BuildRequires:  ghc-http-api-data-prof
+BuildRequires:  ghc-opaleye-prof
+BuildRequires:  ghc-path-pieces-prof
+BuildRequires:  ghc-persistent-prof
+BuildRequires:  ghc-postgresql-simple-prof
+BuildRequires:  ghc-product-profunctors-prof
+BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-Glob-devel
 BuildRequires:  ghc-Glob-prof
@@ -91,6 +93,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -98,6 +101,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -131,6 +135,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/envelope.spec.golden b/test/golden-test-cases/envelope.spec.golden
--- a/test/golden-test-cases/envelope.spec.golden
+++ b/test/golden-test-cases/envelope.spec.golden
@@ -30,16 +30,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-http-api-data-devel
-BuildRequires:  ghc-http-api-data-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-http-api-data-prof
+BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-Glob-devel
 BuildRequires:  ghc-Glob-prof
@@ -75,6 +77,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -82,6 +85,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -115,6 +119,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/eventful-sqlite.spec.golden b/test/golden-test-cases/eventful-sqlite.spec.golden
--- a/test/golden-test-cases/eventful-sqlite.spec.golden
+++ b/test/golden-test-cases/eventful-sqlite.spec.golden
@@ -30,24 +30,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-eventful-core-devel
-BuildRequires:  ghc-eventful-core-prof
 BuildRequires:  ghc-eventful-sql-common-devel
-BuildRequires:  ghc-eventful-sql-common-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-persistent-devel
-BuildRequires:  ghc-persistent-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-uuid-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-eventful-core-prof
+BuildRequires:  ghc-eventful-sql-common-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-persistent-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-uuid-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -87,6 +89,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -94,6 +97,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -127,6 +131,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE.md
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/exact-pi.spec.golden b/test/golden-test-cases/exact-pi.spec.golden
--- a/test/golden-test-cases/exact-pi.spec.golden
+++ b/test/golden-test-cases/exact-pi.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-numtype-dk-devel
-BuildRequires:  ghc-numtype-dk-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-numtype-dk-prof
+%endif
 
 %description
 Provides an exact representation for rational multiples of pi alongside an
@@ -64,6 +66,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -71,6 +74,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -101,6 +105,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/expiring-cache-map.spec.golden b/test/golden-test-cases/expiring-cache-map.spec.golden
--- a/test/golden-test-cases/expiring-cache-map.spec.golden
+++ b/test/golden-test-cases/expiring-cache-map.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-unordered-containers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-unordered-containers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-bytestring-prof
@@ -76,6 +78,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -83,6 +86,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -116,6 +120,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/explicit-exception.spec.golden b/test/golden-test-cases/explicit-exception.spec.golden
--- a/test/golden-test-cases/explicit-exception.spec.golden
+++ b/test/golden-test-cases/explicit-exception.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 Synchronous and Asynchronous exceptions which are explicit in the type
@@ -82,6 +84,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -89,6 +92,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -117,6 +121,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/fdo-notify.spec.golden b/test/golden-test-cases/fdo-notify.spec.golden
--- a/test/golden-test-cases/fdo-notify.spec.golden
+++ b/test/golden-test-cases/fdo-notify.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-dbus-devel
-BuildRequires:  ghc-dbus-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-dbus-prof
+%endif
 
 %description
 A library for issuing notifications using FreeDesktop.org's Desktop
@@ -66,6 +68,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -73,6 +76,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -103,6 +107,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/fgl.spec.golden b/test/golden-test-cases/fgl.spec.golden
--- a/test/golden-test-cases/fgl.spec.golden
+++ b/test/golden-test-cases/fgl.spec.golden
@@ -30,16 +30,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -78,6 +80,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -85,6 +88,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -118,6 +122,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/file-modules.spec.golden b/test/golden-test-cases/file-modules.spec.golden
--- a/test/golden-test-cases/file-modules.spec.golden
+++ b/test/golden-test-cases/file-modules.spec.golden
@@ -29,22 +29,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-MissingH-devel
-BuildRequires:  ghc-MissingH-prof
 BuildRequires:  ghc-async-devel
-BuildRequires:  ghc-async-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-haskell-src-exts-devel
-BuildRequires:  ghc-haskell-src-exts-prof
 BuildRequires:  ghc-regex-compat-devel
-BuildRequires:  ghc-regex-compat-prof
 BuildRequires:  ghc-regex-pcre-devel
-BuildRequires:  ghc-regex-pcre-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-MissingH-prof
+BuildRequires:  ghc-async-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-haskell-src-exts-prof
+BuildRequires:  ghc-regex-compat-prof
+BuildRequires:  ghc-regex-pcre-prof
+%endif
 
 %description
 Uses 'haskell-src-exts' to parse module imports and follows links . to local
@@ -75,6 +77,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -82,6 +85,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -111,6 +115,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/fingertree.spec.golden b/test/golden-test-cases/fingertree.spec.golden
--- a/test/golden-test-cases/fingertree.spec.golden
+++ b/test/golden-test-cases/fingertree.spec.golden
@@ -30,8 +30,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -82,6 +84,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -89,6 +92,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -122,6 +126,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/fixed-vector.spec.golden b/test/golden-test-cases/fixed-vector.spec.golden
--- a/test/golden-test-cases/fixed-vector.spec.golden
+++ b/test/golden-test-cases/fixed-vector.spec.golden
@@ -30,12 +30,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-primitive-devel
-BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-primitive-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-doctest-devel
 BuildRequires:  ghc-doctest-prof
@@ -102,6 +104,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -109,6 +112,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -142,6 +146,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/fixed.spec.golden b/test/golden-test-cases/fixed.spec.golden
--- a/test/golden-test-cases/fixed.spec.golden
+++ b/test/golden-test-cases/fixed.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 Signed 15.16 precision fixed point arithmetic.
@@ -60,6 +62,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -67,6 +70,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -97,6 +101,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/foundation.spec.golden b/test/golden-test-cases/foundation.spec.golden
--- a/test/golden-test-cases/foundation.spec.golden
+++ b/test/golden-test-cases/foundation.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-basement-devel
-BuildRequires:  ghc-basement-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-basement-prof
+%endif
 
 %description
 A custom prelude with no dependencies apart from base.
@@ -81,6 +83,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -88,6 +91,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -121,6 +125,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/frisby.spec.golden b/test/golden-test-cases/frisby.spec.golden
--- a/test/golden-test-cases/frisby.spec.golden
+++ b/test/golden-test-cases/frisby.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroups-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-semigroups-prof
+%endif
 
 %description
 Frisby is a parser library that can parse arbitrary PEG grammars in linear
@@ -78,6 +80,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -85,6 +88,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -115,6 +119,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/funcmp.spec.golden b/test/golden-test-cases/funcmp.spec.golden
--- a/test/golden-test-cases/funcmp.spec.golden
+++ b/test/golden-test-cases/funcmp.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-process-prof
+%endif
 
 %description
 Functional MetaPost is a Haskell frontend to the MetaPost language by John
@@ -84,6 +86,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -91,6 +94,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -134,6 +138,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license COPYING
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/functor-classes-compat.spec.golden b/test/golden-test-cases/functor-classes-compat.spec.golden
--- a/test/golden-test-cases/functor-classes-compat.spec.golden
+++ b/test/golden-test-cases/functor-classes-compat.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+%endif
 
 %description
 "Data.Functor.Classes" instances for core packages:
@@ -75,6 +77,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -82,6 +85,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -112,6 +116,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/general-games.spec.golden b/test/golden-test-cases/general-games.spec.golden
--- a/test/golden-test-cases/general-games.spec.golden
+++ b/test/golden-test-cases/general-games.spec.golden
@@ -30,16 +30,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-MonadRandom-devel
-BuildRequires:  ghc-MonadRandom-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-monad-loops-devel
-BuildRequires:  ghc-monad-loops-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-random-shuffle-devel
-BuildRequires:  ghc-random-shuffle-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-MonadRandom-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-monad-loops-prof
+BuildRequires:  ghc-random-prof
+BuildRequires:  ghc-random-shuffle-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -76,6 +78,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -83,6 +86,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -116,6 +120,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/generic-lens.spec.golden b/test/golden-test-cases/generic-lens.spec.golden
--- a/test/golden-test-cases/generic-lens.spec.golden
+++ b/test/golden-test-cases/generic-lens.spec.golden
@@ -30,12 +30,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-profunctors-devel
-BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-tagged-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-tagged-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-doctest-devel
 BuildRequires:  ghc-doctest-prof
@@ -76,6 +78,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -83,6 +86,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -116,6 +120,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/genvalidity-aeson.spec.golden b/test/golden-test-cases/genvalidity-aeson.spec.golden
--- a/test/golden-test-cases/genvalidity-aeson.spec.golden
+++ b/test/golden-test-cases/genvalidity-aeson.spec.golden
@@ -30,26 +30,28 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-genvalidity-devel
-BuildRequires:  ghc-genvalidity-prof
 BuildRequires:  ghc-genvalidity-scientific-devel
-BuildRequires:  ghc-genvalidity-scientific-prof
 BuildRequires:  ghc-genvalidity-text-devel
-BuildRequires:  ghc-genvalidity-text-prof
 BuildRequires:  ghc-genvalidity-unordered-containers-devel
-BuildRequires:  ghc-genvalidity-unordered-containers-prof
 BuildRequires:  ghc-genvalidity-vector-devel
-BuildRequires:  ghc-genvalidity-vector-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-validity-aeson-devel
-BuildRequires:  ghc-validity-aeson-prof
 BuildRequires:  ghc-validity-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-genvalidity-prof
+BuildRequires:  ghc-genvalidity-scientific-prof
+BuildRequires:  ghc-genvalidity-text-prof
+BuildRequires:  ghc-genvalidity-unordered-containers-prof
+BuildRequires:  ghc-genvalidity-vector-prof
 BuildRequires:  ghc-validity-prof
+BuildRequires:  ghc-validity-aeson-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-genvalidity-hspec-devel
 BuildRequires:  ghc-genvalidity-hspec-prof
@@ -85,6 +87,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -92,6 +95,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -123,6 +127,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/genvalidity-hspec-aeson.spec.golden b/test/golden-test-cases/genvalidity-hspec-aeson.spec.golden
--- a/test/golden-test-cases/genvalidity-hspec-aeson.spec.golden
+++ b/test/golden-test-cases/genvalidity-hspec-aeson.spec.golden
@@ -30,22 +30,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-genvalidity-devel
 BuildRequires:  ghc-genvalidity-hspec-devel
-BuildRequires:  ghc-genvalidity-hspec-prof
-BuildRequires:  ghc-genvalidity-prof
 BuildRequires:  ghc-hspec-devel
-BuildRequires:  ghc-hspec-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-genvalidity-prof
+BuildRequires:  ghc-genvalidity-hspec-prof
+BuildRequires:  ghc-hspec-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-doctest-devel
 BuildRequires:  ghc-doctest-prof
@@ -86,6 +88,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -93,6 +96,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -124,6 +128,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/genvalidity-hspec-binary.spec.golden b/test/golden-test-cases/genvalidity-hspec-binary.spec.golden
--- a/test/golden-test-cases/genvalidity-hspec-binary.spec.golden
+++ b/test/golden-test-cases/genvalidity-hspec-binary.spec.golden
@@ -30,20 +30,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-genvalidity-devel
 BuildRequires:  ghc-genvalidity-hspec-devel
-BuildRequires:  ghc-genvalidity-hspec-prof
-BuildRequires:  ghc-genvalidity-prof
 BuildRequires:  ghc-hspec-devel
-BuildRequires:  ghc-hspec-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-genvalidity-prof
+BuildRequires:  ghc-genvalidity-hspec-prof
+BuildRequires:  ghc-hspec-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-doctest-devel
 BuildRequires:  ghc-doctest-prof
@@ -79,6 +81,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -86,6 +89,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -119,6 +123,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/genvalidity-scientific.spec.golden b/test/golden-test-cases/genvalidity-scientific.spec.golden
--- a/test/golden-test-cases/genvalidity-scientific.spec.golden
+++ b/test/golden-test-cases/genvalidity-scientific.spec.golden
@@ -30,18 +30,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-genvalidity-devel
-BuildRequires:  ghc-genvalidity-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-validity-devel
-BuildRequires:  ghc-validity-prof
 BuildRequires:  ghc-validity-scientific-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-genvalidity-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-validity-prof
 BuildRequires:  ghc-validity-scientific-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-genvalidity-hspec-devel
 BuildRequires:  ghc-genvalidity-hspec-prof
@@ -78,6 +80,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -85,6 +88,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -116,6 +120,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/genvalidity-uuid.spec.golden b/test/golden-test-cases/genvalidity-uuid.spec.golden
--- a/test/golden-test-cases/genvalidity-uuid.spec.golden
+++ b/test/golden-test-cases/genvalidity-uuid.spec.golden
@@ -30,18 +30,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-genvalidity-devel
-BuildRequires:  ghc-genvalidity-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-uuid-devel
-BuildRequires:  ghc-uuid-prof
 BuildRequires:  ghc-validity-devel
-BuildRequires:  ghc-validity-prof
 BuildRequires:  ghc-validity-uuid-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-genvalidity-prof
+BuildRequires:  ghc-uuid-prof
+BuildRequires:  ghc-validity-prof
 BuildRequires:  ghc-validity-uuid-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-genvalidity-hspec-devel
 BuildRequires:  ghc-genvalidity-hspec-prof
@@ -77,6 +79,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -84,6 +87,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -115,6 +119,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/ghc-syb-utils.spec.golden b/test/golden-test-cases/ghc-syb-utils.spec.golden
--- a/test/golden-test-cases/ghc-syb-utils.spec.golden
+++ b/test/golden-test-cases/ghc-syb-utils.spec.golden
@@ -30,12 +30,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-ghc-devel
-BuildRequires:  ghc-ghc-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-syb-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-ghc-prof
 BuildRequires:  ghc-syb-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-directory-prof
@@ -73,6 +75,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -80,6 +83,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -111,6 +115,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/ghcid.spec.golden b/test/golden-test-cases/ghcid.spec.golden
--- a/test/golden-test-cases/ghcid.spec.golden
+++ b/test/golden-test-cases/ghcid.spec.golden
@@ -30,30 +30,32 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-ansi-terminal-devel
-BuildRequires:  ghc-ansi-terminal-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-cmdargs-devel
-BuildRequires:  ghc-cmdargs-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-extra-devel
-BuildRequires:  ghc-extra-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-fsnotify-devel
-BuildRequires:  ghc-fsnotify-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-terminal-size-devel
-BuildRequires:  ghc-terminal-size-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unix-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-cmdargs-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-extra-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unix-prof
+BuildRequires:  ghc-ansi-terminal-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-fsnotify-prof
+BuildRequires:  ghc-terminal-size-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-tasty-devel
 BuildRequires:  ghc-tasty-hunit-devel
@@ -94,6 +96,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -101,6 +104,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -135,6 +139,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/giphy-api.spec.golden b/test/golden-test-cases/giphy-api.spec.golden
--- a/test/golden-test-cases/giphy-api.spec.golden
+++ b/test/golden-test-cases/giphy-api.spec.golden
@@ -30,34 +30,36 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-http-api-data-devel
-BuildRequires:  ghc-http-api-data-prof
 BuildRequires:  ghc-http-client-devel
-BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-http-client-tls-devel
-BuildRequires:  ghc-http-client-tls-prof
 BuildRequires:  ghc-microlens-devel
-BuildRequires:  ghc-microlens-prof
 BuildRequires:  ghc-microlens-th-devel
-BuildRequires:  ghc-microlens-th-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-network-uri-devel
-BuildRequires:  ghc-network-uri-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-servant-client-devel
-BuildRequires:  ghc-servant-client-prof
 BuildRequires:  ghc-servant-devel
-BuildRequires:  ghc-servant-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-http-api-data-prof
+BuildRequires:  ghc-http-client-prof
+BuildRequires:  ghc-http-client-tls-prof
+BuildRequires:  ghc-microlens-prof
+BuildRequires:  ghc-microlens-th-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-network-uri-prof
+BuildRequires:  ghc-servant-prof
+BuildRequires:  ghc-servant-client-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-basic-prelude-devel
 BuildRequires:  ghc-basic-prelude-prof
@@ -99,6 +101,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -106,6 +109,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -139,6 +143,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/github.spec.golden b/test/golden-test-cases/github.spec.golden
--- a/test/golden-test-cases/github.spec.golden
+++ b/test/golden-test-cases/github.spec.golden
@@ -30,68 +30,70 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-compat-devel
-BuildRequires:  ghc-aeson-compat-prof
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-compat-devel
-BuildRequires:  ghc-base-compat-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base16-bytestring-devel
-BuildRequires:  ghc-base16-bytestring-prof
 BuildRequires:  ghc-binary-devel
 BuildRequires:  ghc-binary-orphans-devel
-BuildRequires:  ghc-binary-orphans-prof
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-byteable-devel
-BuildRequires:  ghc-byteable-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-cryptohash-devel
-BuildRequires:  ghc-cryptohash-prof
 BuildRequires:  ghc-deepseq-devel
 BuildRequires:  ghc-deepseq-generics-devel
-BuildRequires:  ghc-deepseq-generics-prof
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-http-client-devel
-BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-http-client-tls-devel
-BuildRequires:  ghc-http-client-tls-prof
 BuildRequires:  ghc-http-link-header-devel
-BuildRequires:  ghc-http-link-header-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-iso8601-time-devel
-BuildRequires:  ghc-iso8601-time-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-network-uri-devel
-BuildRequires:  ghc-network-uri-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-tls-devel
-BuildRequires:  ghc-tls-prof
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
 BuildRequires:  ghc-vector-instances-devel
-BuildRequires:  ghc-vector-instances-prof
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-aeson-compat-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-compat-prof
+BuildRequires:  ghc-base16-bytestring-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-binary-orphans-prof
+BuildRequires:  ghc-byteable-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-cryptohash-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-deepseq-generics-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-http-client-prof
+BuildRequires:  ghc-http-client-tls-prof
+BuildRequires:  ghc-http-link-header-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-iso8601-time-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-network-uri-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-tls-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-compat-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-vector-instances-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-file-embed-devel
 BuildRequires:  ghc-file-embed-prof
@@ -138,6 +140,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -145,6 +148,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -178,6 +182,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gl.spec.golden b/test/golden-test-cases/gl.spec.golden
--- a/test/golden-test-cases/gl.spec.golden
+++ b/test/golden-test-cases/gl.spec.golden
@@ -29,24 +29,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  Mesa-libGL-devel
 BuildRequires:  ghc-Cabal-devel
-BuildRequires:  ghc-Cabal-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-fixed-devel
-BuildRequires:  ghc-fixed-prof
 BuildRequires:  ghc-half-devel
-BuildRequires:  ghc-half-prof
 BuildRequires:  ghc-hxt-devel
-BuildRequires:  ghc-hxt-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-fixed-prof
+BuildRequires:  ghc-half-prof
 BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-Cabal-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-hxt-prof
+%endif
 
 %description
 Complete OpenGL raw bindings.
@@ -77,6 +79,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -84,6 +87,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -114,6 +118,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-adexchange-buyer.spec.golden b/test/golden-test-cases/gogol-adexchange-buyer.spec.golden
--- a/test/golden-test-cases/gogol-adexchange-buyer.spec.golden
+++ b/test/golden-test-cases/gogol-adexchange-buyer.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 Accesses your bidding-account information, submits creatives for validation,
@@ -69,6 +71,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -76,6 +79,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -106,6 +110,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-admin-emailmigration.spec.golden b/test/golden-test-cases/gogol-admin-emailmigration.spec.golden
--- a/test/golden-test-cases/gogol-admin-emailmigration.spec.golden
+++ b/test/golden-test-cases/gogol-admin-emailmigration.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 Email Migration API lets you migrate emails of users to Google backends.
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-affiliates.spec.golden b/test/golden-test-cases/gogol-affiliates.spec.golden
--- a/test/golden-test-cases/gogol-affiliates.spec.golden
+++ b/test/golden-test-cases/gogol-affiliates.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 Lets you have programmatic access to your Google Affiliate Network data.
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-apps-tasks.spec.golden b/test/golden-test-cases/gogol-apps-tasks.spec.golden
--- a/test/golden-test-cases/gogol-apps-tasks.spec.golden
+++ b/test/golden-test-cases/gogol-apps-tasks.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 Lets you manage your tasks and task lists.
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-appstate.spec.golden b/test/golden-test-cases/gogol-appstate.spec.golden
--- a/test/golden-test-cases/gogol-appstate.spec.golden
+++ b/test/golden-test-cases/gogol-appstate.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 The Google App State API.
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-blogger.spec.golden b/test/golden-test-cases/gogol-blogger.spec.golden
--- a/test/golden-test-cases/gogol-blogger.spec.golden
+++ b/test/golden-test-cases/gogol-blogger.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 API for access to the data within Blogger.
@@ -71,6 +73,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -78,6 +81,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -108,6 +112,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-datastore.spec.golden b/test/golden-test-cases/gogol-datastore.spec.golden
--- a/test/golden-test-cases/gogol-datastore.spec.golden
+++ b/test/golden-test-cases/gogol-datastore.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 Accesses the schemaless NoSQL database to provide fully managed, robust,
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-dfareporting.spec.golden b/test/golden-test-cases/gogol-dfareporting.spec.golden
--- a/test/golden-test-cases/gogol-dfareporting.spec.golden
+++ b/test/golden-test-cases/gogol-dfareporting.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 Manages your DoubleClick Campaign Manager ad campaigns and reports.
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-firebase-rules.spec.golden b/test/golden-test-cases/gogol-firebase-rules.spec.golden
--- a/test/golden-test-cases/gogol-firebase-rules.spec.golden
+++ b/test/golden-test-cases/gogol-firebase-rules.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 Creates and manages rules that determine when a Firebase Rules-enabled service
@@ -69,6 +71,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -76,6 +79,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -106,6 +110,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-gmail.spec.golden b/test/golden-test-cases/gogol-gmail.spec.golden
--- a/test/golden-test-cases/gogol-gmail.spec.golden
+++ b/test/golden-test-cases/gogol-gmail.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 Access Gmail mailboxes including sending user email.
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-kgsearch.spec.golden b/test/golden-test-cases/gogol-kgsearch.spec.golden
--- a/test/golden-test-cases/gogol-kgsearch.spec.golden
+++ b/test/golden-test-cases/gogol-kgsearch.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 Searches the Google Knowledge Graph for entities.
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-maps-engine.spec.golden b/test/golden-test-cases/gogol-maps-engine.spec.golden
--- a/test/golden-test-cases/gogol-maps-engine.spec.golden
+++ b/test/golden-test-cases/gogol-maps-engine.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 The Google Maps Engine API allows developers to store and query geospatial
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-plus.spec.golden b/test/golden-test-cases/gogol-plus.spec.golden
--- a/test/golden-test-cases/gogol-plus.spec.golden
+++ b/test/golden-test-cases/gogol-plus.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 Builds on top of the Google+ platform.
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-resourceviews.spec.golden b/test/golden-test-cases/gogol-resourceviews.spec.golden
--- a/test/golden-test-cases/gogol-resourceviews.spec.golden
+++ b/test/golden-test-cases/gogol-resourceviews.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 The Resource View API allows users to create and manage logical sets of Google
@@ -73,6 +75,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -80,6 +83,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -110,6 +114,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-translate.spec.golden b/test/golden-test-cases/gogol-translate.spec.golden
--- a/test/golden-test-cases/gogol-translate.spec.golden
+++ b/test/golden-test-cases/gogol-translate.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 Translates text from one language to another.
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-webmaster-tools.spec.golden b/test/golden-test-cases/gogol-webmaster-tools.spec.golden
--- a/test/golden-test-cases/gogol-webmaster-tools.spec.golden
+++ b/test/golden-test-cases/gogol-webmaster-tools.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 View Google Search Console data for your verified sites.
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gogol-youtube.spec.golden b/test/golden-test-cases/gogol-youtube.spec.golden
--- a/test/golden-test-cases/gogol-youtube.spec.golden
+++ b/test/golden-test-cases/gogol-youtube.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-gogol-core-devel
-BuildRequires:  ghc-gogol-core-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-gogol-core-prof
+%endif
 
 %description
 Supports core YouTube features, such as uploading videos, creating and managing
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/groundhog-mysql.spec.golden b/test/golden-test-cases/groundhog-mysql.spec.golden
--- a/test/golden-test-cases/groundhog-mysql.spec.golden
+++ b/test/golden-test-cases/groundhog-mysql.spec.golden
@@ -29,32 +29,34 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-groundhog-devel
-BuildRequires:  ghc-groundhog-prof
 BuildRequires:  ghc-monad-control-devel
-BuildRequires:  ghc-monad-control-prof
 BuildRequires:  ghc-monad-logger-devel
-BuildRequires:  ghc-monad-logger-prof
 BuildRequires:  ghc-mysql-devel
-BuildRequires:  ghc-mysql-prof
 BuildRequires:  ghc-mysql-simple-devel
-BuildRequires:  ghc-mysql-simple-prof
 BuildRequires:  ghc-resource-pool-devel
-BuildRequires:  ghc-resource-pool-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-groundhog-prof
+BuildRequires:  ghc-monad-control-prof
+BuildRequires:  ghc-monad-logger-prof
+BuildRequires:  ghc-mysql-prof
+BuildRequires:  ghc-mysql-simple-prof
+BuildRequires:  ghc-resource-pool-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 This package uses mysql-simple and mysql.
@@ -84,6 +86,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -91,6 +94,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -121,6 +125,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/gsasl.spec.golden b/test/golden-test-cases/gsasl.spec.golden
--- a/test/golden-test-cases/gsasl.spec.golden
+++ b/test/golden-test-cases/gsasl.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(libgsasl)
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 Bindings for GNU libgsasl.
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -103,6 +107,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license license.txt
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hOpenPGP.spec.golden b/test/golden-test-cases/hOpenPGP.spec.golden
--- a/test/golden-test-cases/hOpenPGP.spec.golden
+++ b/test/golden-test-cases/hOpenPGP.spec.golden
@@ -30,86 +30,88 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base16-bytestring-devel
-BuildRequires:  ghc-base16-bytestring-prof
 BuildRequires:  ghc-base64-bytestring-devel
-BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-bifunctors-devel
-BuildRequires:  ghc-bifunctors-prof
 BuildRequires:  ghc-binary-conduit-devel
-BuildRequires:  ghc-binary-conduit-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-byteable-devel
-BuildRequires:  ghc-byteable-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-bzlib-devel
-BuildRequires:  ghc-bzlib-prof
 BuildRequires:  ghc-conduit-devel
 BuildRequires:  ghc-conduit-extra-devel
-BuildRequires:  ghc-conduit-extra-prof
-BuildRequires:  ghc-conduit-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-crypto-cipher-types-devel
-BuildRequires:  ghc-crypto-cipher-types-prof
 BuildRequires:  ghc-cryptonite-devel
-BuildRequires:  ghc-cryptonite-prof
 BuildRequires:  ghc-data-default-class-devel
-BuildRequires:  ghc-data-default-class-prof
 BuildRequires:  ghc-errors-devel
-BuildRequires:  ghc-errors-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-incremental-parser-devel
-BuildRequires:  ghc-incremental-parser-prof
 BuildRequires:  ghc-ixset-typed-devel
-BuildRequires:  ghc-ixset-typed-prof
 BuildRequires:  ghc-lens-devel
-BuildRequires:  ghc-lens-prof
 BuildRequires:  ghc-memory-devel
-BuildRequires:  ghc-memory-prof
 BuildRequires:  ghc-monad-loops-devel
-BuildRequires:  ghc-monad-loops-prof
 BuildRequires:  ghc-nettle-devel
-BuildRequires:  ghc-nettle-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-network-uri-devel
-BuildRequires:  ghc-network-uri-prof
 BuildRequires:  ghc-newtype-devel
-BuildRequires:  ghc-newtype-prof
 BuildRequires:  ghc-openpgp-asciiarmor-devel
-BuildRequires:  ghc-openpgp-asciiarmor-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-securemem-devel
-BuildRequires:  ghc-securemem-prof
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-split-devel
-BuildRequires:  ghc-split-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
 BuildRequires:  ghc-time-locale-compat-devel
-BuildRequires:  ghc-time-locale-compat-prof
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-wl-pprint-extras-devel
-BuildRequires:  ghc-wl-pprint-extras-prof
 BuildRequires:  ghc-zlib-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base16-bytestring-prof
+BuildRequires:  ghc-base64-bytestring-prof
+BuildRequires:  ghc-bifunctors-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-binary-conduit-prof
+BuildRequires:  ghc-byteable-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-bzlib-prof
+BuildRequires:  ghc-conduit-prof
+BuildRequires:  ghc-conduit-extra-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-crypto-cipher-types-prof
+BuildRequires:  ghc-cryptonite-prof
+BuildRequires:  ghc-data-default-class-prof
+BuildRequires:  ghc-errors-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-incremental-parser-prof
+BuildRequires:  ghc-ixset-typed-prof
+BuildRequires:  ghc-lens-prof
+BuildRequires:  ghc-memory-prof
+BuildRequires:  ghc-monad-loops-prof
+BuildRequires:  ghc-nettle-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-network-uri-prof
+BuildRequires:  ghc-newtype-prof
+BuildRequires:  ghc-openpgp-asciiarmor-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-securemem-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-split-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-time-locale-compat-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-unordered-containers-prof
+BuildRequires:  ghc-wl-pprint-extras-prof
 BuildRequires:  ghc-zlib-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -151,6 +153,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -158,6 +161,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -189,6 +193,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hPDB-examples.spec.golden b/test/golden-test-cases/hPDB-examples.spec.golden
--- a/test/golden-test-cases/hPDB-examples.spec.golden
+++ b/test/golden-test-cases/hPDB-examples.spec.golden
@@ -26,41 +26,43 @@
 Source0:        https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-AC-Vector-devel
-BuildRequires:  ghc-AC-Vector-prof
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-GLUT-devel
-BuildRequires:  ghc-GLUT-prof
 BuildRequires:  ghc-Octree-devel
-BuildRequires:  ghc-Octree-prof
 BuildRequires:  ghc-OpenGL-devel
-BuildRequires:  ghc-OpenGL-prof
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-hPDB-devel
-BuildRequires:  ghc-hPDB-prof
 BuildRequires:  ghc-iterable-devel
-BuildRequires:  ghc-iterable-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-devel
 BuildRequires:  ghc-text-format-devel
-BuildRequires:  ghc-text-format-prof
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-AC-Vector-prof
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-hPDB-prof
+BuildRequires:  ghc-iterable-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-template-haskell-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-Octree-prof
+BuildRequires:  ghc-text-format-prof
+BuildRequires:  ghc-GLUT-prof
+BuildRequires:  ghc-OpenGL-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-IfElse-devel
 BuildRequires:  ghc-IfElse-prof
diff --git a/test/golden-test-cases/haddock-library.spec.golden b/test/golden-test-cases/haddock-library.spec.golden
--- a/test/golden-test-cases/haddock-library.spec.golden
+++ b/test/golden-test-cases/haddock-library.spec.golden
@@ -30,16 +30,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-deepseq-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -89,6 +91,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -96,6 +99,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -132,6 +136,8 @@
 %license LICENSE
 %license vendor/attoparsec-0.13.1.0/LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hakyll.spec.golden b/test/golden-test-cases/hakyll.spec.golden
--- a/test/golden-test-cases/hakyll.spec.golden
+++ b/test/golden-test-cases/hakyll.spec.golden
@@ -31,84 +31,86 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-blaze-html-devel
-BuildRequires:  ghc-blaze-html-prof
 BuildRequires:  ghc-blaze-markup-devel
-BuildRequires:  ghc-blaze-markup-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-cryptohash-devel
-BuildRequires:  ghc-cryptohash-prof
 BuildRequires:  ghc-data-default-devel
-BuildRequires:  ghc-data-default-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-fsnotify-devel
-BuildRequires:  ghc-fsnotify-prof
 BuildRequires:  ghc-http-conduit-devel
-BuildRequires:  ghc-http-conduit-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-lrucache-devel
-BuildRequires:  ghc-lrucache-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-network-uri-devel
-BuildRequires:  ghc-network-uri-prof
 BuildRequires:  ghc-optparse-applicative-devel
-BuildRequires:  ghc-optparse-applicative-prof
 BuildRequires:  ghc-pandoc-citeproc-devel
-BuildRequires:  ghc-pandoc-citeproc-prof
 BuildRequires:  ghc-pandoc-devel
-BuildRequires:  ghc-pandoc-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-regex-base-devel
-BuildRequires:  ghc-regex-base-prof
 BuildRequires:  ghc-regex-tdfa-devel
-BuildRequires:  ghc-regex-tdfa-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-system-filepath-devel
-BuildRequires:  ghc-system-filepath-prof
 BuildRequires:  ghc-tagsoup-devel
-BuildRequires:  ghc-tagsoup-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
 BuildRequires:  ghc-time-locale-compat-devel
-BuildRequires:  ghc-time-locale-compat-prof
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-wai-app-static-devel
-BuildRequires:  ghc-wai-app-static-prof
 BuildRequires:  ghc-wai-devel
-BuildRequires:  ghc-wai-prof
 BuildRequires:  ghc-warp-devel
-BuildRequires:  ghc-warp-prof
 BuildRequires:  ghc-yaml-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-blaze-html-prof
+BuildRequires:  ghc-blaze-markup-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-cryptohash-prof
+BuildRequires:  ghc-data-default-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-fsnotify-prof
+BuildRequires:  ghc-http-conduit-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-lrucache-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-network-uri-prof
+BuildRequires:  ghc-optparse-applicative-prof
+BuildRequires:  ghc-pandoc-prof
+BuildRequires:  ghc-pandoc-citeproc-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-random-prof
+BuildRequires:  ghc-regex-base-prof
+BuildRequires:  ghc-regex-tdfa-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-system-filepath-prof
+BuildRequires:  ghc-tagsoup-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-time-locale-compat-prof
+BuildRequires:  ghc-unordered-containers-prof
+BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-wai-prof
+BuildRequires:  ghc-wai-app-static-prof
+BuildRequires:  ghc-warp-prof
 BuildRequires:  ghc-yaml-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -162,6 +164,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -169,6 +172,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -229,6 +233,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/happstack-hsp.spec.golden b/test/golden-test-cases/happstack-hsp.spec.golden
--- a/test/golden-test-cases/happstack-hsp.spec.golden
+++ b/test/golden-test-cases/happstack-hsp.spec.golden
@@ -29,26 +29,28 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-happstack-server-devel
-BuildRequires:  ghc-happstack-server-prof
 BuildRequires:  ghc-harp-devel
-BuildRequires:  ghc-harp-prof
 BuildRequires:  ghc-hsp-devel
-BuildRequires:  ghc-hsp-prof
 BuildRequires:  ghc-hsx2hs-devel
-BuildRequires:  ghc-hsx2hs-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-syb-devel
-BuildRequires:  ghc-syb-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-utf8-string-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-happstack-server-prof
+BuildRequires:  ghc-harp-prof
+BuildRequires:  ghc-hsp-prof
+BuildRequires:  ghc-hsx2hs-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-syb-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-utf8-string-prof
+%endif
 
 %description
 Happstack is a web application framework. HSP is an XML templating solution.
@@ -79,6 +81,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -86,6 +89,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -114,6 +118,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/happy.spec.golden b/test/golden-test-cases/happy.spec.golden
--- a/test/golden-test-cases/happy.spec.golden
+++ b/test/golden-test-cases/happy.spec.golden
@@ -26,20 +26,22 @@
 Source0:        https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
-BuildRequires:  ghc-Cabal-prof
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-Cabal-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-filepath-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-process-devel
 BuildRequires:  ghc-process-prof
diff --git a/test/golden-test-cases/harp.spec.golden b/test/golden-test-cases/harp.spec.golden
--- a/test/golden-test-cases/harp.spec.golden
+++ b/test/golden-test-cases/harp.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 HaRP, or Haskell Regular Patterns, is a Haskell extension that extends the
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -102,6 +106,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hashtables.spec.golden b/test/golden-test-cases/hashtables.spec.golden
--- a/test/golden-test-cases/hashtables.spec.golden
+++ b/test/golden-test-cases/hashtables.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-primitive-devel
-BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-vector-prof
+%endif
 
 %description
 This package provides a couple of different implementations of mutable hash
@@ -137,6 +139,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -144,6 +147,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -174,6 +178,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/haskell-tools-debug.spec.golden b/test/golden-test-cases/haskell-tools-debug.spec.golden
--- a/test/golden-test-cases/haskell-tools-debug.spec.golden
+++ b/test/golden-test-cases/haskell-tools-debug.spec.golden
@@ -30,30 +30,32 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-ghc-devel
 BuildRequires:  ghc-ghc-paths-devel
-BuildRequires:  ghc-ghc-paths-prof
-BuildRequires:  ghc-ghc-prof
 BuildRequires:  ghc-haskell-tools-ast-devel
-BuildRequires:  ghc-haskell-tools-ast-prof
 BuildRequires:  ghc-haskell-tools-backend-ghc-devel
-BuildRequires:  ghc-haskell-tools-backend-ghc-prof
 BuildRequires:  ghc-haskell-tools-builtin-refactorings-devel
-BuildRequires:  ghc-haskell-tools-builtin-refactorings-prof
 BuildRequires:  ghc-haskell-tools-prettyprint-devel
-BuildRequires:  ghc-haskell-tools-prettyprint-prof
 BuildRequires:  ghc-haskell-tools-refactor-devel
-BuildRequires:  ghc-haskell-tools-refactor-prof
 BuildRequires:  ghc-references-devel
-BuildRequires:  ghc-references-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-split-devel
-BuildRequires:  ghc-split-prof
 BuildRequires:  ghc-template-haskell-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-ghc-prof
+BuildRequires:  ghc-ghc-paths-prof
+BuildRequires:  ghc-haskell-tools-ast-prof
+BuildRequires:  ghc-haskell-tools-backend-ghc-prof
+BuildRequires:  ghc-haskell-tools-builtin-refactorings-prof
+BuildRequires:  ghc-haskell-tools-prettyprint-prof
+BuildRequires:  ghc-haskell-tools-refactor-prof
+BuildRequires:  ghc-references-prof
+BuildRequires:  ghc-split-prof
 BuildRequires:  ghc-template-haskell-prof
+%endif
 
 %description
 Debugging Tools for Haskell-tools.
@@ -84,6 +86,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -91,6 +94,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -121,6 +125,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/haskell-tools-rewrite.spec.golden b/test/golden-test-cases/haskell-tools-rewrite.spec.golden
--- a/test/golden-test-cases/haskell-tools-rewrite.spec.golden
+++ b/test/golden-test-cases/haskell-tools-rewrite.spec.golden
@@ -30,20 +30,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-ghc-devel
-BuildRequires:  ghc-ghc-prof
 BuildRequires:  ghc-haskell-tools-ast-devel
-BuildRequires:  ghc-haskell-tools-ast-prof
 BuildRequires:  ghc-haskell-tools-prettyprint-devel
-BuildRequires:  ghc-haskell-tools-prettyprint-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-references-devel
-BuildRequires:  ghc-references-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-ghc-prof
+BuildRequires:  ghc-haskell-tools-ast-prof
+BuildRequires:  ghc-haskell-tools-prettyprint-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-references-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-directory-prof
@@ -88,6 +90,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -95,6 +98,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -126,6 +130,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hasql.spec.golden b/test/golden-test-cases/hasql.spec.golden
--- a/test/golden-test-cases/hasql.spec.golden
+++ b/test/golden-test-cases/hasql.spec.golden
@@ -30,48 +30,50 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
 BuildRequires:  ghc-base-prelude-devel
-BuildRequires:  ghc-base-prelude-prof
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-bytestring-strict-builder-devel
-BuildRequires:  ghc-bytestring-strict-builder-prof
 BuildRequires:  ghc-contravariant-devel
 BuildRequires:  ghc-contravariant-extras-devel
-BuildRequires:  ghc-contravariant-extras-prof
-BuildRequires:  ghc-contravariant-prof
 BuildRequires:  ghc-data-default-class-devel
-BuildRequires:  ghc-data-default-class-prof
 BuildRequires:  ghc-dlist-devel
-BuildRequires:  ghc-dlist-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-hashtables-devel
-BuildRequires:  ghc-hashtables-prof
 BuildRequires:  ghc-loch-th-devel
-BuildRequires:  ghc-loch-th-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-placeholders-devel
-BuildRequires:  ghc-placeholders-prof
 BuildRequires:  ghc-postgresql-binary-devel
-BuildRequires:  ghc-postgresql-binary-prof
 BuildRequires:  ghc-postgresql-libpq-devel
-BuildRequires:  ghc-postgresql-libpq-prof
 BuildRequires:  ghc-profunctors-devel
-BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-prelude-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-bytestring-strict-builder-prof
+BuildRequires:  ghc-contravariant-prof
+BuildRequires:  ghc-contravariant-extras-prof
+BuildRequires:  ghc-data-default-class-prof
+BuildRequires:  ghc-dlist-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-hashtables-prof
+BuildRequires:  ghc-loch-th-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-placeholders-prof
+BuildRequires:  ghc-postgresql-binary-prof
+BuildRequires:  ghc-postgresql-libpq-prof
+BuildRequires:  ghc-profunctors-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -124,6 +126,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -131,6 +134,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -162,6 +166,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hformat.spec.golden b/test/golden-test-cases/hformat.spec.golden
--- a/test/golden-test-cases/hformat.spec.golden
+++ b/test/golden-test-cases/hformat.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-ansi-terminal-devel
-BuildRequires:  ghc-ansi-terminal-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base-unicode-symbols-devel
-BuildRequires:  ghc-base-unicode-symbols-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-ansi-terminal-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-unicode-symbols-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
@@ -71,6 +73,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -78,6 +81,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -109,6 +113,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/highlighting-kate.spec.golden b/test/golden-test-cases/highlighting-kate.spec.golden
--- a/test/golden-test-cases/highlighting-kate.spec.golden
+++ b/test/golden-test-cases/highlighting-kate.spec.golden
@@ -30,20 +30,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-html-devel
-BuildRequires:  ghc-blaze-html-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-regex-pcre-builtin-devel
-BuildRequires:  ghc-regex-pcre-builtin-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-utf8-string-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-html-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-regex-pcre-builtin-prof
 BuildRequires:  ghc-utf8-string-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-Diff-devel
 BuildRequires:  ghc-Diff-prof
@@ -88,6 +90,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -95,6 +98,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -128,6 +132,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hit.spec.golden b/test/golden-test-cases/hit.spec.golden
--- a/test/golden-test-cases/hit.spec.golden
+++ b/test/golden-test-cases/hit.spec.golden
@@ -30,42 +30,44 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-byteable-devel
-BuildRequires:  ghc-byteable-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-cryptohash-devel
-BuildRequires:  ghc-cryptohash-prof
 BuildRequires:  ghc-hourglass-devel
-BuildRequires:  ghc-hourglass-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-patience-devel
-BuildRequires:  ghc-patience-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-system-fileio-devel
-BuildRequires:  ghc-system-fileio-prof
 BuildRequires:  ghc-system-filepath-devel
-BuildRequires:  ghc-system-filepath-prof
 BuildRequires:  ghc-unix-compat-devel
-BuildRequires:  ghc-unix-compat-prof
 BuildRequires:  ghc-utf8-string-devel
-BuildRequires:  ghc-utf8-string-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-zlib-bindings-devel
-BuildRequires:  ghc-zlib-bindings-prof
 BuildRequires:  ghc-zlib-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-byteable-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-cryptohash-prof
+BuildRequires:  ghc-hourglass-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-patience-prof
+BuildRequires:  ghc-random-prof
+BuildRequires:  ghc-system-fileio-prof
+BuildRequires:  ghc-system-filepath-prof
+BuildRequires:  ghc-unix-compat-prof
+BuildRequires:  ghc-utf8-string-prof
+BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-zlib-prof
+BuildRequires:  ghc-zlib-bindings-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-bytedump-devel
 BuildRequires:  ghc-bytedump-prof
@@ -110,6 +112,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -117,6 +120,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -150,6 +154,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hjson.spec.golden b/test/golden-test-cases/hjson.spec.golden
--- a/test/golden-test-cases/hjson.spec.golden
+++ b/test/golden-test-cases/hjson.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-parsec-prof
+%endif
 
 %description
 JSON parsing library with simple and sane API.
@@ -64,6 +66,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -71,6 +74,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -99,6 +103,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license COPYING
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hmpfr.spec.golden b/test/golden-test-cases/hmpfr.spec.golden
--- a/test/golden-test-cases/hmpfr.spec.golden
+++ b/test/golden-test-cases/hmpfr.spec.golden
@@ -29,9 +29,11 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  mpfr-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 Haskell binding to the MPFR library.
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -106,6 +110,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hoogle.spec.golden b/test/golden-test-cases/hoogle.spec.golden
--- a/test/golden-test-cases/hoogle.spec.golden
+++ b/test/golden-test-cases/hoogle.spec.golden
@@ -30,86 +30,88 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cmdargs-devel
-BuildRequires:  ghc-cmdargs-prof
 BuildRequires:  ghc-conduit-devel
 BuildRequires:  ghc-conduit-extra-devel
-BuildRequires:  ghc-conduit-extra-prof
-BuildRequires:  ghc-conduit-prof
 BuildRequires:  ghc-connection-devel
-BuildRequires:  ghc-connection-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-extra-devel
-BuildRequires:  ghc-extra-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-haskell-src-exts-devel
-BuildRequires:  ghc-haskell-src-exts-prof
 BuildRequires:  ghc-http-conduit-devel
-BuildRequires:  ghc-http-conduit-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-js-flot-devel
-BuildRequires:  ghc-js-flot-prof
 BuildRequires:  ghc-js-jquery-devel
-BuildRequires:  ghc-js-jquery-prof
 BuildRequires:  ghc-mmap-devel
-BuildRequires:  ghc-mmap-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-network-uri-devel
-BuildRequires:  ghc-network-uri-prof
 BuildRequires:  ghc-old-locale-devel
-BuildRequires:  ghc-old-locale-prof
 BuildRequires:  ghc-process-devel
 BuildRequires:  ghc-process-extras-devel
-BuildRequires:  ghc-process-extras-prof
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-storable-tuple-devel
-BuildRequires:  ghc-storable-tuple-prof
 BuildRequires:  ghc-tar-devel
-BuildRequires:  ghc-tar-prof
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-uniplate-devel
-BuildRequires:  ghc-uniplate-prof
 BuildRequires:  ghc-utf8-string-devel
-BuildRequires:  ghc-utf8-string-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-wai-devel
 BuildRequires:  ghc-wai-logger-devel
-BuildRequires:  ghc-wai-logger-prof
-BuildRequires:  ghc-wai-prof
 BuildRequires:  ghc-warp-devel
-BuildRequires:  ghc-warp-prof
 BuildRequires:  ghc-warp-tls-devel
-BuildRequires:  ghc-warp-tls-prof
 BuildRequires:  ghc-zlib-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-cmdargs-prof
+BuildRequires:  ghc-conduit-prof
+BuildRequires:  ghc-conduit-extra-prof
+BuildRequires:  ghc-connection-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-extra-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-haskell-src-exts-prof
+BuildRequires:  ghc-http-conduit-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-js-flot-prof
+BuildRequires:  ghc-js-jquery-prof
+BuildRequires:  ghc-mmap-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-network-uri-prof
+BuildRequires:  ghc-old-locale-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-process-extras-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-storable-tuple-prof
+BuildRequires:  ghc-tar-prof
+BuildRequires:  ghc-template-haskell-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-uniplate-prof
+BuildRequires:  ghc-utf8-string-prof
+BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-wai-prof
+BuildRequires:  ghc-wai-logger-prof
+BuildRequires:  ghc-warp-prof
+BuildRequires:  ghc-warp-tls-prof
 BuildRequires:  ghc-zlib-prof
+%endif
 
 %description
 Hoogle is a Haskell API search engine, which allows you to search many standard
@@ -140,6 +142,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -147,6 +150,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -192,6 +196,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hostname-validate.spec.golden b/test/golden-test-cases/hostname-validate.spec.golden
--- a/test/golden-test-cases/hostname-validate.spec.golden
+++ b/test/golden-test-cases/hostname-validate.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+%endif
 
 %description
 Validate hostnames e.g. localhost or foo.co.uk. See also RFC 1123, RFC 952, and
@@ -65,6 +67,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -72,6 +75,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -100,6 +104,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hsinstall.spec.golden b/test/golden-test-cases/hsinstall.spec.golden
--- a/test/golden-test-cases/hsinstall.spec.golden
+++ b/test/golden-test-cases/hsinstall.spec.golden
@@ -30,12 +30,14 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-filepath-prof
+%endif
 
 %description
 This is a utility to install Haskell programs on a system using stack.
@@ -69,6 +71,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -76,6 +79,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -111,6 +115,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hstatsd.spec.golden b/test/golden-test-cases/hstatsd.spec.golden
--- a/test/golden-test-cases/hstatsd.spec.golden
+++ b/test/golden-test-cases/hstatsd.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 Quick and dirty statsd interface.
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -100,6 +104,8 @@
 
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hsx-jmacro.spec.golden b/test/golden-test-cases/hsx-jmacro.spec.golden
--- a/test/golden-test-cases/hsx-jmacro.spec.golden
+++ b/test/golden-test-cases/hsx-jmacro.spec.golden
@@ -29,18 +29,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-hsp-devel
-BuildRequires:  ghc-hsp-prof
 BuildRequires:  ghc-jmacro-devel
-BuildRequires:  ghc-jmacro-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-wl-pprint-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-hsp-prof
+BuildRequires:  ghc-jmacro-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-wl-pprint-text-prof
+%endif
 
 %description
 HSP allows for the use of literal XML in Haskell program text. JMacro allows
@@ -73,6 +75,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -80,6 +83,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -110,6 +114,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hsyslog.spec.golden b/test/golden-test-cases/hsyslog.spec.golden
--- a/test/golden-test-cases/hsyslog.spec.golden
+++ b/test/golden-test-cases/hsyslog.spec.golden
@@ -29,12 +29,14 @@
 Source0:        https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
-BuildRequires:  ghc-Cabal-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-cabal-doctest-devel
-BuildRequires:  ghc-cabal-doctest-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-Cabal-prof
+BuildRequires:  ghc-cabal-doctest-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-doctest-devel
 BuildRequires:  ghc-doctest-prof
@@ -78,6 +80,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -85,6 +88,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -116,6 +120,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/htoml.spec.golden b/test/golden-test-cases/htoml.spec.golden
--- a/test/golden-test-cases/htoml.spec.golden
+++ b/test/golden-test-cases/htoml.spec.golden
@@ -30,24 +30,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-old-locale-devel
-BuildRequires:  ghc-old-locale-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-old-locale-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-bytestring-prof
@@ -92,6 +94,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -99,6 +102,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -132,6 +136,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/http-conduit.spec.golden b/test/golden-test-cases/http-conduit.spec.golden
--- a/test/golden-test-cases/http-conduit.spec.golden
+++ b/test/golden-test-cases/http-conduit.spec.golden
@@ -30,34 +30,36 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-conduit-devel
 BuildRequires:  ghc-conduit-extra-devel
-BuildRequires:  ghc-conduit-extra-prof
-BuildRequires:  ghc-conduit-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-http-client-devel
-BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-http-client-tls-devel
-BuildRequires:  ghc-http-client-tls-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-lifted-base-devel
-BuildRequires:  ghc-lifted-base-prof
 BuildRequires:  ghc-monad-control-devel
-BuildRequires:  ghc-monad-control-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-conduit-prof
+BuildRequires:  ghc-conduit-extra-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-http-client-prof
+BuildRequires:  ghc-http-client-tls-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-lifted-base-prof
+BuildRequires:  ghc-monad-control-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -124,6 +126,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -131,6 +134,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -164,6 +168,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/http-link-header.spec.golden b/test/golden-test-cases/http-link-header.spec.golden
--- a/test/golden-test-cases/http-link-header.spec.golden
+++ b/test/golden-test-cases/http-link-header.spec.golden
@@ -30,22 +30,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-conversion-devel
-BuildRequires:  ghc-bytestring-conversion-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-errors-devel
-BuildRequires:  ghc-errors-prof
 BuildRequires:  ghc-http-api-data-devel
-BuildRequires:  ghc-http-api-data-prof
 BuildRequires:  ghc-network-uri-devel
-BuildRequires:  ghc-network-uri-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-bytestring-conversion-prof
+BuildRequires:  ghc-errors-prof
+BuildRequires:  ghc-http-api-data-prof
+BuildRequires:  ghc-network-uri-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -83,6 +85,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -90,6 +93,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -123,6 +127,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license UNLICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/http-media.spec.golden b/test/golden-test-cases/http-media.spec.golden
--- a/test/golden-test-cases/http-media.spec.golden
+++ b/test/golden-test-cases/http-media.spec.golden
@@ -30,16 +30,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-case-insensitive-devel
-BuildRequires:  ghc-case-insensitive-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-utf8-string-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-case-insensitive-prof
+BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-utf8-string-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -97,6 +99,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -104,6 +107,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -137,6 +141,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hxt-charproperties.spec.golden b/test/golden-test-cases/hxt-charproperties.spec.golden
--- a/test/golden-test-cases/hxt-charproperties.spec.golden
+++ b/test/golden-test-cases/hxt-charproperties.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 Character proprties defined by XML and Unicode standards. These modules contain
@@ -62,6 +64,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -69,6 +72,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -97,6 +101,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hxt-expat.spec.golden b/test/golden-test-cases/hxt-expat.spec.golden
--- a/test/golden-test-cases/hxt-expat.spec.golden
+++ b/test/golden-test-cases/hxt-expat.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-hexpat-devel
-BuildRequires:  ghc-hexpat-prof
 BuildRequires:  ghc-hxt-devel
-BuildRequires:  ghc-hxt-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-hexpat-prof
+BuildRequires:  ghc-hxt-prof
+%endif
 
 %description
 The Expat interface for the HXT.
@@ -66,6 +68,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -73,6 +76,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -103,6 +107,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/hxt-tagsoup.spec.golden b/test/golden-test-cases/hxt-tagsoup.spec.golden
--- a/test/golden-test-cases/hxt-tagsoup.spec.golden
+++ b/test/golden-test-cases/hxt-tagsoup.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-hxt-charproperties-devel
-BuildRequires:  ghc-hxt-charproperties-prof
 BuildRequires:  ghc-hxt-devel
-BuildRequires:  ghc-hxt-prof
 BuildRequires:  ghc-hxt-unicode-devel
-BuildRequires:  ghc-hxt-unicode-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-tagsoup-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-hxt-prof
+BuildRequires:  ghc-hxt-charproperties-prof
+BuildRequires:  ghc-hxt-unicode-prof
 BuildRequires:  ghc-tagsoup-prof
+%endif
 
 %description
 The Tagsoup interface for the HXT lazy HTML parser.
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/iconv.spec.golden b/test/golden-test-cases/iconv.spec.golden
--- a/test/golden-test-cases/iconv.spec.golden
+++ b/test/golden-test-cases/iconv.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+%endif
 
 %description
 Provides an interface to the POSIX iconv library functions for string encoding
@@ -63,6 +65,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -70,6 +73,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -100,6 +104,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/incremental-parser.spec.golden b/test/golden-test-cases/incremental-parser.spec.golden
--- a/test/golden-test-cases/incremental-parser.spec.golden
+++ b/test/golden-test-cases/incremental-parser.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-monoid-subclasses-devel
-BuildRequires:  ghc-monoid-subclasses-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-monoid-subclasses-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -78,6 +80,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -85,6 +88,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -118,6 +122,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE.txt
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/indentation-core.spec.golden b/test/golden-test-cases/indentation-core.spec.golden
--- a/test/golden-test-cases/indentation-core.spec.golden
+++ b/test/golden-test-cases/indentation-core.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-mtl-prof
+%endif
 
 %description
 Indentation sensitive parsing combinators core library
@@ -66,6 +68,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -73,6 +76,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -103,6 +107,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/indentation-parsec.spec.golden b/test/golden-test-cases/indentation-parsec.spec.golden
--- a/test/golden-test-cases/indentation-parsec.spec.golden
+++ b/test/golden-test-cases/indentation-parsec.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-indentation-core-devel
-BuildRequires:  ghc-indentation-core-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-indentation-core-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-parsec-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-tasty-devel
 BuildRequires:  ghc-tasty-hunit-devel
@@ -85,6 +87,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -92,6 +95,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -125,6 +129,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/inline-c-cpp.spec.golden b/test/golden-test-cases/inline-c-cpp.spec.golden
--- a/test/golden-test-cases/inline-c-cpp.spec.golden
+++ b/test/golden-test-cases/inline-c-cpp.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-inline-c-devel
-BuildRequires:  ghc-inline-c-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-safe-exceptions-devel
-BuildRequires:  ghc-safe-exceptions-prof
 BuildRequires:  ghc-template-haskell-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-inline-c-prof
+BuildRequires:  ghc-safe-exceptions-prof
 BuildRequires:  ghc-template-haskell-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
@@ -72,6 +74,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -79,6 +82,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -110,6 +114,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/integer-logarithms.spec.golden b/test/golden-test-cases/integer-logarithms.spec.golden
--- a/test/golden-test-cases/integer-logarithms.spec.golden
+++ b/test/golden-test-cases/integer-logarithms.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -82,6 +84,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -89,6 +92,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -122,6 +126,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/intero.spec.golden b/test/golden-test-cases/intero.spec.golden
--- a/test/golden-test-cases/intero.spec.golden
+++ b/test/golden-test-cases/intero.spec.golden
@@ -27,38 +27,40 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-ghc-boot-th-devel
-BuildRequires:  ghc-ghc-boot-th-prof
 BuildRequires:  ghc-ghc-devel
 BuildRequires:  ghc-ghc-paths-devel
-BuildRequires:  ghc-ghc-paths-prof
-BuildRequires:  ghc-ghc-prof
 BuildRequires:  ghc-ghci-devel
-BuildRequires:  ghc-ghci-prof
 BuildRequires:  ghc-haskeline-devel
-BuildRequires:  ghc-haskeline-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-syb-devel
-BuildRequires:  ghc-syb-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unix-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-ghc-prof
+BuildRequires:  ghc-ghc-boot-th-prof
+BuildRequires:  ghc-ghc-paths-prof
+BuildRequires:  ghc-ghci-prof
+BuildRequires:  ghc-haskeline-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-syb-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unix-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
diff --git a/test/golden-test-cases/invariant.spec.golden b/test/golden-test-cases/invariant.spec.golden
--- a/test/golden-test-cases/invariant.spec.golden
+++ b/test/golden-test-cases/invariant.spec.golden
@@ -30,38 +30,40 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-StateVar-devel
-BuildRequires:  ghc-StateVar-prof
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bifunctors-devel
-BuildRequires:  ghc-bifunctors-prof
 BuildRequires:  ghc-comonad-devel
-BuildRequires:  ghc-comonad-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-contravariant-devel
-BuildRequires:  ghc-contravariant-prof
 BuildRequires:  ghc-profunctors-devel
-BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-stm-devel
-BuildRequires:  ghc-stm-prof
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-th-abstraction-devel
-BuildRequires:  ghc-th-abstraction-prof
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-StateVar-prof
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bifunctors-prof
+BuildRequires:  ghc-comonad-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-contravariant-prof
+BuildRequires:  ghc-profunctors-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-tagged-prof
+BuildRequires:  ghc-template-haskell-prof
+BuildRequires:  ghc-th-abstraction-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-unordered-containers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -101,6 +103,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -108,6 +111,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -141,6 +145,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/io-machine.spec.golden b/test/golden-test-cases/io-machine.spec.golden
--- a/test/golden-test-cases/io-machine.spec.golden
+++ b/test/golden-test-cases/io-machine.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-time-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-time-prof
+%endif
 
 %description
 Easy I/O model to learn IO monad.
@@ -63,6 +65,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -70,6 +73,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -101,6 +105,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/io-streams-haproxy.spec.golden b/test/golden-test-cases/io-streams-haproxy.spec.golden
--- a/test/golden-test-cases/io-streams-haproxy.spec.golden
+++ b/test/golden-test-cases/io-streams-haproxy.spec.golden
@@ -30,18 +30,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-io-streams-devel
-BuildRequires:  ghc-io-streams-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-io-streams-prof
+BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -83,6 +85,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -90,6 +93,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -123,6 +127,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/ip.spec.golden b/test/golden-test-cases/ip.spec.golden
--- a/test/golden-test-cases/ip.spec.golden
+++ b/test/golden-test-cases/ip.spec.golden
@@ -30,22 +30,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-primitive-devel
-BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-primitive-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -109,6 +111,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -116,6 +119,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -147,6 +151,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/iso639.spec.golden b/test/golden-test-cases/iso639.spec.golden
--- a/test/golden-test-cases/iso639.spec.golden
+++ b/test/golden-test-cases/iso639.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 ISO-639-1 language codes mapping to Haskell datatypes
@@ -66,6 +68,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -73,6 +76,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -101,6 +105,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/iso8601-time.spec.golden b/test/golden-test-cases/iso8601-time.spec.golden
--- a/test/golden-test-cases/iso8601-time.spec.golden
+++ b/test/golden-test-cases/iso8601-time.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-time-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-time-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -70,6 +72,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -77,6 +80,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/jmacro-rpc-happstack.spec.golden b/test/golden-test-cases/jmacro-rpc-happstack.spec.golden
--- a/test/golden-test-cases/jmacro-rpc-happstack.spec.golden
+++ b/test/golden-test-cases/jmacro-rpc-happstack.spec.golden
@@ -29,24 +29,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-html-devel
-BuildRequires:  ghc-blaze-html-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-happstack-server-devel
-BuildRequires:  ghc-happstack-server-prof
 BuildRequires:  ghc-jmacro-devel
-BuildRequires:  ghc-jmacro-prof
 BuildRequires:  ghc-jmacro-rpc-devel
-BuildRequires:  ghc-jmacro-rpc-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-html-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-happstack-server-prof
+BuildRequires:  ghc-jmacro-prof
+BuildRequires:  ghc-jmacro-rpc-prof
+BuildRequires:  ghc-mtl-prof
+%endif
 
 %description
 Provides functions for serving jmacro-rpc json rpcs and panels from Happstack.
@@ -77,6 +79,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -84,6 +87,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -112,6 +116,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/jmacro-rpc.spec.golden b/test/golden-test-cases/jmacro-rpc.spec.golden
--- a/test/golden-test-cases/jmacro-rpc.spec.golden
+++ b/test/golden-test-cases/jmacro-rpc.spec.golden
@@ -29,34 +29,36 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-html-devel
-BuildRequires:  ghc-blaze-html-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-contravariant-devel
-BuildRequires:  ghc-contravariant-prof
 BuildRequires:  ghc-jmacro-devel
-BuildRequires:  ghc-jmacro-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-split-devel
-BuildRequires:  ghc-split-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-html-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-contravariant-prof
+BuildRequires:  ghc-jmacro-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-split-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+%endif
 
 %description
 Base jmacro-rpc package. Provides server-independent functions.
@@ -86,6 +88,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -93,6 +96,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -121,6 +125,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/jose.spec.golden b/test/golden-test-cases/jose.spec.golden
--- a/test/golden-test-cases/jose.spec.golden
+++ b/test/golden-test-cases/jose.spec.golden
@@ -31,52 +31,54 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base64-bytestring-devel
-BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-concise-devel
-BuildRequires:  ghc-concise-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-cryptonite-devel
-BuildRequires:  ghc-cryptonite-prof
 BuildRequires:  ghc-lens-devel
-BuildRequires:  ghc-lens-prof
 BuildRequires:  ghc-memory-devel
-BuildRequires:  ghc-memory-prof
 BuildRequires:  ghc-monad-time-devel
-BuildRequires:  ghc-monad-time-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-network-uri-devel
-BuildRequires:  ghc-network-uri-prof
 BuildRequires:  ghc-quickcheck-instances-devel
-BuildRequires:  ghc-quickcheck-instances-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-safe-devel
-BuildRequires:  ghc-safe-prof
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-x509-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base64-bytestring-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-concise-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-cryptonite-prof
+BuildRequires:  ghc-lens-prof
+BuildRequires:  ghc-memory-prof
+BuildRequires:  ghc-monad-time-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-network-uri-prof
+BuildRequires:  ghc-quickcheck-instances-prof
+BuildRequires:  ghc-safe-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-template-haskell-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-unordered-containers-prof
+BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-x509-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
@@ -128,6 +130,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -135,6 +138,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -170,6 +174,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/katip-elasticsearch.spec.golden b/test/golden-test-cases/katip-elasticsearch.spec.golden
--- a/test/golden-test-cases/katip-elasticsearch.spec.golden
+++ b/test/golden-test-cases/katip-elasticsearch.spec.golden
@@ -30,44 +30,46 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-async-devel
-BuildRequires:  ghc-async-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bloodhound-devel
-BuildRequires:  ghc-bloodhound-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-enclosed-exceptions-devel
-BuildRequires:  ghc-enclosed-exceptions-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-http-client-devel
-BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-katip-devel
-BuildRequires:  ghc-katip-prof
 BuildRequires:  ghc-retry-devel
-BuildRequires:  ghc-retry-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-stm-chans-devel
-BuildRequires:  ghc-stm-chans-prof
 BuildRequires:  ghc-stm-devel
-BuildRequires:  ghc-stm-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-uuid-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-async-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bloodhound-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-enclosed-exceptions-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-http-client-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-katip-prof
+BuildRequires:  ghc-retry-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-stm-chans-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-uuid-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-containers-devel
 BuildRequires:  ghc-containers-prof
@@ -118,6 +120,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -125,6 +128,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -158,6 +162,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/katip.spec.golden b/test/golden-test-cases/katip.spec.golden
--- a/test/golden-test-cases/katip.spec.golden
+++ b/test/golden-test-cases/katip.spec.golden
@@ -30,60 +30,62 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-async-devel
-BuildRequires:  ghc-async-prof
 BuildRequires:  ghc-auto-update-devel
-BuildRequires:  ghc-auto-update-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-either-devel
-BuildRequires:  ghc-either-prof
 BuildRequires:  ghc-hostname-devel
-BuildRequires:  ghc-hostname-prof
 BuildRequires:  ghc-microlens-devel
-BuildRequires:  ghc-microlens-prof
 BuildRequires:  ghc-microlens-th-devel
-BuildRequires:  ghc-microlens-th-prof
 BuildRequires:  ghc-monad-control-devel
-BuildRequires:  ghc-monad-control-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-old-locale-devel
-BuildRequires:  ghc-old-locale-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-safe-exceptions-devel
-BuildRequires:  ghc-safe-exceptions-prof
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-stm-devel
-BuildRequires:  ghc-stm-prof
 BuildRequires:  ghc-string-conv-devel
-BuildRequires:  ghc-string-conv-prof
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-base-devel
-BuildRequires:  ghc-transformers-base-prof
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unix-devel
-BuildRequires:  ghc-unix-prof
 BuildRequires:  ghc-unordered-containers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-async-prof
+BuildRequires:  ghc-auto-update-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-either-prof
+BuildRequires:  ghc-hostname-prof
+BuildRequires:  ghc-microlens-prof
+BuildRequires:  ghc-microlens-th-prof
+BuildRequires:  ghc-monad-control-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-old-locale-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-safe-exceptions-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-string-conv-prof
+BuildRequires:  ghc-template-haskell-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-base-prof
+BuildRequires:  ghc-transformers-compat-prof
+BuildRequires:  ghc-unix-prof
 BuildRequires:  ghc-unordered-containers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-directory-prof
@@ -131,6 +133,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -138,6 +141,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -171,6 +175,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/katydid.spec.golden b/test/golden-test-cases/katydid.spec.golden
--- a/test/golden-test-cases/katydid.spec.golden
+++ b/test/golden-test-cases/katydid.spec.golden
@@ -31,20 +31,22 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-hxt-devel
-BuildRequires:  ghc-hxt-prof
 BuildRequires:  ghc-json-devel
-BuildRequires:  ghc-json-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-regex-tdfa-devel
-BuildRequires:  ghc-regex-tdfa-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-hxt-prof
+BuildRequires:  ghc-json-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-regex-tdfa-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -99,6 +101,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -106,6 +109,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -141,6 +145,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/kawhi.spec.golden b/test/golden-test-cases/kawhi.spec.golden
--- a/test/golden-test-cases/kawhi.spec.golden
+++ b/test/golden-test-cases/kawhi.spec.golden
@@ -30,28 +30,30 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-http-client-devel
-BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-http-conduit-devel
-BuildRequires:  ghc-http-conduit-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-safe-devel
-BuildRequires:  ghc-safe-prof
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-http-client-prof
+BuildRequires:  ghc-http-conduit-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-safe-prof
+BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-smallcheck-devel
 BuildRequires:  ghc-smallcheck-prof
@@ -93,6 +95,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -100,6 +103,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -133,6 +137,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/kraken.spec.golden b/test/golden-test-cases/kraken.spec.golden
--- a/test/golden-test-cases/kraken.spec.golden
+++ b/test/golden-test-cases/kraken.spec.golden
@@ -29,18 +29,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-http-client-devel
-BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-http-client-tls-devel
-BuildRequires:  ghc-http-client-tls-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-http-client-prof
+BuildRequires:  ghc-http-client-tls-prof
+BuildRequires:  ghc-mtl-prof
+%endif
 
 %description
 Kraken is a robust, ultra-fast image optimizer and compressor with
@@ -71,6 +73,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -78,6 +81,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -106,6 +110,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/l10n.spec.golden b/test/golden-test-cases/l10n.spec.golden
--- a/test/golden-test-cases/l10n.spec.golden
+++ b/test/golden-test-cases/l10n.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-prof
+%endif
 
 %description
 Enables providing localization as typeclass instances in separate files.
@@ -64,6 +66,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -71,6 +74,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -101,6 +105,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/lambdabot-social-plugins.spec.golden b/test/golden-test-cases/lambdabot-social-plugins.spec.golden
--- a/test/golden-test-cases/lambdabot-social-plugins.spec.golden
+++ b/test/golden-test-cases/lambdabot-social-plugins.spec.golden
@@ -29,22 +29,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-lambdabot-core-devel
-BuildRequires:  ghc-lambdabot-core-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-split-devel
-BuildRequires:  ghc-split-prof
 BuildRequires:  ghc-time-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-lambdabot-core-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-split-prof
 BuildRequires:  ghc-time-prof
+%endif
 
 %description
 Lambdabot is an IRC bot written over several years by those on the #haskell IRC
@@ -88,6 +90,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -95,6 +98,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -123,6 +127,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/lazy-csv.spec.golden b/test/golden-test-cases/lazy-csv.spec.golden
--- a/test/golden-test-cases/lazy-csv.spec.golden
+++ b/test/golden-test-cases/lazy-csv.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+%endif
 
 %description
 The CSV format is defined by RFC 4180. These efficient lazy parsers (String and
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENCE-BSD3
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/lens-aeson.spec.golden b/test/golden-test-cases/lens-aeson.spec.golden
--- a/test/golden-test-cases/lens-aeson.spec.golden
+++ b/test/golden-test-cases/lens-aeson.spec.golden
@@ -29,28 +29,30 @@
 Source0:        https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
-BuildRequires:  ghc-Cabal-prof
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cabal-doctest-devel
-BuildRequires:  ghc-cabal-doctest-prof
 BuildRequires:  ghc-lens-devel
-BuildRequires:  ghc-lens-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-lens-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-Cabal-prof
+BuildRequires:  ghc-cabal-doctest-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-doctest-devel
 BuildRequires:  ghc-doctest-prof
@@ -90,6 +92,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -97,6 +100,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -130,6 +134,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/lens.spec.golden b/test/golden-test-cases/lens.spec.golden
--- a/test/golden-test-cases/lens.spec.golden
+++ b/test/golden-test-cases/lens.spec.golden
@@ -29,70 +29,72 @@
 Source0:        https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
-BuildRequires:  ghc-Cabal-prof
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
 BuildRequires:  ghc-base-orphans-devel
-BuildRequires:  ghc-base-orphans-prof
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bifunctors-devel
-BuildRequires:  ghc-bifunctors-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cabal-doctest-devel
-BuildRequires:  ghc-cabal-doctest-prof
 BuildRequires:  ghc-call-stack-devel
-BuildRequires:  ghc-call-stack-prof
 BuildRequires:  ghc-comonad-devel
-BuildRequires:  ghc-comonad-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-contravariant-devel
-BuildRequires:  ghc-contravariant-prof
 BuildRequires:  ghc-distributive-devel
-BuildRequires:  ghc-distributive-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-free-devel
-BuildRequires:  ghc-free-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-kan-extensions-devel
-BuildRequires:  ghc-kan-extensions-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-parallel-devel
-BuildRequires:  ghc-parallel-prof
 BuildRequires:  ghc-profunctors-devel
-BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-reflection-devel
-BuildRequires:  ghc-reflection-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroupoids-devel
-BuildRequires:  ghc-semigroupoids-prof
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-th-abstraction-devel
-BuildRequires:  ghc-th-abstraction-prof
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-void-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-orphans-prof
+BuildRequires:  ghc-bifunctors-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-call-stack-prof
+BuildRequires:  ghc-comonad-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-contravariant-prof
+BuildRequires:  ghc-distributive-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-free-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-kan-extensions-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-parallel-prof
+BuildRequires:  ghc-profunctors-prof
+BuildRequires:  ghc-reflection-prof
+BuildRequires:  ghc-semigroupoids-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-tagged-prof
+BuildRequires:  ghc-template-haskell-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-th-abstraction-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-compat-prof
+BuildRequires:  ghc-unordered-containers-prof
+BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-void-prof
+BuildRequires:  ghc-Cabal-prof
+BuildRequires:  ghc-cabal-doctest-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -231,6 +233,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -238,6 +241,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -271,6 +275,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/libgit.spec.golden b/test/golden-test-cases/libgit.spec.golden
--- a/test/golden-test-cases/libgit.spec.golden
+++ b/test/golden-test-cases/libgit.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-process-prof
+%endif
 
 %description
 Simple git wrapper to access common git functions in a simple haskell way.
@@ -64,6 +66,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -71,6 +74,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -101,6 +105,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/librato.spec.golden b/test/golden-test-cases/librato.spec.golden
--- a/test/golden-test-cases/librato.spec.golden
+++ b/test/golden-test-cases/librato.spec.golden
@@ -29,34 +29,36 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-either-devel
-BuildRequires:  ghc-either-prof
 BuildRequires:  ghc-http-client-devel
-BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-http-conduit-devel
-BuildRequires:  ghc-http-conduit-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-uri-templater-devel
-BuildRequires:  ghc-uri-templater-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-either-prof
+BuildRequires:  ghc-http-client-prof
+BuildRequires:  ghc-http-conduit-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-unordered-containers-prof
+BuildRequires:  ghc-uri-templater-prof
 BuildRequires:  ghc-vector-prof
+%endif
 
 %description
 Bindings to the Librato API.
@@ -86,6 +88,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -93,6 +96,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -123,6 +127,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/lifted-async.spec.golden b/test/golden-test-cases/lifted-async.spec.golden
--- a/test/golden-test-cases/lifted-async.spec.golden
+++ b/test/golden-test-cases/lifted-async.spec.golden
@@ -30,18 +30,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-async-devel
-BuildRequires:  ghc-async-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-constraints-devel
-BuildRequires:  ghc-constraints-prof
 BuildRequires:  ghc-lifted-base-devel
-BuildRequires:  ghc-lifted-base-prof
 BuildRequires:  ghc-monad-control-devel
-BuildRequires:  ghc-monad-control-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-base-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-async-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-constraints-prof
+BuildRequires:  ghc-lifted-base-prof
+BuildRequires:  ghc-monad-control-prof
 BuildRequires:  ghc-transformers-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -84,6 +86,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -91,6 +94,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -124,6 +128,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/lmdb.spec.golden b/test/golden-test-cases/lmdb.spec.golden
--- a/test/golden-test-cases/lmdb.spec.golden
+++ b/test/golden-test-cases/lmdb.spec.golden
@@ -29,11 +29,13 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  lmdb-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 LMDB is a read-optimized Berkeley DB replacement developed by Symas for the
@@ -74,6 +76,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -81,6 +84,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -109,6 +113,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/logging-effect-extra-file.spec.golden b/test/golden-test-cases/logging-effect-extra-file.spec.golden
--- a/test/golden-test-cases/logging-effect-extra-file.spec.golden
+++ b/test/golden-test-cases/logging-effect-extra-file.spec.golden
@@ -30,14 +30,16 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-logging-effect-devel
-BuildRequires:  ghc-logging-effect-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-wl-pprint-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-logging-effect-prof
+BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-wl-pprint-text-prof
+%endif
 
 %description
 TH splices to augment log messages with file info.
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/lucid.spec.golden b/test/golden-test-cases/lucid.spec.golden
--- a/test/golden-test-cases/lucid.spec.golden
+++ b/test/golden-test-cases/lucid.spec.golden
@@ -30,26 +30,28 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-builder-devel
-BuildRequires:  ghc-blaze-builder-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-mmorph-devel
-BuildRequires:  ghc-mmorph-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-builder-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-mmorph-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -90,6 +92,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -97,6 +100,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -130,6 +134,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/mainland-pretty.spec.golden b/test/golden-test-cases/mainland-pretty.spec.golden
--- a/test/golden-test-cases/mainland-pretty.spec.golden
+++ b/test/golden-test-cases/mainland-pretty.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-srcloc-devel
-BuildRequires:  ghc-srcloc-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-srcloc-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 Pretty printing designed for printing source code based on Wadler's paper /A
@@ -72,6 +74,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -79,6 +82,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -107,6 +111,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/matrices.spec.golden b/test/golden-test-cases/matrices.spec.golden
--- a/test/golden-test-cases/matrices.spec.golden
+++ b/test/golden-test-cases/matrices.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-primitive-devel
-BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-tasty-devel
 BuildRequires:  ghc-tasty-hunit-devel
@@ -76,6 +78,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -83,6 +86,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -114,6 +118,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/median-stream.spec.golden b/test/golden-test-cases/median-stream.spec.golden
--- a/test/golden-test-cases/median-stream.spec.golden
+++ b/test/golden-test-cases/median-stream.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-heap-devel
-BuildRequires:  ghc-heap-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-heap-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -106,6 +110,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/megaparsec.spec.golden b/test/golden-test-cases/megaparsec.spec.golden
--- a/test/golden-test-cases/megaparsec.spec.golden
+++ b/test/golden-test-cases/megaparsec.spec.golden
@@ -30,26 +30,28 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-case-insensitive-devel
-BuildRequires:  ghc-case-insensitive-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-parser-combinators-devel
-BuildRequires:  ghc-parser-combinators-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-case-insensitive-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-parser-combinators-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -88,6 +90,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -95,6 +98,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -128,6 +132,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE.md
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/mersenne-random.spec.golden b/test/golden-test-cases/mersenne-random.spec.golden
--- a/test/golden-test-cases/mersenne-random.spec.golden
+++ b/test/golden-test-cases/mersenne-random.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-old-time-devel
-BuildRequires:  ghc-old-time-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-old-time-prof
+%endif
 
 %description
 The Mersenne twister is a pseudorandom number generator developed by Makoto
@@ -88,6 +90,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -95,6 +98,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -123,6 +127,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/messagepack.spec.golden b/test/golden-test-cases/messagepack.spec.golden
--- a/test/golden-test-cases/messagepack.spec.golden
+++ b/test/golden-test-cases/messagepack.spec.golden
@@ -30,16 +30,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cereal-devel
-BuildRequires:  ghc-cereal-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-cereal-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-deepseq-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -79,6 +81,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -86,6 +89,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -119,6 +123,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/microlens-ghc.spec.golden b/test/golden-test-cases/microlens-ghc.spec.golden
--- a/test/golden-test-cases/microlens-ghc.spec.golden
+++ b/test/golden-test-cases/microlens-ghc.spec.golden
@@ -29,18 +29,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-microlens-devel
-BuildRequires:  ghc-microlens-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-microlens-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 Use this package instead of <http://hackage.haskell.org/package/microlens
@@ -86,6 +88,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -93,6 +96,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -123,6 +127,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/microlens.spec.golden b/test/golden-test-cases/microlens.spec.golden
--- a/test/golden-test-cases/microlens.spec.golden
+++ b/test/golden-test-cases/microlens.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 NOTE: If you're writing an app, you probably want
@@ -115,6 +117,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -122,6 +125,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -152,6 +156,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/minio-hs.spec.golden b/test/golden-test-cases/minio-hs.spec.golden
--- a/test/golden-test-cases/minio-hs.spec.golden
+++ b/test/golden-test-cases/minio-hs.spec.golden
@@ -30,68 +30,70 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-async-devel
-BuildRequires:  ghc-async-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base64-bytestring-devel
-BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-case-insensitive-devel
-BuildRequires:  ghc-case-insensitive-prof
 BuildRequires:  ghc-conduit-combinators-devel
-BuildRequires:  ghc-conduit-combinators-prof
 BuildRequires:  ghc-conduit-devel
 BuildRequires:  ghc-conduit-extra-devel
-BuildRequires:  ghc-conduit-extra-prof
-BuildRequires:  ghc-conduit-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-cryptonite-conduit-devel
-BuildRequires:  ghc-cryptonite-conduit-prof
 BuildRequires:  ghc-cryptonite-devel
-BuildRequires:  ghc-cryptonite-prof
 BuildRequires:  ghc-data-default-devel
-BuildRequires:  ghc-data-default-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-http-client-devel
-BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-http-conduit-devel
-BuildRequires:  ghc-http-conduit-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-lifted-async-devel
-BuildRequires:  ghc-lifted-async-prof
 BuildRequires:  ghc-lifted-base-devel
-BuildRequires:  ghc-lifted-base-prof
 BuildRequires:  ghc-memory-devel
-BuildRequires:  ghc-memory-prof
 BuildRequires:  ghc-monad-control-devel
-BuildRequires:  ghc-monad-control-prof
 BuildRequires:  ghc-protolude-devel
-BuildRequires:  ghc-protolude-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
 BuildRequires:  ghc-text-format-devel
-BuildRequires:  ghc-text-format-prof
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-base-devel
-BuildRequires:  ghc-transformers-base-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-xml-conduit-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-async-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base64-bytestring-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-case-insensitive-prof
+BuildRequires:  ghc-conduit-prof
+BuildRequires:  ghc-conduit-combinators-prof
+BuildRequires:  ghc-conduit-extra-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-cryptonite-prof
+BuildRequires:  ghc-cryptonite-conduit-prof
+BuildRequires:  ghc-data-default-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-http-client-prof
+BuildRequires:  ghc-http-conduit-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-lifted-async-prof
+BuildRequires:  ghc-lifted-base-prof
+BuildRequires:  ghc-memory-prof
+BuildRequires:  ghc-monad-control-prof
+BuildRequires:  ghc-protolude-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-text-format-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-base-prof
+BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-xml-conduit-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -138,6 +140,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -145,6 +148,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -176,6 +180,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/mmorph.spec.golden b/test/golden-test-cases/mmorph.spec.golden
--- a/test/golden-test-cases/mmorph.spec.golden
+++ b/test/golden-test-cases/mmorph.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-compat-prof
+%endif
 
 %description
 This library provides monad morphism utilities, most commonly used for
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/mnist-idx.spec.golden b/test/golden-test-cases/mnist-idx.spec.golden
--- a/test/golden-test-cases/mnist-idx.spec.golden
+++ b/test/golden-test-cases/mnist-idx.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-directory-prof
@@ -75,6 +77,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -82,6 +85,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -113,6 +117,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/mole.spec.golden b/test/golden-test-cases/mole.spec.golden
--- a/test/golden-test-cases/mole.spec.golden
+++ b/test/golden-test-cases/mole.spec.golden
@@ -27,54 +27,56 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base64-bytestring-devel
-BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-cryptohash-devel
-BuildRequires:  ghc-cryptohash-prof
 BuildRequires:  ghc-css-syntax-devel
-BuildRequires:  ghc-css-syntax-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-filemanip-devel
-BuildRequires:  ghc-filemanip-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-fsnotify-devel
-BuildRequires:  ghc-fsnotify-prof
 BuildRequires:  ghc-kraken-devel
-BuildRequires:  ghc-kraken-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-network-uri-devel
-BuildRequires:  ghc-network-uri-prof
 BuildRequires:  ghc-optparse-applicative-devel
-BuildRequires:  ghc-optparse-applicative-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-snap-core-devel
-BuildRequires:  ghc-snap-core-prof
 BuildRequires:  ghc-snap-server-devel
-BuildRequires:  ghc-snap-server-prof
 BuildRequires:  ghc-stm-devel
-BuildRequires:  ghc-stm-prof
 BuildRequires:  ghc-tagsoup-devel
-BuildRequires:  ghc-tagsoup-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unix-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base64-bytestring-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-cryptohash-prof
+BuildRequires:  ghc-css-syntax-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-filemanip-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-fsnotify-prof
+BuildRequires:  ghc-kraken-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-network-uri-prof
+BuildRequires:  ghc-optparse-applicative-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-snap-core-prof
+BuildRequires:  ghc-snap-server-prof
+BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-tagsoup-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unix-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
diff --git a/test/golden-test-cases/monad-products.spec.golden b/test/golden-test-cases/monad-products.spec.golden
--- a/test/golden-test-cases/monad-products.spec.golden
+++ b/test/golden-test-cases/monad-products.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroupoids-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-semigroupoids-prof
+%endif
 
 %description
 Monad products.
@@ -62,6 +64,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -69,6 +72,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -99,6 +103,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/monadcryptorandom.spec.golden b/test/golden-test-cases/monadcryptorandom.spec.golden
--- a/test/golden-test-cases/monadcryptorandom.spec.golden
+++ b/test/golden-test-cases/monadcryptorandom.spec.golden
@@ -29,22 +29,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-crypto-api-devel
-BuildRequires:  ghc-crypto-api-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-crypto-api-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-compat-prof
+%endif
 
 %description
 A monad for using CryptoRandomGen.
@@ -74,6 +76,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -81,6 +84,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -109,6 +113,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/monadloc.spec.golden b/test/golden-test-cases/monadloc.spec.golden
--- a/test/golden-test-cases/monadloc.spec.golden
+++ b/test/golden-test-cases/monadloc.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 This package defines a class for monads which can keep a monadic call trace.
@@ -85,6 +87,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -92,6 +95,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -117,6 +121,8 @@
 
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/mongoDB.spec.golden b/test/golden-test-cases/mongoDB.spec.golden
--- a/test/golden-test-cases/mongoDB.spec.golden
+++ b/test/golden-test-cases/mongoDB.spec.golden
@@ -30,64 +30,66 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base16-bytestring-devel
-BuildRequires:  ghc-base16-bytestring-prof
 BuildRequires:  ghc-base64-bytestring-devel
-BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bson-devel
-BuildRequires:  ghc-bson-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-conduit-devel
 BuildRequires:  ghc-conduit-extra-devel
-BuildRequires:  ghc-conduit-extra-prof
-BuildRequires:  ghc-conduit-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-cryptohash-devel
-BuildRequires:  ghc-cryptohash-prof
 BuildRequires:  ghc-data-default-class-devel
-BuildRequires:  ghc-data-default-class-prof
 BuildRequires:  ghc-hashtables-devel
-BuildRequires:  ghc-hashtables-prof
 BuildRequires:  ghc-lifted-base-devel
-BuildRequires:  ghc-lifted-base-prof
 BuildRequires:  ghc-monad-control-devel
-BuildRequires:  ghc-monad-control-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-nonce-devel
-BuildRequires:  ghc-nonce-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-pureMD5-devel
-BuildRequires:  ghc-pureMD5-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-random-shuffle-devel
-BuildRequires:  ghc-random-shuffle-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-tls-devel
-BuildRequires:  ghc-tls-prof
 BuildRequires:  ghc-transformers-base-devel
-BuildRequires:  ghc-transformers-base-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base16-bytestring-prof
+BuildRequires:  ghc-base64-bytestring-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bson-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-conduit-prof
+BuildRequires:  ghc-conduit-extra-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-cryptohash-prof
+BuildRequires:  ghc-data-default-class-prof
+BuildRequires:  ghc-hashtables-prof
+BuildRequires:  ghc-lifted-base-prof
+BuildRequires:  ghc-monad-control-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-nonce-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-pureMD5-prof
+BuildRequires:  ghc-random-prof
+BuildRequires:  ghc-random-shuffle-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-tagged-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-tls-prof
 BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
@@ -125,6 +127,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -132,6 +135,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -165,6 +169,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/monoid-extras.spec.golden b/test/golden-test-cases/monoid-extras.spec.golden
--- a/test/golden-test-cases/monoid-extras.spec.golden
+++ b/test/golden-test-cases/monoid-extras.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-groups-devel
-BuildRequires:  ghc-groups-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroupoids-devel
-BuildRequires:  ghc-semigroupoids-prof
 BuildRequires:  ghc-semigroups-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-groups-prof
+BuildRequires:  ghc-semigroupoids-prof
 BuildRequires:  ghc-semigroups-prof
+%endif
 
 %description
 Various extra monoid-related definitions and utilities, such as monoid actions,
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/mwc-random-monad.spec.golden b/test/golden-test-cases/mwc-random-monad.spec.golden
--- a/test/golden-test-cases/mwc-random-monad.spec.golden
+++ b/test/golden-test-cases/mwc-random-monad.spec.golden
@@ -29,18 +29,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-monad-primitive-devel
-BuildRequires:  ghc-monad-primitive-prof
 BuildRequires:  ghc-mwc-random-devel
-BuildRequires:  ghc-mwc-random-prof
 BuildRequires:  ghc-primitive-devel
-BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-monad-primitive-prof
+BuildRequires:  ghc-mwc-random-prof
+BuildRequires:  ghc-primitive-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-prof
+%endif
 
 %description
 Simple monadic interface for mwc-random.
@@ -70,6 +72,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -77,6 +80,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -107,6 +111,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/mwc-random.spec.golden b/test/golden-test-cases/mwc-random.spec.golden
--- a/test/golden-test-cases/mwc-random.spec.golden
+++ b/test/golden-test-cases/mwc-random.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-math-functions-devel
-BuildRequires:  ghc-math-functions-prof
 BuildRequires:  ghc-primitive-devel
-BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-math-functions-prof
+BuildRequires:  ghc-primitive-prof
+BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-vector-prof
+%endif
 
 %description
 This package contains code for generating high quality random numbers that
@@ -78,6 +80,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -85,6 +88,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -115,6 +119,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/nanospec.spec.golden b/test/golden-test-cases/nanospec.spec.golden
--- a/test/golden-test-cases/nanospec.spec.golden
+++ b/test/golden-test-cases/nanospec.spec.golden
@@ -30,8 +30,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -106,6 +110,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/nats.spec.golden b/test/golden-test-cases/nats.spec.golden
--- a/test/golden-test-cases/nats.spec.golden
+++ b/test/golden-test-cases/nats.spec.golden
@@ -58,6 +58,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -65,6 +66,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -95,6 +97,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/netpbm.spec.golden b/test/golden-test-cases/netpbm.spec.golden
--- a/test/golden-test-cases/netpbm.spec.golden
+++ b/test/golden-test-cases/netpbm.spec.golden
@@ -30,22 +30,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-binary-devel
-BuildRequires:  ghc-attoparsec-binary-prof
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-storable-record-devel
-BuildRequires:  ghc-storable-record-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-vector-th-unbox-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-attoparsec-binary-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-storable-record-prof
+BuildRequires:  ghc-unordered-containers-prof
+BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-vector-th-unbox-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -98,6 +100,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -105,6 +108,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -133,6 +137,8 @@
 
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/network-protocol-xmpp.spec.golden b/test/golden-test-cases/network-protocol-xmpp.spec.golden
--- a/test/golden-test-cases/network-protocol-xmpp.spec.golden
+++ b/test/golden-test-cases/network-protocol-xmpp.spec.golden
@@ -29,28 +29,30 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-gnuidn-devel
-BuildRequires:  ghc-gnuidn-prof
 BuildRequires:  ghc-gnutls-devel
-BuildRequires:  ghc-gnutls-prof
 BuildRequires:  ghc-gsasl-devel
-BuildRequires:  ghc-gsasl-prof
 BuildRequires:  ghc-libxml-sax-devel
-BuildRequires:  ghc-libxml-sax-prof
 BuildRequires:  ghc-monads-tf-devel
-BuildRequires:  ghc-monads-tf-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-xml-types-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-gnuidn-prof
+BuildRequires:  ghc-gnutls-prof
+BuildRequires:  ghc-gsasl-prof
+BuildRequires:  ghc-libxml-sax-prof
+BuildRequires:  ghc-monads-tf-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-xml-types-prof
+%endif
 
 %description
 Client library for the XMPP protocol.
@@ -81,6 +83,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -88,6 +91,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -116,6 +120,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license license.txt
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/network-transport-tcp.spec.golden b/test/golden-test-cases/network-transport-tcp.spec.golden
--- a/test/golden-test-cases/network-transport-tcp.spec.golden
+++ b/test/golden-test-cases/network-transport-tcp.spec.golden
@@ -30,18 +30,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-data-accessor-devel
-BuildRequires:  ghc-data-accessor-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-network-transport-devel
-BuildRequires:  ghc-network-transport-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-data-accessor-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-network-transport-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-network-transport-tests-devel
 BuildRequires:  ghc-network-transport-tests-prof
@@ -76,6 +78,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -83,6 +86,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -116,6 +120,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/nix-paths.spec.golden b/test/golden-test-cases/nix-paths.spec.golden
--- a/test/golden-test-cases/nix-paths.spec.golden
+++ b/test/golden-test-cases/nix-paths.spec.golden
@@ -29,15 +29,17 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  nix-build
 BuildRequires:  nix-env
 BuildRequires:  nix-hash
 BuildRequires:  nix-instantiate
 BuildRequires:  nix-store
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-process-prof
+%endif
 
 %description
 This module provides full paths to various Nix utilities, like 'nix-store',
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -103,6 +107,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/nvim-hs.spec.golden b/test/golden-test-cases/nvim-hs.spec.golden
--- a/test/golden-test-cases/nvim-hs.spec.golden
+++ b/test/golden-test-cases/nvim-hs.spec.golden
@@ -31,78 +31,80 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-ansi-wl-pprint-devel
-BuildRequires:  ghc-ansi-wl-pprint-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cereal-conduit-devel
-BuildRequires:  ghc-cereal-conduit-prof
 BuildRequires:  ghc-cereal-devel
-BuildRequires:  ghc-cereal-prof
 BuildRequires:  ghc-conduit-devel
 BuildRequires:  ghc-conduit-extra-devel
-BuildRequires:  ghc-conduit-extra-prof
-BuildRequires:  ghc-conduit-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-data-default-devel
-BuildRequires:  ghc-data-default-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-dyre-devel
-BuildRequires:  ghc-dyre-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-foreign-store-devel
-BuildRequires:  ghc-foreign-store-prof
 BuildRequires:  ghc-hslogger-devel
-BuildRequires:  ghc-hslogger-prof
 BuildRequires:  ghc-lifted-base-devel
-BuildRequires:  ghc-lifted-base-prof
 BuildRequires:  ghc-megaparsec-devel
-BuildRequires:  ghc-megaparsec-prof
 BuildRequires:  ghc-messagepack-devel
-BuildRequires:  ghc-messagepack-prof
 BuildRequires:  ghc-monad-control-devel
-BuildRequires:  ghc-monad-control-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-optparse-applicative-devel
-BuildRequires:  ghc-optparse-applicative-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-setenv-devel
-BuildRequires:  ghc-setenv-prof
 BuildRequires:  ghc-stm-devel
-BuildRequires:  ghc-stm-prof
 BuildRequires:  ghc-streaming-commons-devel
-BuildRequires:  ghc-streaming-commons-prof
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
 BuildRequires:  ghc-time-locale-compat-devel
-BuildRequires:  ghc-time-locale-compat-prof
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-base-devel
-BuildRequires:  ghc-transformers-base-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-utf8-string-devel
-BuildRequires:  ghc-utf8-string-prof
 BuildRequires:  ghc-void-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-ansi-wl-pprint-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-cereal-prof
+BuildRequires:  ghc-cereal-conduit-prof
+BuildRequires:  ghc-conduit-prof
+BuildRequires:  ghc-conduit-extra-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-data-default-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-dyre-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-foreign-store-prof
+BuildRequires:  ghc-hslogger-prof
+BuildRequires:  ghc-lifted-base-prof
+BuildRequires:  ghc-megaparsec-prof
+BuildRequires:  ghc-messagepack-prof
+BuildRequires:  ghc-monad-control-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-optparse-applicative-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-setenv-prof
+BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-streaming-commons-prof
+BuildRequires:  ghc-template-haskell-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-time-locale-compat-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-base-prof
+BuildRequires:  ghc-utf8-string-prof
 BuildRequires:  ghc-void-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -160,6 +162,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -167,6 +170,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -202,6 +206,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/once.spec.golden b/test/golden-test-cases/once.spec.golden
--- a/test/golden-test-cases/once.spec.golden
+++ b/test/golden-test-cases/once.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-unordered-containers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-unordered-containers-prof
+%endif
 
 %description
 Please see Control.Once for examples.
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -103,6 +107,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/one-liner.spec.golden b/test/golden-test-cases/one-liner.spec.golden
--- a/test/golden-test-cases/one-liner.spec.golden
+++ b/test/golden-test-cases/one-liner.spec.golden
@@ -30,18 +30,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bifunctors-devel
-BuildRequires:  ghc-bifunctors-prof
 BuildRequires:  ghc-contravariant-devel
-BuildRequires:  ghc-contravariant-prof
 BuildRequires:  ghc-profunctors-devel
-BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bifunctors-prof
+BuildRequires:  ghc-contravariant-prof
+BuildRequires:  ghc-profunctors-prof
+BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -76,6 +78,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -83,6 +86,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -116,6 +120,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/online.spec.golden b/test/golden-test-cases/online.spec.golden
--- a/test/golden-test-cases/online.spec.golden
+++ b/test/golden-test-cases/online.spec.golden
@@ -29,20 +29,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-foldl-devel
-BuildRequires:  ghc-foldl-prof
 BuildRequires:  ghc-numhask-devel
-BuildRequires:  ghc-numhask-prof
 BuildRequires:  ghc-protolude-devel
-BuildRequires:  ghc-protolude-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-tdigest-devel
-BuildRequires:  ghc-tdigest-prof
 BuildRequires:  ghc-vector-algorithms-devel
-BuildRequires:  ghc-vector-algorithms-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-foldl-prof
+BuildRequires:  ghc-numhask-prof
+BuildRequires:  ghc-protolude-prof
+BuildRequires:  ghc-tdigest-prof
 BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-vector-algorithms-prof
+%endif
 
 %description
 Transformation of statistics to online algorithms.
@@ -72,6 +74,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -79,6 +82,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -109,6 +113,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/openexr-write.spec.golden b/test/golden-test-cases/openexr-write.spec.golden
--- a/test/golden-test-cases/openexr-write.spec.golden
+++ b/test/golden-test-cases/openexr-write.spec.golden
@@ -30,24 +30,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-data-binary-ieee754-devel
-BuildRequires:  ghc-data-binary-ieee754-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-split-devel
-BuildRequires:  ghc-split-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-vector-split-devel
-BuildRequires:  ghc-vector-split-prof
 BuildRequires:  ghc-zlib-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-data-binary-ieee754-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-split-prof
+BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-vector-split-prof
 BuildRequires:  ghc-zlib-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-directory-prof
@@ -84,6 +86,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -91,6 +94,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -124,6 +128,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/openpgp-asciiarmor.spec.golden b/test/golden-test-cases/openpgp-asciiarmor.spec.golden
--- a/test/golden-test-cases/openpgp-asciiarmor.spec.golden
+++ b/test/golden-test-cases/openpgp-asciiarmor.spec.golden
@@ -30,16 +30,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base64-bytestring-devel
-BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cereal-devel
-BuildRequires:  ghc-cereal-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base64-bytestring-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-cereal-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -77,6 +79,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -84,6 +87,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -115,6 +119,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/pager.spec.golden b/test/golden-test-cases/pager.spec.golden
--- a/test/golden-test-cases/pager.spec.golden
+++ b/test/golden-test-cases/pager.spec.golden
@@ -30,30 +30,32 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-conduit-devel
 BuildRequires:  ghc-conduit-extra-devel
-BuildRequires:  ghc-conduit-extra-prof
-BuildRequires:  ghc-conduit-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-safe-devel
-BuildRequires:  ghc-safe-prof
 BuildRequires:  ghc-terminfo-devel
-BuildRequires:  ghc-terminfo-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unix-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-conduit-prof
+BuildRequires:  ghc-conduit-extra-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-safe-prof
+BuildRequires:  ghc-terminfo-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unix-prof
+%endif
 
 %description
 This opens up the user's $PAGER. On Linux, this is usually called 'less'.
@@ -88,6 +90,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -95,6 +98,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -129,6 +133,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/pandoc.spec.golden b/test/golden-test-cases/pandoc.spec.golden
--- a/test/golden-test-cases/pandoc.spec.golden
+++ b/test/golden-test-cases/pandoc.spec.golden
@@ -30,112 +30,114 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
-BuildRequires:  ghc-Cabal-prof
 BuildRequires:  ghc-Glob-devel
-BuildRequires:  ghc-Glob-prof
 BuildRequires:  ghc-HTTP-devel
-BuildRequires:  ghc-HTTP-prof
 BuildRequires:  ghc-JuicyPixels-devel
-BuildRequires:  ghc-JuicyPixels-prof
 BuildRequires:  ghc-SHA-devel
-BuildRequires:  ghc-SHA-prof
 BuildRequires:  ghc-aeson-devel
 BuildRequires:  ghc-aeson-pretty-devel
-BuildRequires:  ghc-aeson-pretty-prof
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-compat-devel
-BuildRequires:  ghc-base-compat-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base64-bytestring-devel
-BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-blaze-html-devel
-BuildRequires:  ghc-blaze-html-prof
 BuildRequires:  ghc-blaze-markup-devel
-BuildRequires:  ghc-blaze-markup-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-case-insensitive-devel
-BuildRequires:  ghc-case-insensitive-prof
 BuildRequires:  ghc-cmark-gfm-devel
-BuildRequires:  ghc-cmark-gfm-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-data-default-devel
-BuildRequires:  ghc-data-default-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-doctemplates-devel
-BuildRequires:  ghc-doctemplates-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-haddock-library-devel
-BuildRequires:  ghc-haddock-library-prof
 BuildRequires:  ghc-hslua-devel
 BuildRequires:  ghc-hslua-module-text-devel
-BuildRequires:  ghc-hslua-module-text-prof
-BuildRequires:  ghc-hslua-prof
 BuildRequires:  ghc-http-client-devel
-BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-http-client-tls-devel
-BuildRequires:  ghc-http-client-tls-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-network-uri-devel
-BuildRequires:  ghc-network-uri-prof
 BuildRequires:  ghc-pandoc-types-devel
-BuildRequires:  ghc-pandoc-types-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-safe-devel
-BuildRequires:  ghc-safe-prof
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-skylighting-devel
-BuildRequires:  ghc-skylighting-prof
 BuildRequires:  ghc-split-devel
-BuildRequires:  ghc-split-prof
 BuildRequires:  ghc-syb-devel
-BuildRequires:  ghc-syb-prof
 BuildRequires:  ghc-tagsoup-devel
-BuildRequires:  ghc-tagsoup-prof
 BuildRequires:  ghc-temporary-devel
-BuildRequires:  ghc-temporary-prof
 BuildRequires:  ghc-texmath-devel
-BuildRequires:  ghc-texmath-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unix-devel
-BuildRequires:  ghc-unix-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-xml-devel
-BuildRequires:  ghc-xml-prof
 BuildRequires:  ghc-yaml-devel
-BuildRequires:  ghc-yaml-prof
 BuildRequires:  ghc-zip-archive-devel
-BuildRequires:  ghc-zip-archive-prof
 BuildRequires:  ghc-zlib-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-Glob-prof
+BuildRequires:  ghc-HTTP-prof
+BuildRequires:  ghc-JuicyPixels-prof
+BuildRequires:  ghc-SHA-prof
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-aeson-pretty-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-compat-prof
+BuildRequires:  ghc-base64-bytestring-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-blaze-html-prof
+BuildRequires:  ghc-blaze-markup-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-case-insensitive-prof
+BuildRequires:  ghc-cmark-gfm-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-data-default-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-doctemplates-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-haddock-library-prof
+BuildRequires:  ghc-hslua-prof
+BuildRequires:  ghc-hslua-module-text-prof
+BuildRequires:  ghc-http-client-prof
+BuildRequires:  ghc-http-client-tls-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-network-uri-prof
+BuildRequires:  ghc-pandoc-types-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-random-prof
+BuildRequires:  ghc-safe-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-skylighting-prof
+BuildRequires:  ghc-split-prof
+BuildRequires:  ghc-syb-prof
+BuildRequires:  ghc-tagsoup-prof
+BuildRequires:  ghc-temporary-prof
+BuildRequires:  ghc-texmath-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-unix-prof
+BuildRequires:  ghc-unordered-containers-prof
+BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-xml-prof
+BuildRequires:  ghc-yaml-prof
+BuildRequires:  ghc-zip-archive-prof
 BuildRequires:  ghc-zlib-prof
+BuildRequires:  ghc-Cabal-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-Diff-devel
 BuildRequires:  ghc-Diff-prof
@@ -197,6 +199,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -204,6 +207,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -386,6 +390,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license COPYING.md
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/partial-isomorphisms.spec.golden b/test/golden-test-cases/partial-isomorphisms.spec.golden
--- a/test/golden-test-cases/partial-isomorphisms.spec.golden
+++ b/test/golden-test-cases/partial-isomorphisms.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-template-haskell-prof
+%endif
 
 %description
 Partial isomorphisms as described in the paper:
@@ -70,6 +72,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -77,6 +80,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/partial-semigroup.spec.golden b/test/golden-test-cases/partial-semigroup.spec.golden
--- a/test/golden-test-cases/partial-semigroup.spec.golden
+++ b/test/golden-test-cases/partial-semigroup.spec.golden
@@ -30,8 +30,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-doctest-devel
 BuildRequires:  ghc-doctest-prof
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -106,6 +110,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license license.txt
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/pathtype.spec.golden b/test/golden-test-cases/pathtype.spec.golden
--- a/test/golden-test-cases/pathtype.spec.golden
+++ b/test/golden-test-cases/pathtype.spec.golden
@@ -30,24 +30,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-old-time-devel
-BuildRequires:  ghc-old-time-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-utility-ht-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-old-time-prof
+BuildRequires:  ghc-tagged-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-utility-ht-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-random-devel
 BuildRequires:  ghc-random-prof
@@ -117,6 +119,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -124,6 +127,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -157,6 +161,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/pcap.spec.golden b/test/golden-test-cases/pcap.spec.golden
--- a/test/golden-test-cases/pcap.spec.golden
+++ b/test/golden-test-cases/pcap.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-time-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-time-prof
+%endif
 
 %description
 A system-independent interface for user-level packet capture.
@@ -66,6 +68,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -73,6 +76,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -103,6 +107,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/pdfinfo.spec.golden b/test/golden-test-cases/pdfinfo.spec.golden
--- a/test/golden-test-cases/pdfinfo.spec.golden
+++ b/test/golden-test-cases/pdfinfo.spec.golden
@@ -29,20 +29,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-old-locale-devel
-BuildRequires:  ghc-old-locale-prof
 BuildRequires:  ghc-process-extras-devel
-BuildRequires:  ghc-process-extras-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
 BuildRequires:  ghc-time-locale-compat-devel
-BuildRequires:  ghc-time-locale-compat-prof
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-old-locale-prof
+BuildRequires:  ghc-process-extras-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-time-locale-compat-prof
+%endif
 
 %description
 Just a wrapper around the pdfinfo command (for collecting PDF file info).
@@ -73,6 +75,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -80,6 +83,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -108,6 +112,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/pell.spec.golden b/test/golden-test-cases/pell.spec.golden
--- a/test/golden-test-cases/pell.spec.golden
+++ b/test/golden-test-cases/pell.spec.golden
@@ -30,12 +30,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-arithmoi-devel
-BuildRequires:  ghc-arithmoi-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-arithmoi-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-Cabal-prof
@@ -75,6 +77,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -82,6 +85,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -115,6 +119,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/persistable-types-HDBC-pg.spec.golden b/test/golden-test-cases/persistable-types-HDBC-pg.spec.golden
--- a/test/golden-test-cases/persistable-types-HDBC-pg.spec.golden
+++ b/test/golden-test-cases/persistable-types-HDBC-pg.spec.golden
@@ -29,20 +29,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-HDBC-devel
-BuildRequires:  ghc-HDBC-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-convertible-devel
-BuildRequires:  ghc-convertible-prof
 BuildRequires:  ghc-persistable-record-devel
-BuildRequires:  ghc-persistable-record-prof
 BuildRequires:  ghc-relational-query-HDBC-devel
-BuildRequires:  ghc-relational-query-HDBC-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-postgresql-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-HDBC-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-convertible-prof
+BuildRequires:  ghc-persistable-record-prof
+BuildRequires:  ghc-relational-query-HDBC-prof
 BuildRequires:  ghc-text-postgresql-prof
+%endif
 
 %description
 This package contains HDBC Convertible instances and Relational-Record
@@ -75,6 +77,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -82,6 +85,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -112,6 +116,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/persistent-mysql-haskell.spec.golden b/test/golden-test-cases/persistent-mysql-haskell.spec.golden
--- a/test/golden-test-cases/persistent-mysql-haskell.spec.golden
+++ b/test/golden-test-cases/persistent-mysql-haskell.spec.golden
@@ -30,42 +30,44 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-conduit-devel
-BuildRequires:  ghc-conduit-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-io-streams-devel
-BuildRequires:  ghc-io-streams-prof
 BuildRequires:  ghc-monad-control-devel
-BuildRequires:  ghc-monad-control-prof
 BuildRequires:  ghc-monad-logger-devel
-BuildRequires:  ghc-monad-logger-prof
 BuildRequires:  ghc-mysql-haskell-devel
-BuildRequires:  ghc-mysql-haskell-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-persistent-devel
-BuildRequires:  ghc-persistent-prof
 BuildRequires:  ghc-persistent-template-devel
-BuildRequires:  ghc-persistent-template-prof
 BuildRequires:  ghc-resource-pool-devel
-BuildRequires:  ghc-resource-pool-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-tls-devel
-BuildRequires:  ghc-tls-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-conduit-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-io-streams-prof
+BuildRequires:  ghc-monad-control-prof
+BuildRequires:  ghc-monad-logger-prof
+BuildRequires:  ghc-mysql-haskell-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-persistent-prof
+BuildRequires:  ghc-resource-pool-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-tls-prof
 BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-persistent-template-prof
+%endif
 
 %description
 This package contains a backend for persistent using the MySQL database server.
@@ -105,6 +107,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -112,6 +115,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -144,6 +148,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/picosat.spec.golden b/test/golden-test-cases/picosat.spec.golden
--- a/test/golden-test-cases/picosat.spec.golden
+++ b/test/golden-test-cases/picosat.spec.golden
@@ -30,12 +30,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-random-devel
 BuildRequires:  ghc-random-prof
@@ -71,6 +73,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -78,6 +81,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -109,6 +113,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/pinch.spec.golden b/test/golden-test-cases/pinch.spec.golden
--- a/test/golden-test-cases/pinch.spec.golden
+++ b/test/golden-test-cases/pinch.spec.golden
@@ -30,24 +30,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -96,6 +98,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -103,6 +106,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -136,6 +140,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/pipes-network.spec.golden b/test/golden-test-cases/pipes-network.spec.golden
--- a/test/golden-test-cases/pipes-network.spec.golden
+++ b/test/golden-test-cases/pipes-network.spec.golden
@@ -29,20 +29,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-network-simple-devel
-BuildRequires:  ghc-network-simple-prof
 BuildRequires:  ghc-pipes-devel
-BuildRequires:  ghc-pipes-prof
 BuildRequires:  ghc-pipes-safe-devel
-BuildRequires:  ghc-pipes-safe-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-network-simple-prof
+BuildRequires:  ghc-pipes-prof
+BuildRequires:  ghc-pipes-safe-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 Use network sockets together with the 'pipes' library.
@@ -86,6 +88,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -93,6 +96,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -123,6 +127,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/pipes-safe.spec.golden b/test/golden-test-cases/pipes-safe.spec.golden
--- a/test/golden-test-cases/pipes-safe.spec.golden
+++ b/test/golden-test-cases/pipes-safe.spec.golden
@@ -29,24 +29,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-monad-control-devel
-BuildRequires:  ghc-monad-control-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-pipes-devel
-BuildRequires:  ghc-pipes-prof
 BuildRequires:  ghc-primitive-devel
-BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-base-devel
-BuildRequires:  ghc-transformers-base-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-monad-control-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-pipes-prof
+BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-base-prof
+%endif
 
 %description
 This package adds resource management and exception handling to the 'pipes'
@@ -91,6 +93,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -98,6 +101,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -128,6 +132,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/pointed.spec.golden b/test/golden-test-cases/pointed.spec.golden
--- a/test/golden-test-cases/pointed.spec.golden
+++ b/test/golden-test-cases/pointed.spec.golden
@@ -29,32 +29,34 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-comonad-devel
-BuildRequires:  ghc-comonad-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-data-default-class-devel
-BuildRequires:  ghc-data-default-class-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-kan-extensions-devel
-BuildRequires:  ghc-kan-extensions-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroupoids-devel
-BuildRequires:  ghc-semigroupoids-prof
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-stm-devel
-BuildRequires:  ghc-stm-prof
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-comonad-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-data-default-class-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-kan-extensions-prof
+BuildRequires:  ghc-semigroupoids-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-tagged-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-unordered-containers-prof
+%endif
 
 %description
 Pointed and copointed data.
@@ -84,6 +86,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -91,6 +94,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -121,6 +125,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/poly-arity.spec.golden b/test/golden-test-cases/poly-arity.spec.golden
--- a/test/golden-test-cases/poly-arity.spec.golden
+++ b/test/golden-test-cases/poly-arity.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-constraints-devel
-BuildRequires:  ghc-constraints-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-constraints-prof
+%endif
 
 %description
 Tools for working with functions of undetermined arity.
@@ -62,6 +64,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -69,6 +72,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -97,6 +101,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/polynomials-bernstein.spec.golden b/test/golden-test-cases/polynomials-bernstein.spec.golden
--- a/test/golden-test-cases/polynomials-bernstein.spec.golden
+++ b/test/golden-test-cases/polynomials-bernstein.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-vector-prof
+%endif
 
 %description
 This library defines an optimized type for representing polynomials in
@@ -65,6 +67,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -72,6 +75,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -100,6 +104,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/postgresql-simple-url.spec.golden b/test/golden-test-cases/postgresql-simple-url.spec.golden
--- a/test/golden-test-cases/postgresql-simple-url.spec.golden
+++ b/test/golden-test-cases/postgresql-simple-url.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-network-uri-devel
-BuildRequires:  ghc-network-uri-prof
 BuildRequires:  ghc-postgresql-simple-devel
-BuildRequires:  ghc-postgresql-simple-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-split-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-network-uri-prof
+BuildRequires:  ghc-postgresql-simple-prof
 BuildRequires:  ghc-split-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-tasty-devel
 BuildRequires:  ghc-tasty-prof
@@ -75,6 +77,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -82,6 +85,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -115,6 +119,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/prelude-safeenum.spec.golden b/test/golden-test-cases/prelude-safeenum.spec.golden
--- a/test/golden-test-cases/prelude-safeenum.spec.golden
+++ b/test/golden-test-cases/prelude-safeenum.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 A redefinition of the Prelude's Enum class in order to render it safe.
@@ -64,6 +66,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -71,6 +74,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -101,6 +105,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/presburger.spec.golden b/test/golden-test-cases/presburger.spec.golden
--- a/test/golden-test-cases/presburger.spec.golden
+++ b/test/golden-test-cases/presburger.spec.golden
@@ -30,12 +30,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-pretty-devel
-BuildRequires:  ghc-pretty-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-pretty-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -70,6 +72,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -77,6 +80,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -108,6 +112,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/prettyclass.spec.golden b/test/golden-test-cases/prettyclass.spec.golden
--- a/test/golden-test-cases/prettyclass.spec.golden
+++ b/test/golden-test-cases/prettyclass.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-pretty-devel
-BuildRequires:  ghc-pretty-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-pretty-prof
+%endif
 
 %description
 Pretty printing class similar to Show, based on the HughesPJ pretty printing
@@ -64,6 +66,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -71,6 +74,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -96,6 +100,8 @@
 
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/prettyprinter-compat-ansi-wl-pprint.spec.golden b/test/golden-test-cases/prettyprinter-compat-ansi-wl-pprint.spec.golden
--- a/test/golden-test-cases/prettyprinter-compat-ansi-wl-pprint.spec.golden
+++ b/test/golden-test-cases/prettyprinter-compat-ansi-wl-pprint.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-prettyprinter-ansi-terminal-devel
-BuildRequires:  ghc-prettyprinter-ansi-terminal-prof
 BuildRequires:  ghc-prettyprinter-devel
-BuildRequires:  ghc-prettyprinter-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-prettyprinter-prof
+BuildRequires:  ghc-prettyprinter-ansi-terminal-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 Drop-in compatibility package to migrate from »ansi-wl-pprint« to
@@ -69,6 +71,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -76,6 +79,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -106,6 +110,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE.md
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/prettyprinter-compat-wl-pprint.spec.golden b/test/golden-test-cases/prettyprinter-compat-wl-pprint.spec.golden
--- a/test/golden-test-cases/prettyprinter-compat-wl-pprint.spec.golden
+++ b/test/golden-test-cases/prettyprinter-compat-wl-pprint.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-prettyprinter-devel
-BuildRequires:  ghc-prettyprinter-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-prettyprinter-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 Prettyprinter compatibility module for previous users of the wl-pprint package.
@@ -66,6 +68,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -73,6 +76,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -103,6 +107,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE.md
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/primitive.spec.golden b/test/golden-test-cases/primitive.spec.golden
--- a/test/golden-test-cases/primitive.spec.golden
+++ b/test/golden-test-cases/primitive.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 This package provides various primitive memory-related operations.
@@ -63,6 +65,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -70,6 +73,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -103,6 +107,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/product-profunctors.spec.golden b/test/golden-test-cases/product-profunctors.spec.golden
--- a/test/golden-test-cases/product-profunctors.spec.golden
+++ b/test/golden-test-cases/product-profunctors.spec.golden
@@ -30,16 +30,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-contravariant-devel
-BuildRequires:  ghc-contravariant-prof
 BuildRequires:  ghc-profunctors-devel
-BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-template-haskell-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-contravariant-prof
+BuildRequires:  ghc-profunctors-prof
+BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-template-haskell-prof
+%endif
 
 %description
 Product profunctors.
@@ -70,6 +72,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -77,6 +80,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -108,6 +112,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/profiterole.spec.golden b/test/golden-test-cases/profiterole.spec.golden
--- a/test/golden-test-cases/profiterole.spec.golden
+++ b/test/golden-test-cases/profiterole.spec.golden
@@ -26,24 +26,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-extra-devel
-BuildRequires:  ghc-extra-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-ghc-prof-devel
-BuildRequires:  ghc-ghc-prof-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-extra-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-ghc-prof-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 Given a GHC profile output, this tool generates alternative views on the data,
diff --git a/test/golden-test-cases/projectroot.spec.golden b/test/golden-test-cases/projectroot.spec.golden
--- a/test/golden-test-cases/projectroot.spec.golden
+++ b/test/golden-test-cases/projectroot.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-directory-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -71,6 +73,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -78,6 +81,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -109,6 +113,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/proto-lens-optparse.spec.golden b/test/golden-test-cases/proto-lens-optparse.spec.golden
--- a/test/golden-test-cases/proto-lens-optparse.spec.golden
+++ b/test/golden-test-cases/proto-lens-optparse.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-optparse-applicative-devel
-BuildRequires:  ghc-optparse-applicative-prof
 BuildRequires:  ghc-proto-lens-devel
-BuildRequires:  ghc-proto-lens-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-optparse-applicative-prof
+BuildRequires:  ghc-proto-lens-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 A package adapting proto-lens to optparse-applicative ReadMs. This gives an
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/proto-lens.spec.golden b/test/golden-test-cases/proto-lens.spec.golden
--- a/test/golden-test-cases/proto-lens.spec.golden
+++ b/test/golden-test-cases/proto-lens.spec.golden
@@ -29,28 +29,30 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-data-default-class-devel
-BuildRequires:  ghc-data-default-class-prof
 BuildRequires:  ghc-lens-family-devel
-BuildRequires:  ghc-lens-family-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-pretty-devel
-BuildRequires:  ghc-pretty-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-void-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-data-default-class-prof
+BuildRequires:  ghc-lens-family-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-pretty-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-void-prof
+%endif
 
 %description
 The proto-lens library provides to protocol buffers using modern Haskell
@@ -87,6 +89,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -94,6 +97,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -124,6 +128,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/psqueues.spec.golden b/test/golden-test-cases/psqueues.spec.golden
--- a/test/golden-test-cases/psqueues.spec.golden
+++ b/test/golden-test-cases/psqueues.spec.golden
@@ -30,12 +30,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-hashable-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -118,6 +120,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -125,6 +128,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -158,6 +162,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/pusher-http-haskell.spec.golden b/test/golden-test-cases/pusher-http-haskell.spec.golden
--- a/test/golden-test-cases/pusher-http-haskell.spec.golden
+++ b/test/golden-test-cases/pusher-http-haskell.spec.golden
@@ -30,34 +30,36 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base16-bytestring-devel
-BuildRequires:  ghc-base16-bytestring-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cryptonite-devel
-BuildRequires:  ghc-cryptonite-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-http-client-devel
-BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-memory-devel
-BuildRequires:  ghc-memory-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base16-bytestring-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-cryptonite-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-http-client-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-memory-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -99,6 +101,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -106,6 +109,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -137,6 +141,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/quickcheck-arbitrary-adt.spec.golden b/test/golden-test-cases/quickcheck-arbitrary-adt.spec.golden
--- a/test/golden-test-cases/quickcheck-arbitrary-adt.spec.golden
+++ b/test/golden-test-cases/quickcheck-arbitrary-adt.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
@@ -74,6 +76,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -81,6 +84,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -112,6 +116,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/quickcheck-combinators.spec.golden b/test/golden-test-cases/quickcheck-combinators.spec.golden
--- a/test/golden-test-cases/quickcheck-combinators.spec.golden
+++ b/test/golden-test-cases/quickcheck-combinators.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-unfoldable-restricted-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-unfoldable-restricted-prof
+%endif
 
 %description
 Simply wrap the type you want to generate (assuming it satisfies all the
@@ -72,6 +74,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -79,6 +82,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -109,6 +113,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/rank1dynamic.spec.golden b/test/golden-test-cases/rank1dynamic.spec.golden
--- a/test/golden-test-cases/rank1dynamic.spec.golden
+++ b/test/golden-test-cases/rank1dynamic.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -73,6 +75,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -80,6 +83,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -113,6 +117,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/rasterific-svg.spec.golden b/test/golden-test-cases/rasterific-svg.spec.golden
--- a/test/golden-test-cases/rasterific-svg.spec.golden
+++ b/test/golden-test-cases/rasterific-svg.spec.golden
@@ -30,44 +30,46 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-FontyFruity-devel
-BuildRequires:  ghc-FontyFruity-prof
 BuildRequires:  ghc-JuicyPixels-devel
-BuildRequires:  ghc-JuicyPixels-prof
 BuildRequires:  ghc-Rasterific-devel
-BuildRequires:  ghc-Rasterific-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-lens-devel
-BuildRequires:  ghc-lens-prof
 BuildRequires:  ghc-linear-devel
-BuildRequires:  ghc-linear-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-optparse-applicative-devel
-BuildRequires:  ghc-optparse-applicative-prof
 BuildRequires:  ghc-primitive-devel
-BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-svg-tree-devel
-BuildRequires:  ghc-svg-tree-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-FontyFruity-prof
+BuildRequires:  ghc-JuicyPixels-prof
+BuildRequires:  ghc-Rasterific-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-lens-prof
+BuildRequires:  ghc-linear-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-primitive-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-svg-tree-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-optparse-applicative-prof
+%endif
 
 %description
 SVG renderer that will let you render svg-tree parsed SVG file to a JuicyPixel
@@ -98,6 +100,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -105,6 +108,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -137,6 +141,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/ratio-int.spec.golden b/test/golden-test-cases/ratio-int.spec.golden
--- a/test/golden-test-cases/ratio-int.spec.golden
+++ b/test/golden-test-cases/ratio-int.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 Fast specialisation of Data.Ratio for Int.
@@ -63,6 +65,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -70,6 +73,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -95,6 +99,8 @@
 
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/rawstring-qm.spec.golden b/test/golden-test-cases/rawstring-qm.spec.golden
--- a/test/golden-test-cases/rawstring-qm.spec.golden
+++ b/test/golden-test-cases/rawstring-qm.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 Supply a couple of usefull QuasiQuotes so we can use functions to lookup values
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/reactive-banana.spec.golden b/test/golden-test-cases/reactive-banana.spec.golden
--- a/test/golden-test-cases/reactive-banana.spec.golden
+++ b/test/golden-test-cases/reactive-banana.spec.golden
@@ -30,20 +30,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-pqueue-devel
-BuildRequires:  ghc-pqueue-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vault-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-pqueue-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vault-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -97,6 +99,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -104,6 +107,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -137,6 +141,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/readline.spec.golden b/test/golden-test-cases/readline.spec.golden
--- a/test/golden-test-cases/readline.spec.golden
+++ b/test/golden-test-cases/readline.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-process-prof
+%endif
 
 %description
 More information on readline can be found at
@@ -63,6 +65,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -70,6 +73,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -98,6 +102,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/rebase.spec.golden b/test/golden-test-cases/rebase.spec.golden
--- a/test/golden-test-cases/rebase.spec.golden
+++ b/test/golden-test-cases/rebase.spec.golden
@@ -30,55 +30,57 @@
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
 BuildRequires:  ghc-base-prelude-devel
-BuildRequires:  ghc-base-prelude-prof
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bifunctors-devel
-BuildRequires:  ghc-bifunctors-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-contravariant-devel
 BuildRequires:  ghc-contravariant-extras-devel
-BuildRequires:  ghc-contravariant-extras-prof
-BuildRequires:  ghc-contravariant-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-dlist-devel
-BuildRequires:  ghc-dlist-prof
 BuildRequires:  ghc-either-devel
-BuildRequires:  ghc-either-prof
 BuildRequires:  ghc-fail-devel
-BuildRequires:  ghc-fail-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-profunctors-devel
-BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-semigroupoids-devel
-BuildRequires:  ghc-semigroupoids-prof
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-stm-devel
-BuildRequires:  ghc-stm-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-uuid-devel
-BuildRequires:  ghc-uuid-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-void-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-prelude-prof
+BuildRequires:  ghc-bifunctors-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-contravariant-prof
+BuildRequires:  ghc-contravariant-extras-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-dlist-prof
+BuildRequires:  ghc-either-prof
+BuildRequires:  ghc-fail-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-profunctors-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-semigroupoids-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-unordered-containers-prof
+BuildRequires:  ghc-uuid-prof
+BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-void-prof
+%endif
 
 %description
 This package is intended for those who are tired of keeping long lists of
@@ -125,6 +127,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -132,6 +135,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -160,6 +164,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/reform-blaze.spec.golden b/test/golden-test-cases/reform-blaze.spec.golden
--- a/test/golden-test-cases/reform-blaze.spec.golden
+++ b/test/golden-test-cases/reform-blaze.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-html-devel
-BuildRequires:  ghc-blaze-html-prof
 BuildRequires:  ghc-blaze-markup-devel
-BuildRequires:  ghc-blaze-markup-prof
 BuildRequires:  ghc-reform-devel
-BuildRequires:  ghc-reform-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-html-prof
+BuildRequires:  ghc-blaze-markup-prof
+BuildRequires:  ghc-reform-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 Reform is a library for building and validating forms using applicative
@@ -69,6 +71,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -76,6 +79,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/reform-hsp.spec.golden b/test/golden-test-cases/reform-hsp.spec.golden
--- a/test/golden-test-cases/reform-hsp.spec.golden
+++ b/test/golden-test-cases/reform-hsp.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-hsp-devel
-BuildRequires:  ghc-hsp-prof
 BuildRequires:  ghc-hsx2hs-devel
-BuildRequires:  ghc-hsx2hs-prof
 BuildRequires:  ghc-reform-devel
-BuildRequires:  ghc-reform-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-hsp-prof
+BuildRequires:  ghc-hsx2hs-prof
+BuildRequires:  ghc-reform-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 Reform is a library for building and validating forms using applicative
@@ -69,6 +71,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -76,6 +79,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -104,6 +108,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/regex-compat.spec.golden b/test/golden-test-cases/regex-compat.spec.golden
--- a/test/golden-test-cases/regex-compat.spec.golden
+++ b/test/golden-test-cases/regex-compat.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-regex-base-devel
-BuildRequires:  ghc-regex-base-prof
 BuildRequires:  ghc-regex-posix-devel
-BuildRequires:  ghc-regex-posix-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-regex-base-prof
+BuildRequires:  ghc-regex-posix-prof
+%endif
 
 %description
 One module layer over regex-posix to replace Text.Regex.
@@ -66,6 +68,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -73,6 +76,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -101,6 +105,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/regex-pcre.spec.golden b/test/golden-test-cases/regex-pcre.spec.golden
--- a/test/golden-test-cases/regex-pcre.spec.golden
+++ b/test/golden-test-cases/regex-pcre.spec.golden
@@ -29,17 +29,19 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-regex-base-devel
-BuildRequires:  ghc-regex-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  pcre-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-regex-base-prof
+%endif
 
 %description
 The PCRE backend to accompany regex-base, see www.pcre.org.
@@ -70,6 +72,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -77,6 +80,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/relational-query.spec.golden b/test/golden-test-cases/relational-query.spec.golden
--- a/test/golden-test-cases/relational-query.spec.golden
+++ b/test/golden-test-cases/relational-query.spec.golden
@@ -30,36 +30,38 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-dlist-devel
-BuildRequires:  ghc-dlist-prof
 BuildRequires:  ghc-names-th-devel
-BuildRequires:  ghc-names-th-prof
 BuildRequires:  ghc-persistable-record-devel
-BuildRequires:  ghc-persistable-record-prof
 BuildRequires:  ghc-product-isomorphic-devel
-BuildRequires:  ghc-product-isomorphic-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-sql-words-devel
-BuildRequires:  ghc-sql-words-prof
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-th-reify-compat-devel
-BuildRequires:  ghc-th-reify-compat-prof
 BuildRequires:  ghc-time-devel
 BuildRequires:  ghc-time-locale-compat-devel
-BuildRequires:  ghc-time-locale-compat-prof
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-dlist-prof
+BuildRequires:  ghc-names-th-prof
+BuildRequires:  ghc-persistable-record-prof
+BuildRequires:  ghc-product-isomorphic-prof
+BuildRequires:  ghc-sql-words-prof
+BuildRequires:  ghc-template-haskell-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-th-reify-compat-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-time-locale-compat-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-quickcheck-simple-devel
 BuildRequires:  ghc-quickcheck-simple-prof
@@ -96,6 +98,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -103,6 +106,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -136,6 +140,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/relational-schemas.spec.golden b/test/golden-test-cases/relational-schemas.spec.golden
--- a/test/golden-test-cases/relational-schemas.spec.golden
+++ b/test/golden-test-cases/relational-schemas.spec.golden
@@ -29,18 +29,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-relational-query-devel
-BuildRequires:  ghc-relational-query-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-time-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-relational-query-prof
+BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-time-prof
+%endif
 
 %description
 This package contains some RDBMSs' schema structure definitions.
@@ -72,6 +74,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -79,6 +82,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -109,6 +113,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/repa-io.spec.golden b/test/golden-test-cases/repa-io.spec.golden
--- a/test/golden-test-cases/repa-io.spec.golden
+++ b/test/golden-test-cases/repa-io.spec.golden
@@ -29,20 +29,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bmp-devel
-BuildRequires:  ghc-bmp-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-old-time-devel
-BuildRequires:  ghc-old-time-prof
 BuildRequires:  ghc-repa-devel
-BuildRequires:  ghc-repa-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bmp-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-old-time-prof
+BuildRequires:  ghc-repa-prof
 BuildRequires:  ghc-vector-prof
+%endif
 
 %description
 Read and write Repa arrays in various formats.
@@ -72,6 +74,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -79,6 +82,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -107,6 +111,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/repa.spec.golden b/test/golden-test-cases/repa.spec.golden
--- a/test/golden-test-cases/repa.spec.golden
+++ b/test/golden-test-cases/repa.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-vector-prof
+%endif
 
 %description
 Repa provides high performance, regular, multi-dimensional, shape polymorphic
@@ -71,6 +73,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -78,6 +81,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -106,6 +110,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/rosezipper.spec.golden b/test/golden-test-cases/rosezipper.spec.golden
--- a/test/golden-test-cases/rosezipper.spec.golden
+++ b/test/golden-test-cases/rosezipper.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+%endif
 
 %description
 A Haskell datastructure for working with locations in trees or forests.
@@ -62,6 +64,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -69,6 +72,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -97,6 +101,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/rvar.spec.golden b/test/golden-test-cases/rvar.spec.golden
--- a/test/golden-test-cases/rvar.spec.golden
+++ b/test/golden-test-cases/rvar.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-MonadPrompt-devel
-BuildRequires:  ghc-MonadPrompt-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-random-source-devel
-BuildRequires:  ghc-random-source-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-MonadPrompt-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-random-source-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 Random number generation based on modeling random variables by an abstract type
@@ -80,6 +82,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -87,6 +90,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -112,6 +116,8 @@
 
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/scalpel-core.spec.golden b/test/golden-test-cases/scalpel-core.spec.golden
--- a/test/golden-test-cases/scalpel-core.spec.golden
+++ b/test/golden-test-cases/scalpel-core.spec.golden
@@ -30,26 +30,28 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-data-default-devel
-BuildRequires:  ghc-data-default-prof
 BuildRequires:  ghc-fail-devel
-BuildRequires:  ghc-fail-prof
 BuildRequires:  ghc-regex-base-devel
-BuildRequires:  ghc-regex-base-prof
 BuildRequires:  ghc-regex-tdfa-devel
-BuildRequires:  ghc-regex-tdfa-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-tagsoup-devel
-BuildRequires:  ghc-tagsoup-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-data-default-prof
+BuildRequires:  ghc-fail-prof
+BuildRequires:  ghc-regex-base-prof
+BuildRequires:  ghc-regex-tdfa-prof
+BuildRequires:  ghc-tagsoup-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -85,6 +87,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -92,6 +95,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -125,6 +129,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/sdl2.spec.golden b/test/golden-test-cases/sdl2.spec.golden
--- a/test/golden-test-cases/sdl2.spec.golden
+++ b/test/golden-test-cases/sdl2.spec.golden
@@ -29,25 +29,27 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-StateVar-devel
-BuildRequires:  ghc-StateVar-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-linear-devel
-BuildRequires:  ghc-linear-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  libSDL2-devel
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(sdl2)
+%if %{with ghc_prof}
+BuildRequires:  ghc-StateVar-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-linear-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-vector-prof
+%endif
 
 %description
 This package contains bindings to the SDL 2 library, in both high- and
@@ -89,6 +91,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -96,6 +99,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -132,6 +136,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/selda-sqlite.spec.golden b/test/golden-test-cases/selda-sqlite.spec.golden
--- a/test/golden-test-cases/selda-sqlite.spec.golden
+++ b/test/golden-test-cases/selda-sqlite.spec.golden
@@ -29,18 +29,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-direct-sqlite-devel
-BuildRequires:  ghc-direct-sqlite-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-selda-devel
-BuildRequires:  ghc-selda-prof
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-direct-sqlite-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-selda-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 SQLite backend for the Selda database EDSL.
@@ -70,6 +72,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -77,6 +80,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/selda.spec.golden b/test/golden-test-cases/selda.spec.golden
--- a/test/golden-test-cases/selda.spec.golden
+++ b/test/golden-test-cases/selda.spec.golden
@@ -29,24 +29,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-psqueues-devel
-BuildRequires:  ghc-psqueues-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unordered-containers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-psqueues-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unordered-containers-prof
+%endif
 
 %description
 This package provides an EDSL for writing portable, type-safe, high-level
@@ -82,6 +84,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -89,6 +92,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -119,6 +123,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/servant-checked-exceptions.spec.golden b/test/golden-test-cases/servant-checked-exceptions.spec.golden
--- a/test/golden-test-cases/servant-checked-exceptions.spec.golden
+++ b/test/golden-test-cases/servant-checked-exceptions.spec.golden
@@ -30,30 +30,32 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-http-media-devel
-BuildRequires:  ghc-http-media-prof
 BuildRequires:  ghc-profunctors-devel
-BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-servant-client-devel
-BuildRequires:  ghc-servant-client-prof
 BuildRequires:  ghc-servant-devel
 BuildRequires:  ghc-servant-docs-devel
-BuildRequires:  ghc-servant-docs-prof
-BuildRequires:  ghc-servant-prof
 BuildRequires:  ghc-servant-server-devel
-BuildRequires:  ghc-servant-server-prof
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-http-media-prof
+BuildRequires:  ghc-profunctors-prof
+BuildRequires:  ghc-servant-prof
+BuildRequires:  ghc-servant-client-prof
+BuildRequires:  ghc-servant-docs-prof
+BuildRequires:  ghc-servant-server-prof
+BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-Glob-devel
 BuildRequires:  ghc-Glob-prof
@@ -101,6 +103,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -108,6 +111,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -141,6 +145,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/set-cover.spec.golden b/test/golden-test-cases/set-cover.spec.golden
--- a/test/golden-test-cases/set-cover.spec.golden
+++ b/test/golden-test-cases/set-cover.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-enummapset-devel
-BuildRequires:  ghc-enummapset-prof
 BuildRequires:  ghc-psqueues-devel
-BuildRequires:  ghc-psqueues-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-utility-ht-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-enummapset-prof
+BuildRequires:  ghc-psqueues-prof
 BuildRequires:  ghc-utility-ht-prof
+%endif
 
 %description
 Solver for exact set cover problems. Included examples: Sudoku, Nonogram, 8
@@ -79,6 +81,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -86,6 +89,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -116,6 +120,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/sets.spec.golden b/test/golden-test-cases/sets.spec.golden
--- a/test/golden-test-cases/sets.spec.golden
+++ b/test/golden-test-cases/sets.spec.golden
@@ -30,36 +30,38 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-commutative-devel
-BuildRequires:  ghc-commutative-prof
 BuildRequires:  ghc-composition-devel
-BuildRequires:  ghc-composition-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-contravariant-devel
-BuildRequires:  ghc-contravariant-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-keys-devel
-BuildRequires:  ghc-keys-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroupoids-devel
-BuildRequires:  ghc-semigroupoids-prof
 BuildRequires:  ghc-semigroups-devel
-BuildRequires:  ghc-semigroups-prof
 BuildRequires:  ghc-transformers-base-devel
-BuildRequires:  ghc-transformers-base-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-witherable-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-commutative-prof
+BuildRequires:  ghc-composition-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-contravariant-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-keys-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-semigroupoids-prof
+BuildRequires:  ghc-semigroups-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-base-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-witherable-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-quickcheck-instances-devel
 BuildRequires:  ghc-quickcheck-instances-prof
@@ -99,6 +101,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -106,6 +109,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -137,6 +141,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/simple-smt.spec.golden b/test/golden-test-cases/simple-smt.spec.golden
--- a/test/golden-test-cases/simple-smt.spec.golden
+++ b/test/golden-test-cases/simple-smt.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-process-prof
+%endif
 
 %description
 A simple way to interact with an SMT solver process.
@@ -62,6 +64,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -69,6 +72,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -99,6 +103,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/slack-web.spec.golden b/test/golden-test-cases/slack-web.spec.golden
--- a/test/golden-test-cases/slack-web.spec.golden
+++ b/test/golden-test-cases/slack-web.spec.golden
@@ -30,34 +30,36 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-errors-devel
-BuildRequires:  ghc-errors-prof
 BuildRequires:  ghc-http-api-data-devel
-BuildRequires:  ghc-http-api-data-prof
 BuildRequires:  ghc-http-client-devel
-BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-http-client-tls-devel
-BuildRequires:  ghc-http-client-tls-prof
 BuildRequires:  ghc-megaparsec-devel
-BuildRequires:  ghc-megaparsec-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-servant-client-devel
-BuildRequires:  ghc-servant-client-prof
 BuildRequires:  ghc-servant-devel
-BuildRequires:  ghc-servant-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-errors-prof
+BuildRequires:  ghc-http-api-data-prof
+BuildRequires:  ghc-http-client-prof
+BuildRequires:  ghc-http-client-tls-prof
+BuildRequires:  ghc-megaparsec-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-servant-prof
+BuildRequires:  ghc-servant-client-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
@@ -91,6 +93,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -98,6 +101,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -131,6 +135,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE.md
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/slug.spec.golden b/test/golden-test-cases/slug.spec.golden
--- a/test/golden-test-cases/slug.spec.golden
+++ b/test/golden-test-cases/slug.spec.golden
@@ -30,22 +30,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-http-api-data-devel
-BuildRequires:  ghc-http-api-data-prof
 BuildRequires:  ghc-path-pieces-devel
-BuildRequires:  ghc-path-pieces-prof
 BuildRequires:  ghc-persistent-devel
-BuildRequires:  ghc-persistent-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-http-api-data-prof
+BuildRequires:  ghc-path-pieces-prof
+BuildRequires:  ghc-persistent-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
@@ -79,6 +81,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -86,6 +89,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -119,6 +123,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE.md
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/soxlib.spec.golden b/test/golden-test-cases/soxlib.spec.golden
--- a/test/golden-test-cases/soxlib.spec.golden
+++ b/test/golden-test-cases/soxlib.spec.golden
@@ -29,26 +29,28 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-explicit-exception-devel
-BuildRequires:  ghc-explicit-exception-prof
 BuildRequires:  ghc-extensible-exceptions-devel
-BuildRequires:  ghc-extensible-exceptions-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-sample-frame-devel
-BuildRequires:  ghc-sample-frame-prof
 BuildRequires:  ghc-storablevector-devel
-BuildRequires:  ghc-storablevector-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-utility-ht-devel
-BuildRequires:  ghc-utility-ht-prof
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(sox)
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-explicit-exception-prof
+BuildRequires:  ghc-extensible-exceptions-prof
+BuildRequires:  ghc-sample-frame-prof
+BuildRequires:  ghc-storablevector-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-utility-ht-prof
+%endif
 
 %description
 This is an FFI binding to 'libsox' of the Sox (Sound Exchanger) project
@@ -84,6 +86,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -91,6 +94,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -119,6 +123,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/speedy-slice.spec.golden b/test/golden-test-cases/speedy-slice.spec.golden
--- a/test/golden-test-cases/speedy-slice.spec.golden
+++ b/test/golden-test-cases/speedy-slice.spec.golden
@@ -30,22 +30,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-kan-extensions-devel
-BuildRequires:  ghc-kan-extensions-prof
 BuildRequires:  ghc-lens-devel
-BuildRequires:  ghc-lens-prof
 BuildRequires:  ghc-mcmc-types-devel
-BuildRequires:  ghc-mcmc-types-prof
 BuildRequires:  ghc-mwc-probability-devel
-BuildRequires:  ghc-mwc-probability-prof
 BuildRequires:  ghc-pipes-devel
-BuildRequires:  ghc-pipes-prof
 BuildRequires:  ghc-primitive-devel
-BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-kan-extensions-prof
+BuildRequires:  ghc-lens-prof
+BuildRequires:  ghc-mcmc-types-prof
+BuildRequires:  ghc-mwc-probability-prof
+BuildRequires:  ghc-pipes-prof
+BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-containers-devel
 BuildRequires:  ghc-containers-prof
@@ -96,6 +98,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -103,6 +106,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -134,6 +138,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/splice.spec.golden b/test/golden-test-cases/splice.spec.golden
--- a/test/golden-test-cases/splice.spec.golden
+++ b/test/golden-test-cases/splice.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-network-prof
+%endif
 
 %description
 A library that implements most efficient socket to socket data transfer loops
@@ -77,6 +79,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -84,6 +87,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -112,6 +116,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/spreadsheet.spec.golden b/test/golden-test-cases/spreadsheet.spec.golden
--- a/test/golden-test-cases/spreadsheet.spec.golden
+++ b/test/golden-test-cases/spreadsheet.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-explicit-exception-devel
-BuildRequires:  ghc-explicit-exception-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-utility-ht-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-explicit-exception-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-utility-ht-prof
+%endif
 
 %description
 Read and write spreadsheets from and to files containing comma separated values
@@ -89,6 +91,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -96,6 +99,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -126,6 +130,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/stack-type.spec.golden b/test/golden-test-cases/stack-type.spec.golden
--- a/test/golden-test-cases/stack-type.spec.golden
+++ b/test/golden-test-cases/stack-type.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 The basic stack type.
@@ -62,6 +64,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -69,6 +72,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -99,6 +103,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/state-codes.spec.golden b/test/golden-test-cases/state-codes.spec.golden
--- a/test/golden-test-cases/state-codes.spec.golden
+++ b/test/golden-test-cases/state-codes.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-shakespeare-devel
-BuildRequires:  ghc-shakespeare-prof
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-shakespeare-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -73,6 +75,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -80,6 +83,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -113,6 +117,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/stb-image-redux.spec.golden b/test/golden-test-cases/stb-image-redux.spec.golden
--- a/test/golden-test-cases/stb-image-redux.spec.golden
+++ b/test/golden-test-cases/stb-image-redux.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/stm-containers.spec.golden b/test/golden-test-cases/stm-containers.spec.golden
--- a/test/golden-test-cases/stm-containers.spec.golden
+++ b/test/golden-test-cases/stm-containers.spec.golden
@@ -31,19 +31,21 @@
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
 BuildRequires:  ghc-base-prelude-devel
-BuildRequires:  ghc-base-prelude-prof
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-focus-devel
-BuildRequires:  ghc-focus-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-list-t-devel
-BuildRequires:  ghc-list-t-prof
 BuildRequires:  ghc-primitive-devel
-BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-prelude-prof
+BuildRequires:  ghc-focus-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-list-t-prof
+BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HTF-devel
 BuildRequires:  ghc-HTF-prof
@@ -97,6 +99,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -104,6 +107,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -135,6 +139,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/streaming-commons.spec.golden b/test/golden-test-cases/streaming-commons.spec.golden
--- a/test/golden-test-cases/streaming-commons.spec.golden
+++ b/test/golden-test-cases/streaming-commons.spec.golden
@@ -30,34 +30,36 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-async-devel
-BuildRequires:  ghc-async-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-builder-devel
-BuildRequires:  ghc-blaze-builder-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-stm-devel
-BuildRequires:  ghc-stm-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unix-devel
-BuildRequires:  ghc-unix-prof
 BuildRequires:  ghc-zlib-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-async-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-builder-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-random-prof
+BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-unix-prof
 BuildRequires:  ghc-zlib-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -96,6 +98,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -103,6 +106,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -136,6 +140,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/strict-base-types.spec.golden b/test/golden-test-cases/strict-base-types.spec.golden
--- a/test/golden-test-cases/strict-base-types.spec.golden
+++ b/test/golden-test-cases/strict-base-types.spec.golden
@@ -29,24 +29,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bifunctors-devel
-BuildRequires:  ghc-bifunctors-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-lens-devel
-BuildRequires:  ghc-lens-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-strict-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bifunctors-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-lens-prof
 BuildRequires:  ghc-strict-prof
+%endif
 
 %description
 It is common knowledge that lazy datastructures can lead to space-leaks.
@@ -141,6 +143,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -148,6 +151,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -178,6 +182,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/strict-types.spec.golden b/test/golden-test-cases/strict-types.spec.golden
--- a/test/golden-test-cases/strict-types.spec.golden
+++ b/test/golden-test-cases/strict-types.spec.golden
@@ -29,24 +29,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+%endif
 
 %description
 A type class for types T where forall x :: T . rnf x = ⊥ <=> rwhnf x = ⊥.
@@ -76,6 +78,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -83,6 +86,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -113,6 +117,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/string-class.spec.golden b/test/golden-test-cases/string-class.spec.golden
--- a/test/golden-test-cases/string-class.spec.golden
+++ b/test/golden-test-cases/string-class.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 String class library.
@@ -66,6 +68,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -73,6 +76,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -103,6 +107,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/stripe-haskell.spec.golden b/test/golden-test-cases/stripe-haskell.spec.golden
--- a/test/golden-test-cases/stripe-haskell.spec.golden
+++ b/test/golden-test-cases/stripe-haskell.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-stripe-core-devel
-BuildRequires:  ghc-stripe-core-prof
 BuildRequires:  ghc-stripe-http-streams-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-stripe-core-prof
 BuildRequires:  ghc-stripe-http-streams-prof
+%endif
 
 %description
 For usage information please consult README.md.
@@ -64,6 +66,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -71,6 +74,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -101,6 +105,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/svg-tree.spec.golden b/test/golden-test-cases/svg-tree.spec.golden
--- a/test/golden-test-cases/svg-tree.spec.golden
+++ b/test/golden-test-cases/svg-tree.spec.golden
@@ -29,32 +29,34 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-JuicyPixels-devel
-BuildRequires:  ghc-JuicyPixels-prof
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-lens-devel
-BuildRequires:  ghc-lens-prof
 BuildRequires:  ghc-linear-devel
-BuildRequires:  ghc-linear-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
-BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-devel
-BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-xml-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-JuicyPixels-prof
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-lens-prof
+BuildRequires:  ghc-linear-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-scientific-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-xml-prof
+%endif
 
 %description
 Svg-tree provides types representing a SVG document, and allows to load and
@@ -90,6 +92,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -97,6 +100,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -124,6 +128,8 @@
 
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/swagger.spec.golden b/test/golden-test-cases/swagger.spec.golden
--- a/test/golden-test-cases/swagger.spec.golden
+++ b/test/golden-test-cases/swagger.spec.golden
@@ -30,18 +30,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-tasty-devel
 BuildRequires:  ghc-tasty-hunit-devel
@@ -78,6 +80,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -85,6 +88,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -116,6 +120,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/system-argv0.spec.golden b/test/golden-test-cases/system-argv0.spec.golden
--- a/test/golden-test-cases/system-argv0.spec.golden
+++ b/test/golden-test-cases/system-argv0.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-system-filepath-devel
-BuildRequires:  ghc-system-filepath-prof
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-system-filepath-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 Get 'argv[0]' as a FilePath. This is how the program was invoked, and might not
@@ -70,6 +72,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -77,6 +80,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license license.txt
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/system-fileio.spec.golden b/test/golden-test-cases/system-fileio.spec.golden
--- a/test/golden-test-cases/system-fileio.spec.golden
+++ b/test/golden-test-cases/system-fileio.spec.golden
@@ -30,18 +30,20 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-system-filepath-devel
-BuildRequires:  ghc-system-filepath-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unix-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-system-filepath-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-unix-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-chell-devel
 BuildRequires:  ghc-chell-prof
@@ -79,6 +81,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -86,6 +89,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -119,6 +123,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license license.txt
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/system-filepath.spec.golden b/test/golden-test-cases/system-filepath.spec.golden
--- a/test/golden-test-cases/system-filepath.spec.golden
+++ b/test/golden-test-cases/system-filepath.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -75,6 +77,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -82,6 +85,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -115,6 +119,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license license.txt
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/tagged.spec.golden b/test/golden-test-cases/tagged.spec.golden
--- a/test/golden-test-cases/tagged.spec.golden
+++ b/test/golden-test-cases/tagged.spec.golden
@@ -29,16 +29,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-compat-prof
+%endif
 
 %description
 Haskell 98 phantom types to avoid unsafely passing dummy arguments.
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/taggy.spec.golden b/test/golden-test-cases/taggy.spec.golden
--- a/test/golden-test-cases/taggy.spec.golden
+++ b/test/golden-test-cases/taggy.spec.golden
@@ -31,20 +31,22 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-html-devel
-BuildRequires:  ghc-blaze-html-prof
 BuildRequires:  ghc-blaze-markup-devel
-BuildRequires:  ghc-blaze-markup-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-html-prof
+BuildRequires:  ghc-blaze-markup-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-directory-prof
@@ -111,6 +113,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -118,6 +121,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -154,6 +158,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/tagstream-conduit.spec.golden b/test/golden-test-cases/tagstream-conduit.spec.golden
--- a/test/golden-test-cases/tagstream-conduit.spec.golden
+++ b/test/golden-test-cases/tagstream-conduit.spec.golden
@@ -30,30 +30,32 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-builder-devel
-BuildRequires:  ghc-blaze-builder-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-case-insensitive-devel
-BuildRequires:  ghc-case-insensitive-prof
 BuildRequires:  ghc-conduit-devel
 BuildRequires:  ghc-conduit-extra-devel
-BuildRequires:  ghc-conduit-extra-prof
-BuildRequires:  ghc-conduit-prof
 BuildRequires:  ghc-data-default-devel
-BuildRequires:  ghc-data-default-prof
 BuildRequires:  ghc-resourcet-devel
-BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-xml-conduit-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-builder-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-case-insensitive-prof
+BuildRequires:  ghc-conduit-prof
+BuildRequires:  ghc-conduit-extra-prof
+BuildRequires:  ghc-data-default-prof
+BuildRequires:  ghc-resourcet-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-xml-conduit-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -94,6 +96,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -101,6 +104,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -132,6 +136,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/tasty-hedgehog.spec.golden b/test/golden-test-cases/tasty-hedgehog.spec.golden
--- a/test/golden-test-cases/tasty-hedgehog.spec.golden
+++ b/test/golden-test-cases/tasty-hedgehog.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-hedgehog-devel
-BuildRequires:  ghc-hedgehog-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-tasty-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-hedgehog-prof
+BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-tasty-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-tasty-expected-failure-devel
 BuildRequires:  ghc-tasty-expected-failure-prof
@@ -71,6 +73,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -78,6 +81,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -111,6 +115,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/tasty-rerun.spec.golden b/test/golden-test-cases/tasty-rerun.spec.golden
--- a/test/golden-test-cases/tasty-rerun.spec.golden
+++ b/test/golden-test-cases/tasty-rerun.spec.golden
@@ -29,26 +29,28 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-optparse-applicative-devel
-BuildRequires:  ghc-optparse-applicative-prof
 BuildRequires:  ghc-reducers-devel
-BuildRequires:  ghc-reducers-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-split-devel
-BuildRequires:  ghc-split-prof
 BuildRequires:  ghc-stm-devel
-BuildRequires:  ghc-stm-prof
 BuildRequires:  ghc-tagged-devel
-BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-tasty-devel
-BuildRequires:  ghc-tasty-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-optparse-applicative-prof
+BuildRequires:  ghc-reducers-prof
+BuildRequires:  ghc-split-prof
+BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-tagged-prof
+BuildRequires:  ghc-tasty-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 This ingredient adds the ability to run tests by first filtering the test tree
@@ -119,6 +121,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -126,6 +129,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -156,6 +160,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/tce-conf.spec.golden b/test/golden-test-cases/tce-conf.spec.golden
--- a/test/golden-test-cases/tce-conf.spec.golden
+++ b/test/golden-test-cases/tce-conf.spec.golden
@@ -31,10 +31,12 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -71,6 +73,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -78,6 +81,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -114,6 +118,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/terminal-progress-bar.spec.golden b/test/golden-test-cases/terminal-progress-bar.spec.golden
--- a/test/golden-test-cases/terminal-progress-bar.spec.golden
+++ b/test/golden-test-cases/terminal-progress-bar.spec.golden
@@ -30,12 +30,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-stm-chans-devel
-BuildRequires:  ghc-stm-chans-prof
 BuildRequires:  ghc-stm-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-stm-chans-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -82,6 +84,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -89,6 +92,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -122,6 +126,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/test-fixture.spec.golden b/test/golden-test-cases/test-fixture.spec.golden
--- a/test/golden-test-cases/test-fixture.spec.golden
+++ b/test/golden-test-cases/test-fixture.spec.golden
@@ -30,22 +30,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-data-default-class-devel
-BuildRequires:  ghc-data-default-class-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-haskell-src-exts-devel
-BuildRequires:  ghc-haskell-src-exts-prof
 BuildRequires:  ghc-haskell-src-meta-devel
-BuildRequires:  ghc-haskell-src-meta-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-th-orphans-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-data-default-class-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-haskell-src-exts-prof
+BuildRequires:  ghc-haskell-src-meta-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-th-orphans-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-discover-devel
@@ -83,6 +85,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -90,6 +93,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -123,6 +127,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/texmath.spec.golden b/test/golden-test-cases/texmath.spec.golden
--- a/test/golden-test-cases/texmath.spec.golden
+++ b/test/golden-test-cases/texmath.spec.golden
@@ -30,20 +30,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-pandoc-types-devel
-BuildRequires:  ghc-pandoc-types-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-syb-devel
-BuildRequires:  ghc-syb-prof
 BuildRequires:  ghc-xml-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-pandoc-types-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-syb-prof
 BuildRequires:  ghc-xml-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-bytestring-prof
@@ -112,6 +114,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -119,6 +122,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -152,6 +156,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/text-icu.spec.golden b/test/golden-test-cases/text-icu.spec.golden
--- a/test/golden-test-cases/text-icu.spec.golden
+++ b/test/golden-test-cases/text-icu.spec.golden
@@ -30,15 +30,17 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  libicu-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-text-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -111,6 +113,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -118,6 +121,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -151,6 +155,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/text-postgresql.spec.golden b/test/golden-test-cases/text-postgresql.spec.golden
--- a/test/golden-test-cases/text-postgresql.spec.golden
+++ b/test/golden-test-cases/text-postgresql.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-dlist-devel
-BuildRequires:  ghc-dlist-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-dlist-prof
 BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-compat-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -74,6 +76,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -81,6 +84,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -112,6 +116,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/th-expand-syns.spec.golden b/test/golden-test-cases/th-expand-syns.spec.golden
--- a/test/golden-test-cases/th-expand-syns.spec.golden
+++ b/test/golden-test-cases/th-expand-syns.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-syb-devel
-BuildRequires:  ghc-syb-prof
 BuildRequires:  ghc-template-haskell-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-syb-prof
 BuildRequires:  ghc-template-haskell-prof
+%endif
 
 %description
 Expands type synonyms in Template Haskell ASTs.
@@ -67,6 +69,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -74,6 +77,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -107,6 +111,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/these.spec.golden b/test/golden-test-cases/these.spec.golden
--- a/test/golden-test-cases/these.spec.golden
+++ b/test/golden-test-cases/these.spec.golden
@@ -30,42 +30,44 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bifunctors-devel
-BuildRequires:  ghc-bifunctors-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-data-default-class-devel
-BuildRequires:  ghc-data-default-class-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-keys-devel
-BuildRequires:  ghc-keys-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-profunctors-devel
-BuildRequires:  ghc-profunctors-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroupoids-devel
-BuildRequires:  ghc-semigroupoids-prof
 BuildRequires:  ghc-transformers-compat-devel
-BuildRequires:  ghc-transformers-compat-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-devel
 BuildRequires:  ghc-vector-instances-devel
-BuildRequires:  ghc-vector-instances-prof
+%if %{with ghc_prof}
+BuildRequires:  ghc-QuickCheck-prof
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bifunctors-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-data-default-class-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-keys-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-profunctors-prof
+BuildRequires:  ghc-semigroupoids-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-transformers-compat-prof
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-vector-prof
+BuildRequires:  ghc-vector-instances-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-quickcheck-instances-devel
 BuildRequires:  ghc-quickcheck-instances-prof
@@ -113,6 +115,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -120,6 +123,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -153,6 +157,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/timezone-series.spec.golden b/test/golden-test-cases/timezone-series.spec.golden
--- a/test/golden-test-cases/timezone-series.spec.golden
+++ b/test/golden-test-cases/timezone-series.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-time-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-time-prof
+%endif
 
 %description
 This package endows Data.Time, from the time package, with several data types
@@ -68,6 +70,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -75,6 +78,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -105,6 +109,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/transformers-compat.spec.golden b/test/golden-test-cases/transformers-compat.spec.golden
--- a/test/golden-test-cases/transformers-compat.spec.golden
+++ b/test/golden-test-cases/transformers-compat.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-transformers-prof
+%endif
 
 %description
 This package includes backported versions of types that were added to
@@ -72,6 +74,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -79,6 +82,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -109,6 +113,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/transformers-lift.spec.golden b/test/golden-test-cases/transformers-lift.spec.golden
--- a/test/golden-test-cases/transformers-lift.spec.golden
+++ b/test/golden-test-cases/transformers-lift.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-writer-cps-transformers-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-writer-cps-transformers-prof
+%endif
 
 %description
 This simple and lightweight library provides type classes for lifting monad
@@ -65,6 +67,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -72,6 +75,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -100,6 +104,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/tree-fun.spec.golden b/test/golden-test-cases/tree-fun.spec.golden
--- a/test/golden-test-cases/tree-fun.spec.golden
+++ b/test/golden-test-cases/tree-fun.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-mtl-prof
+%endif
 
 %description
 Library for functions pertaining to tree exploration and manipulation.
@@ -64,6 +66,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -71,6 +74,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -101,6 +105,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/ttrie.spec.golden b/test/golden-test-cases/ttrie.spec.golden
--- a/test/golden-test-cases/ttrie.spec.golden
+++ b/test/golden-test-cases/ttrie.spec.golden
@@ -30,16 +30,18 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-atomic-primops-devel
-BuildRequires:  ghc-atomic-primops-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-primitive-devel
-BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-stm-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-atomic-primops-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-stm-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -87,6 +89,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -94,6 +97,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -127,6 +131,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/tuple-th.spec.golden b/test/golden-test-cases/tuple-th.spec.golden
--- a/test/golden-test-cases/tuple-th.spec.golden
+++ b/test/golden-test-cases/tuple-th.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-template-haskell-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-template-haskell-prof
+%endif
 
 %description
 Template Haskell functions for generating functions similar to those in
@@ -65,6 +67,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -72,6 +75,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -100,6 +104,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/tuples-homogenous-h98.spec.golden b/test/golden-test-cases/tuples-homogenous-h98.spec.golden
--- a/test/golden-test-cases/tuples-homogenous-h98.spec.golden
+++ b/test/golden-test-cases/tuples-homogenous-h98.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 Provides 'newtype' wrappers for n-ary homogenous tuples of types '(a,...,a)'
@@ -63,6 +65,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -70,6 +73,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -98,6 +102,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/turtle-options.spec.golden b/test/golden-test-cases/turtle-options.spec.golden
--- a/test/golden-test-cases/turtle-options.spec.golden
+++ b/test/golden-test-cases/turtle-options.spec.golden
@@ -31,16 +31,18 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-optional-args-devel
-BuildRequires:  ghc-optional-args-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-turtle-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-optional-args-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-turtle-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -74,6 +76,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -81,6 +84,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -116,6 +120,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/type-operators.spec.golden b/test/golden-test-cases/type-operators.spec.golden
--- a/test/golden-test-cases/type-operators.spec.golden
+++ b/test/golden-test-cases/type-operators.spec.golden
@@ -29,8 +29,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 
 %description
 A set of type-level operators meant to be helpful, e.g. ($) and a tightly
@@ -61,6 +63,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -68,6 +71,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -96,6 +100,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/type-spec.spec.golden b/test/golden-test-cases/type-spec.spec.golden
--- a/test/golden-test-cases/type-spec.spec.golden
+++ b/test/golden-test-cases/type-spec.spec.golden
@@ -30,10 +30,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-pretty-devel
-BuildRequires:  ghc-pretty-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-pretty-prof
+%endif
 
 %description
 Type Level Specification by Example.
@@ -63,6 +65,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -70,6 +73,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -103,6 +107,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/unicode-show.spec.golden b/test/golden-test-cases/unicode-show.spec.golden
--- a/test/golden-test-cases/unicode-show.spec.golden
+++ b/test/golden-test-cases/unicode-show.spec.golden
@@ -30,8 +30,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -81,6 +83,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -88,6 +91,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -119,6 +123,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/unique.spec.golden b/test/golden-test-cases/unique.spec.golden
--- a/test/golden-test-cases/unique.spec.golden
+++ b/test/golden-test-cases/unique.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-hashable-prof
+%endif
 
 %description
 Fully concurrent unique identifiers.
@@ -62,6 +64,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -69,6 +72,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -99,6 +103,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/unix-bytestring.spec.golden b/test/golden-test-cases/unix-bytestring.spec.golden
--- a/test/golden-test-cases/unix-bytestring.spec.golden
+++ b/test/golden-test-cases/unix-bytestring.spec.golden
@@ -29,10 +29,12 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+%endif
 
 %description
 Unix/Posix-specific functions for ByteStrings.
@@ -72,6 +74,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -79,6 +82,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -109,6 +113,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/unlit.spec.golden b/test/golden-test-cases/unlit.spec.golden
--- a/test/golden-test-cases/unlit.spec.golden
+++ b/test/golden-test-cases/unlit.spec.golden
@@ -30,12 +30,14 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-text-prof
+%endif
 
 %description
 Tool to convert literate code between styles or to code. Usage:
@@ -72,6 +74,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -79,6 +82,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -109,6 +113,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/utility-ht.spec.golden b/test/golden-test-cases/utility-ht.spec.golden
--- a/test/golden-test-cases/utility-ht.spec.golden
+++ b/test/golden-test-cases/utility-ht.spec.golden
@@ -30,8 +30,10 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -77,6 +79,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -84,6 +87,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -115,6 +119,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/validity-aeson.spec.golden b/test/golden-test-cases/validity-aeson.spec.golden
--- a/test/golden-test-cases/validity-aeson.spec.golden
+++ b/test/golden-test-cases/validity-aeson.spec.golden
@@ -29,20 +29,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-validity-devel
-BuildRequires:  ghc-validity-prof
 BuildRequires:  ghc-validity-scientific-devel
-BuildRequires:  ghc-validity-scientific-prof
 BuildRequires:  ghc-validity-text-devel
-BuildRequires:  ghc-validity-text-prof
 BuildRequires:  ghc-validity-unordered-containers-devel
-BuildRequires:  ghc-validity-unordered-containers-prof
 BuildRequires:  ghc-validity-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-validity-prof
+BuildRequires:  ghc-validity-scientific-prof
+BuildRequires:  ghc-validity-text-prof
+BuildRequires:  ghc-validity-unordered-containers-prof
 BuildRequires:  ghc-validity-vector-prof
+%endif
 
 %description
 Validity instances for aeson.
@@ -72,6 +74,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -79,6 +82,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -107,6 +111,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/validity-containers.spec.golden b/test/golden-test-cases/validity-containers.spec.golden
--- a/test/golden-test-cases/validity-containers.spec.golden
+++ b/test/golden-test-cases/validity-containers.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-validity-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-validity-prof
+%endif
 
 %description
 Validity instances for containers.
@@ -65,6 +67,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -72,6 +75,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -100,6 +104,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/vector-mmap.spec.golden b/test/golden-test-cases/vector-mmap.spec.golden
--- a/test/golden-test-cases/vector-mmap.spec.golden
+++ b/test/golden-test-cases/vector-mmap.spec.golden
@@ -30,14 +30,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-mmap-devel
-BuildRequires:  ghc-mmap-prof
 BuildRequires:  ghc-primitive-devel
-BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-mmap-prof
+BuildRequires:  ghc-primitive-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -73,6 +75,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -80,6 +83,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -111,6 +115,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/vivid-supercollider.spec.golden b/test/golden-test-cases/vivid-supercollider.spec.golden
--- a/test/golden-test-cases/vivid-supercollider.spec.golden
+++ b/test/golden-test-cases/vivid-supercollider.spec.golden
@@ -30,20 +30,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cereal-devel
-BuildRequires:  ghc-cereal-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-split-devel
-BuildRequires:  ghc-split-prof
 BuildRequires:  ghc-utf8-string-devel
-BuildRequires:  ghc-utf8-string-prof
 BuildRequires:  ghc-vivid-osc-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-cereal-prof
+BuildRequires:  ghc-split-prof
+BuildRequires:  ghc-utf8-string-prof
 BuildRequires:  ghc-vivid-osc-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -84,6 +86,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -91,6 +94,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -119,6 +123,8 @@
 
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/vty.spec.golden b/test/golden-test-cases/vty.spec.golden
--- a/test/golden-test-cases/vty.spec.golden
+++ b/test/golden-test-cases/vty.spec.golden
@@ -31,48 +31,50 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-builder-devel
-BuildRequires:  ghc-blaze-builder-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-microlens-devel
 BuildRequires:  ghc-microlens-mtl-devel
-BuildRequires:  ghc-microlens-mtl-prof
-BuildRequires:  ghc-microlens-prof
 BuildRequires:  ghc-microlens-th-devel
-BuildRequires:  ghc-microlens-th-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-parallel-devel
-BuildRequires:  ghc-parallel-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-stm-devel
-BuildRequires:  ghc-stm-prof
 BuildRequires:  ghc-terminfo-devel
-BuildRequires:  ghc-terminfo-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unix-devel
-BuildRequires:  ghc-unix-prof
 BuildRequires:  ghc-utf8-string-devel
-BuildRequires:  ghc-utf8-string-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-builder-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-microlens-prof
+BuildRequires:  ghc-microlens-mtl-prof
+BuildRequires:  ghc-microlens-th-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-parallel-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-terminfo-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-transformers-prof
+BuildRequires:  ghc-unix-prof
+BuildRequires:  ghc-utf8-string-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-Cabal-prof
@@ -139,6 +141,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -146,6 +149,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -182,6 +186,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/wai-cors.spec.golden b/test/golden-test-cases/wai-cors.spec.golden
--- a/test/golden-test-cases/wai-cors.spec.golden
+++ b/test/golden-test-cases/wai-cors.spec.golden
@@ -30,24 +30,26 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
-BuildRequires:  ghc-attoparsec-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base-unicode-symbols-devel
-BuildRequires:  ghc-base-unicode-symbols-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-case-insensitive-devel
-BuildRequires:  ghc-case-insensitive-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-wai-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base-unicode-symbols-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-case-insensitive-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-wai-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-directory-prof
@@ -103,6 +105,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -110,6 +113,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -151,6 +155,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/wai-middleware-auth.spec.golden b/test/golden-test-cases/wai-middleware-auth.spec.golden
--- a/test/golden-test-cases/wai-middleware-auth.spec.golden
+++ b/test/golden-test-cases/wai-middleware-auth.spec.golden
@@ -30,70 +30,72 @@
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base64-bytestring-devel
-BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-binary-devel
-BuildRequires:  ghc-binary-prof
 BuildRequires:  ghc-blaze-builder-devel
-BuildRequires:  ghc-blaze-builder-prof
 BuildRequires:  ghc-blaze-html-devel
-BuildRequires:  ghc-blaze-html-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-case-insensitive-devel
-BuildRequires:  ghc-case-insensitive-prof
 BuildRequires:  ghc-cereal-devel
-BuildRequires:  ghc-cereal-prof
 BuildRequires:  ghc-clientsession-devel
-BuildRequires:  ghc-clientsession-prof
 BuildRequires:  ghc-cookie-devel
-BuildRequires:  ghc-cookie-prof
 BuildRequires:  ghc-exceptions-devel
-BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-hoauth2-devel
-BuildRequires:  ghc-hoauth2-prof
 BuildRequires:  ghc-http-client-devel
-BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-http-client-tls-devel
-BuildRequires:  ghc-http-client-tls-prof
 BuildRequires:  ghc-http-conduit-devel
-BuildRequires:  ghc-http-conduit-prof
 BuildRequires:  ghc-http-reverse-proxy-devel
-BuildRequires:  ghc-http-reverse-proxy-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-optparse-simple-devel
-BuildRequires:  ghc-optparse-simple-prof
 BuildRequires:  ghc-regex-posix-devel
-BuildRequires:  ghc-regex-posix-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-safe-exceptions-devel
-BuildRequires:  ghc-safe-exceptions-prof
 BuildRequires:  ghc-shakespeare-devel
-BuildRequires:  ghc-shakespeare-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-unix-compat-devel
-BuildRequires:  ghc-unix-compat-prof
 BuildRequires:  ghc-unordered-containers-devel
-BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-uri-bytestring-devel
-BuildRequires:  ghc-uri-bytestring-prof
 BuildRequires:  ghc-vault-devel
-BuildRequires:  ghc-vault-prof
 BuildRequires:  ghc-wai-app-static-devel
-BuildRequires:  ghc-wai-app-static-prof
 BuildRequires:  ghc-wai-devel
 BuildRequires:  ghc-wai-extra-devel
-BuildRequires:  ghc-wai-extra-prof
-BuildRequires:  ghc-wai-prof
 BuildRequires:  ghc-warp-devel
-BuildRequires:  ghc-warp-prof
 BuildRequires:  ghc-yaml-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-base64-bytestring-prof
+BuildRequires:  ghc-binary-prof
+BuildRequires:  ghc-blaze-builder-prof
+BuildRequires:  ghc-blaze-html-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-case-insensitive-prof
+BuildRequires:  ghc-cereal-prof
+BuildRequires:  ghc-clientsession-prof
+BuildRequires:  ghc-cookie-prof
+BuildRequires:  ghc-exceptions-prof
+BuildRequires:  ghc-hoauth2-prof
+BuildRequires:  ghc-http-client-prof
+BuildRequires:  ghc-http-client-tls-prof
+BuildRequires:  ghc-http-conduit-prof
+BuildRequires:  ghc-http-reverse-proxy-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-regex-posix-prof
+BuildRequires:  ghc-safe-exceptions-prof
+BuildRequires:  ghc-shakespeare-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-unix-compat-prof
+BuildRequires:  ghc-unordered-containers-prof
+BuildRequires:  ghc-uri-bytestring-prof
+BuildRequires:  ghc-vault-prof
+BuildRequires:  ghc-wai-prof
+BuildRequires:  ghc-wai-app-static-prof
+BuildRequires:  ghc-wai-extra-prof
 BuildRequires:  ghc-yaml-prof
+BuildRequires:  ghc-optparse-simple-prof
+BuildRequires:  ghc-warp-prof
+%endif
 
 %description
 Authentication middleware that secures WAI application.
@@ -124,6 +126,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -131,6 +134,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -163,6 +167,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/wai-middleware-caching-redis.spec.golden b/test/golden-test-cases/wai-middleware-caching-redis.spec.golden
--- a/test/golden-test-cases/wai-middleware-caching-redis.spec.golden
+++ b/test/golden-test-cases/wai-middleware-caching-redis.spec.golden
@@ -30,22 +30,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-builder-devel
-BuildRequires:  ghc-blaze-builder-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-hedis-devel
-BuildRequires:  ghc-hedis-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-wai-devel
 BuildRequires:  ghc-wai-middleware-caching-devel
-BuildRequires:  ghc-wai-middleware-caching-prof
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-builder-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-hedis-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-wai-prof
+BuildRequires:  ghc-wai-middleware-caching-prof
+%endif
 
 %description
 Cache Wai Middleware using Redis backend.
@@ -76,6 +78,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -83,6 +86,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -114,6 +118,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/wai-middleware-prometheus.spec.golden b/test/golden-test-cases/wai-middleware-prometheus.spec.golden
--- a/test/golden-test-cases/wai-middleware-prometheus.spec.golden
+++ b/test/golden-test-cases/wai-middleware-prometheus.spec.golden
@@ -30,22 +30,24 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-clock-devel
-BuildRequires:  ghc-clock-prof
 BuildRequires:  ghc-data-default-devel
-BuildRequires:  ghc-data-default-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-prometheus-client-devel
-BuildRequires:  ghc-prometheus-client-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-wai-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-clock-prof
+BuildRequires:  ghc-data-default-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-prometheus-client-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-wai-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-doctest-devel
 BuildRequires:  ghc-doctest-prof
@@ -80,6 +82,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -87,6 +90,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -118,6 +122,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/warp.spec.golden b/test/golden-test-cases/warp.spec.golden
--- a/test/golden-test-cases/warp.spec.golden
+++ b/test/golden-test-cases/warp.spec.golden
@@ -30,54 +30,56 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-array-devel
-BuildRequires:  ghc-array-prof
 BuildRequires:  ghc-async-devel
-BuildRequires:  ghc-async-prof
 BuildRequires:  ghc-auto-update-devel
-BuildRequires:  ghc-auto-update-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-blaze-builder-devel
-BuildRequires:  ghc-blaze-builder-prof
 BuildRequires:  ghc-bytestring-builder-devel
-BuildRequires:  ghc-bytestring-builder-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-case-insensitive-devel
-BuildRequires:  ghc-case-insensitive-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-hashable-prof
 BuildRequires:  ghc-http-date-devel
-BuildRequires:  ghc-http-date-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-http2-devel
-BuildRequires:  ghc-http2-prof
 BuildRequires:  ghc-iproute-devel
-BuildRequires:  ghc-iproute-prof
 BuildRequires:  ghc-network-devel
-BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-simple-sendfile-devel
-BuildRequires:  ghc-simple-sendfile-prof
 BuildRequires:  ghc-stm-devel
-BuildRequires:  ghc-stm-prof
 BuildRequires:  ghc-streaming-commons-devel
-BuildRequires:  ghc-streaming-commons-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-unix-compat-devel
-BuildRequires:  ghc-unix-compat-prof
 BuildRequires:  ghc-unix-devel
-BuildRequires:  ghc-unix-prof
 BuildRequires:  ghc-vault-devel
-BuildRequires:  ghc-vault-prof
 BuildRequires:  ghc-wai-devel
-BuildRequires:  ghc-wai-prof
 BuildRequires:  ghc-word8-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-array-prof
+BuildRequires:  ghc-async-prof
+BuildRequires:  ghc-auto-update-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-blaze-builder-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-bytestring-builder-prof
+BuildRequires:  ghc-case-insensitive-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-hashable-prof
+BuildRequires:  ghc-http-date-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-http2-prof
+BuildRequires:  ghc-iproute-prof
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-simple-sendfile-prof
+BuildRequires:  ghc-stm-prof
+BuildRequires:  ghc-streaming-commons-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-unix-prof
+BuildRequires:  ghc-unix-compat-prof
+BuildRequires:  ghc-vault-prof
+BuildRequires:  ghc-wai-prof
 BuildRequires:  ghc-word8-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HTTP-devel
 BuildRequires:  ghc-HTTP-prof
@@ -133,6 +135,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -140,6 +143,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -173,6 +177,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/weigh.spec.golden b/test/golden-test-cases/weigh.spec.golden
--- a/test/golden-test-cases/weigh.spec.golden
+++ b/test/golden-test-cases/weigh.spec.golden
@@ -30,20 +30,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-split-devel
-BuildRequires:  ghc-split-prof
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-temporary-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-deepseq-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-split-prof
+BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-temporary-prof
+%endif
 
 %description
 Measure allocations of a Haskell functions/values.
@@ -73,6 +75,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -80,6 +83,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -113,6 +117,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/xml-hamlet.spec.golden b/test/golden-test-cases/xml-hamlet.spec.golden
--- a/test/golden-test-cases/xml-hamlet.spec.golden
+++ b/test/golden-test-cases/xml-hamlet.spec.golden
@@ -30,20 +30,22 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-parsec-devel
-BuildRequires:  ghc-parsec-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-shakespeare-devel
-BuildRequires:  ghc-shakespeare-prof
 BuildRequires:  ghc-template-haskell-devel
-BuildRequires:  ghc-template-haskell-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-xml-conduit-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-parsec-prof
+BuildRequires:  ghc-shakespeare-prof
+BuildRequires:  ghc-template-haskell-prof
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-xml-conduit-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-HUnit-prof
@@ -79,6 +81,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -86,6 +89,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -119,6 +123,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/xmonad-contrib.spec.golden b/test/golden-test-cases/xmonad-contrib.spec.golden
--- a/test/golden-test-cases/xmonad-contrib.spec.golden
+++ b/test/golden-test-cases/xmonad-contrib.spec.golden
@@ -29,38 +29,40 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-X11-devel
-BuildRequires:  ghc-X11-prof
 BuildRequires:  ghc-X11-xft-devel
-BuildRequires:  ghc-X11-xft-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-extensible-exceptions-devel
-BuildRequires:  ghc-extensible-exceptions-prof
 BuildRequires:  ghc-filepath-devel
-BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-old-locale-devel
-BuildRequires:  ghc-old-locale-prof
 BuildRequires:  ghc-old-time-devel
-BuildRequires:  ghc-old-time-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-random-devel
-BuildRequires:  ghc-random-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-unix-devel
-BuildRequires:  ghc-unix-prof
 BuildRequires:  ghc-utf8-string-devel
-BuildRequires:  ghc-utf8-string-prof
 BuildRequires:  ghc-xmonad-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-X11-prof
+BuildRequires:  ghc-X11-xft-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+BuildRequires:  ghc-containers-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-extensible-exceptions-prof
+BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-old-locale-prof
+BuildRequires:  ghc-old-time-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-random-prof
+BuildRequires:  ghc-unix-prof
+BuildRequires:  ghc-utf8-string-prof
 BuildRequires:  ghc-xmonad-prof
+%endif
 
 %description
 Third party tiling algorithms, configurations and scripts to xmonad, a tiling
@@ -101,6 +103,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -108,6 +111,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -138,6 +142,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/yahoo-finance-api.spec.golden b/test/golden-test-cases/yahoo-finance-api.spec.golden
--- a/test/golden-test-cases/yahoo-finance-api.spec.golden
+++ b/test/golden-test-cases/yahoo-finance-api.spec.golden
@@ -30,30 +30,32 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
-BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-either-devel
-BuildRequires:  ghc-either-prof
 BuildRequires:  ghc-http-api-data-devel
-BuildRequires:  ghc-http-api-data-prof
 BuildRequires:  ghc-http-client-devel
-BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-mtl-devel
-BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-servant-client-devel
-BuildRequires:  ghc-servant-client-prof
 BuildRequires:  ghc-servant-devel
-BuildRequires:  ghc-servant-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
-BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
-BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-aeson-prof
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-either-prof
+BuildRequires:  ghc-http-api-data-prof
+BuildRequires:  ghc-http-client-prof
+BuildRequires:  ghc-mtl-prof
+BuildRequires:  ghc-servant-prof
+BuildRequires:  ghc-servant-client-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-time-prof
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-vector-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-Glob-devel
 BuildRequires:  ghc-Glob-prof
@@ -99,6 +101,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -106,6 +109,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -139,6 +143,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/yesod-form-bootstrap4.spec.golden b/test/golden-test-cases/yesod-form-bootstrap4.spec.golden
--- a/test/golden-test-cases/yesod-form-bootstrap4.spec.golden
+++ b/test/golden-test-cases/yesod-form-bootstrap4.spec.golden
@@ -29,12 +29,14 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-classy-prelude-yesod-devel
-BuildRequires:  ghc-classy-prelude-yesod-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-yesod-form-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-classy-prelude-yesod-prof
 BuildRequires:  ghc-yesod-form-prof
+%endif
 
 %description
 RenderBootstrap4.
@@ -65,6 +67,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -72,6 +75,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -97,6 +101,8 @@
 
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/yesod-gitrepo.spec.golden b/test/golden-test-cases/yesod-gitrepo.spec.golden
--- a/test/golden-test-cases/yesod-gitrepo.spec.golden
+++ b/test/golden-test-cases/yesod-gitrepo.spec.golden
@@ -29,26 +29,28 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-directory-devel
-BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-enclosed-exceptions-devel
-BuildRequires:  ghc-enclosed-exceptions-prof
 BuildRequires:  ghc-http-types-devel
-BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-lifted-base-devel
-BuildRequires:  ghc-lifted-base-prof
 BuildRequires:  ghc-process-devel
-BuildRequires:  ghc-process-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-temporary-devel
-BuildRequires:  ghc-temporary-prof
 BuildRequires:  ghc-text-devel
-BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-wai-devel
-BuildRequires:  ghc-wai-prof
 BuildRequires:  ghc-yesod-core-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-enclosed-exceptions-prof
+BuildRequires:  ghc-http-types-prof
+BuildRequires:  ghc-lifted-base-prof
+BuildRequires:  ghc-process-prof
+BuildRequires:  ghc-temporary-prof
+BuildRequires:  ghc-text-prof
+BuildRequires:  ghc-wai-prof
 BuildRequires:  ghc-yesod-core-prof
+%endif
 
 %description
 Host content provided by a Git repo.
@@ -78,6 +80,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -85,6 +88,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -115,6 +119,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/yesod-recaptcha2.spec.golden b/test/golden-test-cases/yesod-recaptcha2.spec.golden
--- a/test/golden-test-cases/yesod-recaptcha2.spec.golden
+++ b/test/golden-test-cases/yesod-recaptcha2.spec.golden
@@ -29,14 +29,16 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-classy-prelude-yesod-devel
-BuildRequires:  ghc-classy-prelude-yesod-prof
 BuildRequires:  ghc-http-conduit-devel
-BuildRequires:  ghc-http-conduit-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-yesod-auth-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-classy-prelude-yesod-prof
+BuildRequires:  ghc-http-conduit-prof
 BuildRequires:  ghc-yesod-auth-prof
+%endif
 
 %description
 Recaptcha2 for yesod-form.
@@ -66,6 +68,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -73,6 +76,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -103,6 +107,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
diff --git a/test/golden-test-cases/zlib.spec.golden b/test/golden-test-cases/zlib.spec.golden
--- a/test/golden-test-cases/zlib.spec.golden
+++ b/test/golden-test-cases/zlib.spec.golden
@@ -30,11 +30,13 @@
 ExcludeArch:    %{ix86}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-devel
-BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  zlib-devel
+%if %{with ghc_prof}
+BuildRequires:  ghc-base-prof
+BuildRequires:  ghc-bytestring-prof
+%endif
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-QuickCheck-prof
@@ -82,6 +84,7 @@
 This package provides the Haskell %{pkg_name} library documentation.
 
 
+%if %{with ghc_prof}
 %package -n ghc-%{pkg_name}-prof
 Summary:        Haskell %{pkg_name} profiling library
 Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
@@ -89,6 +92,7 @@
 
 %description -n ghc-%{pkg_name}-prof
 This package provides the Haskell %{pkg_name} profiling library.
+%endif
 
 
 %prep
@@ -122,6 +126,8 @@
 %files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
 %license LICENSE
 
+%if %{with ghc_prof}
 %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+%endif
 
 %changelog
