To generate the Haskell OBS repositories for openSUSE Linux, perform the following steps:
-
Clone this repository with the
--recursive
flag or, alternatively, run$ git submodule update --init
in your checked-out copy.
-
Check out the devel:languages:haskell:lts:6 OBS repository and move it to
_build/lts-6
by running:$ osc co devel:languages:haskell:lts:6 $ mkdir -p _build $ mv devel:languages:haskell:lts:6 _build/lts-6
-
Check out the devel:languages:haskell:lts:next OBS repository and move it to
_build/nightly
by running:$ osc co devel:languages:haskell:lts:6 $ mkdir -p _build $ mv devel:languages:haskell:lts:next _build/nightly
-
Run
cabal update
. -
Run
make -j update
to download the latest package sets from Stackage. -
Run
make -j
to re-generate all spec files. The GNUmakefile included in this repository is just a thin wrapper to start the real build process, which is implemented using shake in the cabal2obs sub-project. You can always run$ runhaskell tools/cabal2obs/Main.hs -j$(nproc)
directly if you don't want to be bother with make, but using the make wrapper is usually more convenient.
Note that the initial run of the build system might take ~10 minutes on reasonably fast hardware. Shake displays an estimated run-time in the title of the X11 window in which the build was run. Once the initial build has succeeded, further re-runs will be very fast.
-
Inspect the
build/nightly
andbuild/lts-6
hierarchies withosc status
andosc diff
to make sure that all generated changes look reasonable. There should be no modifications in any of these projects:- build-compare
- ghc
- ghc-bootstrap
- ghc-rpm-macros
-
Commit:
$ osc ar $ osc ar * $ osc commit -m "update generated by cabal2obs"