All pastes #1938926 Raw Edit

ml|

public text v1 · immutable
#1938926 ·published 2010-09-12 16:32 UTC
rendered paste body
--------------------------------------------------------------------------------------------------------------------------------------------- notes for building/compiling ghc from binary & xmonad, xmonad-contrib & xmobar from source on debian --- for ghc you can use source, but using  binary packages will be faster than from source for building/compiling ---- version# = the lastest version# of file ---- if xmonad was installed from debian packages, you must/should purge before continuing --# aptitude-- purge all xmonad, ghc6 & haskell packages ----------- make sure you have the following installed before starting -# aptitude search package-name or # aptitude then '/' to search and  see if you have these packages installedbuild-essentialcheckinstalldarcslibedit2libffi5libgmp3-devlibgmpxx4ldbllibx11-devlibxft-devlibxinerama-dev---------- file locations ~/downloads/xmonad/ and ~/downloads/xmonad/darcs/ ---- download the lastest stable ghc binary [Generic i386 Linux. This is a complete build, including interactive system, profiling ---- libraries and documentation.] from:http://www.haskell.org/ghc/download.html- use darcs to download xmonad, xmonad-crontrib & xmobar, using darcs will get the bleeding edge of xmonad development -$ darcs get http://code.haskell.org/xmonad/$ darcs get http://code.haskell.org/XMonadContrib/ $ darcs get http://code.haskell.org/xmobar/- then download the lastest of the following --- action-permutations  http://hackage.haskell.org/cgi-bin/hackage-scripts/package/action-permutations-- mtl                  http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mtl-- parsec               http://hackage.haskell.org/cgi-bin/hackage-scripts/package/parsec-- stm                  http://hackage.haskell.org/cgi-bin/hackage-scripts/package/stm-- utf8-string-version  http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utf8-string-- X11-version          http://hackage.haskell.org/cgi-bin/hackage-scripts/package/X11-- X11-xft-version      http://hackage.haskell.org/cgi-bin/hackage-scripts/package/X11-xft-- these are mot needed if using darcs, listed here for completeness ---- xmobar          http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar-- xmonad          http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmonad or http://xmonad.org/download.html-- xmonad-contrib  http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmonad-contrib or                   http://xmonad.org/download.html-- after downloading what is needed, exit X and from tty/console and cd to where files where downloaded ------------ cp them to a tmp dir, untar downloaded version#'s, cd to dir for darcs version#'s --$ cp -a ~/downloads/xmonad/ ~/tmp/-- everything will be installed to /usr/local/bin/ and /usr/local/lib/, docs go to /usr/local/share/doc/ ---- runhaskell Setup.lhs should work in most cases if not try runhaskell Setup.hs or runhaskell Setup --- read the README files - $ runhaskell Setup.lhs --help  -- to show help text$ ./configure --help           -- gives a list of all configuration options available--------- GHC --- use checkinstall; make is listed for completeness and/or if checkinstall fails for some reason --- using checkinstall --- ghc-version# --$ cd ~/tmp/xmonad/$ tar xvfj ghc-version#.tar.bz2$ cd ghc-version#/$ ./configure --prefix=/usr/local$ make show-install-setup  -- show where files will get installed-- before installing any new version of ghc, MUST remove/purge the old version first --# checkinstall -D --install=no  -- does not install the resulting package.debcheckinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran  -- example of options used             This software is released under the GNU GPL.The package documentation directory ./doc-pak does not exist.Should I create a default set of package docs?  [y]: yesPlease write a description for the package.End your description with an empty line or EOF.>> GHC - The Glasgow Haskell Compilation System.>>********************************************* Debian package creation selected ********************************************This package will be built according to these values:0 -  Maintainer: [ root@i531 ]1 -  Summary: [ GHC - The Glasgow Haskell Compilation System. ]2 -  Name:    [ ghc ]3 -  Version: [ 6.12.1 ]4 -  Release: [ 1 ]5 -  License: [ GPL ]6 -  Group:   [ checkinstall ]7 -  Architecture: [ i386 ]8 -  Source location: [ ghc-6.12.1 ]9 -  Alternate source location: [  ]10 - Requires: [  ]11 - Provides: [ ghc ]Enter a number to change any of them or press ENTER to continue:10Enter the additional requirements:>> libedit2, libffi5, libgmp3-dev, libgmpxx4ldbl, libx11-dev, libxft-dev, libxinerama-devThis package will be built according to these values:0 -  Maintainer: [ root@i531 ]1 -  Summary: [ GHC - The Glasgow Haskell Compilation System. ]2 -  Name:    [ ghc ]3 -  Version: [ 6.12.1 ]4 -  Release: [ 1 ]5 -  License: [ GPL ]6 -  Group:   [ checkinstall ]7 -  Architecture: [ i386 ]8 -  Source location: [ ghc-6.12.1 ]9 -  Alternate source location: [  ]10 - Requires: [ libedit2, libffi5, libgmp3-dev, libgmpxx4ldbl, libx11-dev, libxft-dev, libxinerama-dev ]11 - Provides: [ ghc ]Enter a number to change any of them or press ENTER to continue:======================== Installation successful ==========================grep: /var/tmp/tmp.b8wzLYaYBi/newfile: No such file or directorySome of the files created by the installation are inside the builddirectory: $HOME/tmp/xmonad/ghc-6.12.1You probably don't want them to be included in the package,especially if they are inside your home directory.Do you want me to list them?  [n]: noShould I exclude them from the package? (Saying yes is a good idea)  [y]: yesCopying files to the temporary directory...OKStripping ELF binaries and libraries...OKCompressing man pages...OKBuilding file list...OKBuilding Debian package...NOTE: The package will not be installedErasing temporary files...OKWriting backup package...OKDeleting temp dir...OK********************************************************************** Done. The new package has been saved to /home/michel/tmp/xmonad/ghc-6.12.1/ghc_6.12.1-1_i386.deb You can install it in your system anytime using:      dpkg -i ghc_6.12.1-1_i386.deb**********************************************************************-- can also be done with gdebi, this way any missing dependencies are installed; need at least gdebi-core installed to use ---- after installing a mew version of ghc, must comfigure, build and install everythind below --# gdebi package.debor# checkinstall -D --install=yes  -- installs the resulting package.deb-- after doing # dpkg -i package.deb if the dependencies are not installed you will get an error so it will not install, ---- so either use gdebi or do this: but will be listed in aptitude, now start aptitude in ncurses aptitude and look at section, ---- 'Obsolete and Locally Created Packages' under the name 'haskell' select it & do '+' to select it then do g, review what will ---- happen[use '_' to remove anything you don't want to get installed and '+' to add, when statisfied on what will get installed ---- do g again, which should install all the missing dependencies and ghc ---- chown package.deb --# chown user:user package.deb-- move to ~/builds/ --# mv package.deb ~/builds/-------- - using make --- ghc-version# --$ tar xvfj ghc-version#.tar.bz2$ cd ghc-version#/$ ./configure --prefix=/usr/local$ make show-install-setup  -- show where files will get installed, then install:$ make# make install--------- XMONAD --- if redoing all or just one, first remove old stuff from /usr/local/share/; /usr/local/share/doc/; /usr/local/lib/ --- X11-version# -$ tar xvfz X11-version#.tar.gz$ cd X11-version#/$ runhaskell Setup.hs configure$ runhaskell Setup.hs build$ runhaskell Setup.hs haddock  -- generate haddock html docs in current dir under: dist/doc/# runhaskell Setup.hs install-- should not be needed when using ghc-6.12.1 or higher, ghc-6.12.1 or higher will do this when installing --# chown -R root:staff dist/doc/# mv dist/doc/* /usr/local/share/doc/X11-version#/  -- might need to create the directory first--------- utf8-string-version# -$ tar xvfz utf8-string-version#.tar.gz$ cd utf8-string-version#/$ runhaskell Setup.lhs configure$ runhaskell Setup.lhs build$ runhaskell Setup.lhs haddock  -- generate haddock html docs in current dir under: dist/doc/# runhaskell Setup.lhs install-- should not be needed when using ghc-6.12.1 or higher, ghc-6.12.1 or higher will do this when installing --# chown -R root:staff dist/doc/# mv dist/doc/* /usr/local/share/doc/utf8-string-version#/  -- might need to create the directory first--------- X11-xft-version# -$ tar xvfz X11-xft-version#.tar.gz$ cd X11-xft-version#/$ runhaskell Setup.lhs configure$ runhaskell Setup.lhs build$ runhaskell Setup.lhs haddock  -- generate haddock html docs in current dir under: dist/doc/# runhaskell Setup.lhs install-- should not be needed when using ghc-6.12.1 or higher, ghc-6.12.1 or higher will do this when installing --# chown -R root:staff dist/doc/# mv dist/doc/* /usr/local/share/doc/X11-xft-version#/  -- might need to create the directory first--------- action-permutations-version# -$ tar xvfz action-permutations-version#.tar.gz$ cd action-permutations-version#/$ runhaskell Setup.hs configure$ runhaskell Setup.hs build$ runhaskell Setup.hs haddock  -- generate haddock html docs in current dir under: dist/doc/# runhaskell Setup.hs install-- should not be needed when using ghc-6.12.1 or higher, ghc-6.12.1 or higher will do this when installing --# chown -R root:staff dist/doc/# mv dist/doc/* /usr/local/share/doc/X11-xft-version#/  -- might need to create the directory first--------- mtl-version# -$ tar xvfz mtl-version#.tar.gz$ cd mtl-version#/$ runhaskell Setup.hs configure$ runhaskell Setup.hs build$ runhaskell Setup.hs haddock  -- generate haddock html docs in current dir under: dist/doc/# runhaskell Setup.hs install-- should not be needed when using ghc-6.12.1 or higher, ghc-6.12.1 or higher will do this when installing --# chown -R root:staff dist/doc/# mv dist/doc/* /usr/local/share/doc/mtl-version#/  -- might need to create the directory first--------- parsec-version# -$ tar xvfz parsec-version#.tar.gz$ cd parsec-version#/$ runhaskell Setup.hs configure$ runhaskell Setup.hs build$ runhaskell Setup.hs haddock  -- generate haddock html docs in current dir under: dist/doc/# runhaskell Setup.hs install-- should not be needed when using ghc-6.12.1 or higher, ghc-6.12.1 or higher will do this when installing --# chown -R root:staff dist/doc/# mv dist/doc/* /usr/local/share/doc/parsec-version#/  -- might need to create the directory first--------- stm-version# -$ tar xvfz stm-version#.tar.gz$ cd stm-version#/$ runhaskell Setup.hs configure$ runhaskell Setup.hs build$ runhaskell Setup.hs haddock  -- generate haddock html docs in current dir under: dist/doc/# runhaskell Setup.hs install-- should not be needed when using ghc-6.12.1 or higher, ghc-6.12.1 or higher will do this when installing --# chown -R root:staff dist/doc/# mv dist/doc/* /usr/local/share/doc/stm-version#/  -- might need to create the directory first---------- for xmonad-version#, xmonad-contrib-version# and xmobar-version# if using darcs version# just cd to the darcs dir and then cd to the ---- appropriate sub dir and do a darcs pull; read below for more info, no need to extract the tarball --- xmonad-version# -$ tar xvfz xmonad-version#.tar.gz$ cd xmonad-version#/$ runhaskell Setup.lhs configure$ runhaskell Setup.lhs build$ runhaskell Setup.lhs haddock  -- generate haddock html docs in current dir under: dist/doc/# runhaskell Setup.lhs install-- should not be needed when using ghc-6.12.1 or higher, ghc-6.12.1 or higher will do this when installing --# chown -R root:staff dist/doc/# mv dist/doc/* /usr/local/share/doc/xmonad-version#/  -- might need to create the directory first--------- xmonad-contrib-version# -$ tar xvfz xmonad-contrib-version#.tar.gz$ cd xmonad-contrib-version#/$ runhaskell Setup.lhs configure$ runhaskell Setup.lhs build$ runhaskell Setup.lhs haddock  -- generate haddock html docs in current dir under: dist/doc/# runhaskell Setup.lhs install-- should not be needed when using ghc-6.12.1 or higher, ghc-6.12.1 or higher will do this when installing --# chown -R root:staff dist/doc/# mv dist/doc/* /usr/local/share/doc/xmonad-contrib-version#/  -- might need to create the directory first-- use ghc-pkg list to verify all the above was installed right; the list should match the versions installed  --$ ghc-pkg list--------- xmobar --- X11-xft-version# needs to be built and installed, before building xmobar with xft support, not listed here beacuse it has already ---- being done above, if just building xmobar by it self read up to build and install X11-xft first -- - xmobar-version# [build with xft support] -$ tar xvfz xmobar-version#-number.tar.gz$ cd xmobar-version#-number/$ runhaskell Setup.lhs configure --flags="with_xft"  -- enables both xft and UFT-8 support$ runhaskell Setup.lhs build# runhaskell Setup.lhs install-- rm all of the tmp dirs --# rm -r /home/user/tmp/xmonad--------$ cd-- might need to edit ~/.xmonad/xmonad.hs if new patches in xmonad-contrib affect your current ~/.xmonad/xmonad.hs look at the docs in ---- /usr/local/share/doc/xmonad-contrib-version#/ --$ xmonad --recompile  -- if you have a working xmonad.hs$ startx              -- check that everything is working correctly-- then mod-shift-q to shutdown xmonad ---- now reboot --# shutdown -r now or ^-Alt-Delete in a tty/comsole-- references --http://xmonad.org/intro.htmlhttp://www.haskell.org/haskellwiki/Xmonad/Frequently_asked_questionshttp://haskell.org/haskellwiki/GHChttp://www.haskell.org/haskellwiki/Cabal/How_to_install_a_Cabal_packagehttp://code.haskell.org/~arossato/xmobar/http://forums.debian.net/viewtopic.php?f=16&t=38976--------------------------------------------------------------------------------------------------------------------------------------------- using darcs to update xmonad, XMonadContrib, xmobar --- if new versions of X11-, X11-xft etc... need to be rebuild do that above first, then continue with new xmonad, xmonad-contrib, ---- xmobar below --- Example for xmonad similar for XMonadContrib and xmobar --- pulling in changes and rebuild, etc...---- --dry-run option don't actually take the action simulate, if statisfied with what will happen run without --dry-run ---- remember to change dir when doing a new $ darcs pull [$ cd .. $ cd XMonadContrib & $ cd .. $ cd xmobar --$ cp -a ~/downloads/xmonad/ ~/tmp/ $ cd downloads/xmonad/darcs/xmonad/$ darcs pull --dry-run http://code.haskell.org/xmonad/         -- for xmonad$ darcs pull --dry-run http://code.haskell.org/XMonadContrib/  -- for XMonadContrib$ darcs pull --dry-run http://code.haskell.org/xmobar/         -- for xmobar$ runhaskell Setup.lhs clean$ runhaskell Setup.lhs configure-- for xmobar use --$ runhaskell Setup.lhs configure --flags="with_xft"  -- enables both xft and UFT-8 support--------------------$ runhaskell Setup.lhs build $ runhaskell Setup.lhs haddock  -- generate haddock html docs in current dir under: dist/doc/ -- not needed for xmobar# runhaskell Setup.lhs install-- should not be needed when using ghc-6.12.1 or higher, ghc-6.12.1 or higher will do this when installing --# chown -R root:staff dist/doc/# mv dist/doc/* /usr/local/share/doc/xmonad-version#/  -- new docs$ runhaskell Setup.lhs clean    -- not needed if using a tmp dir-- remove any old stuff --# rm -r /usr/local/lib/xmonad-version#         -- remove any old libs, if rebuilding X11-, X11-xft, etc.. from above remove                                               -- those as well # rm -r /usr/local/share/xmonad-version#/      -- remove any old dir(s)# rm -r /usr/local/share/doc/xmonad-version#/  -- remove any old docs, if rebuilding X11-, X11-xft, etc.. from above remove                                               -- those as well-- now repeat as needed for xmonad-crontrib and xmobar[do not generate haddock html docs for xmobar] ---- remember to change dir when rebuilding [$ cd .. $ cd XMonadContrib & $ cd .. $ cd xmobar ---- might need to edit ~/.xmonad/xmonad.hs if new patches in XMonadContrib affect your current ~/.xmonad/xmonad.hs ---- look at the docs in /usr/local/share/doc/xmonad-contrib-version#/ --Now restart xmonad ($ xmonad --recompile, then hit mod-q) or (run $ touch ~/.xmonad/xmonad.hs, then hit mod-q).Note, if you are upgrading from a previous version of xmonad, you may need to first unregister the old packages with ghc. Type ghc-pkg listxmonad and ghc-pkg list xmonad-contrib at a prompt; if multiple versions are listed you need to unregister all but the newest. -- For example --[brent@xenophon:~/haskell/xmonad-dev-tut]$ ghc-pkg unregister xmonad-0.5Saving old package config file... done.Writing new package config file... done.[brent@xenophon:~/haskell/xmonad-dev-tut]$ ghc-pkg unregister xmonad-contrib-0.5Saving old package config file... done.Writing new package config file... done.-- refrence --http://www.haskell.org/haskellwiki/Xmonad/xmonad_development_tutorial--------------------------------------------------------------------------------------------------------------------------------------------- misc --- file locations after building and installing --/usr/local/bin//usr/local/lib//usr/local/share//usr/local/share/doc/-- for xinerama issues/setup take a look at this --http://www.haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#Multi_head_or_xinerama_troubles--------------------------------------------------------------------------------------------------------------------------------------------