From 631933b4112501abf3370e0842c5a16c123eef1f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: May 17 2011 09:19:12 +0000 Subject: add core and gnome subpackages; fix xterm commands; fix %doc file conflicts --- diff --git a/README.fedora b/README.fedora index 9c4e9c8..2cd7ce2 100644 --- a/README.fedora +++ b/README.fedora @@ -1,15 +1,24 @@ -= From GDM = -xmonad can be started from GDM, by selecting "xmonad" or "xmonad GNOME" -from the session menu. += Packaging = +xmonad in Fedora is provided by 3 packages: + +- xmonad-core: just the base window manager and X session files +- xmonad: additionally installs devel library files needed for configuration +- xmonad: additionally included a gnome session file and requires gnome-session and gnome-terminal + += Starting from GDM = +xmonad can be started from GDM by selecting "xmonad" in the session menu. + +For GNOME support please install xmonad-gnome +and select "xmonad GNOME" in GDM's session menu, which will run +"gnome-session --session=xmonad". = xmonad-start = By default at startup Fedora's xmonad-start displays -"man xmonad" in an xterm to help newcomers and to encourage -configuring xmonad by creating "~/.xmonad/xmonad.hs". +"man xmonad" in an xterm to help newcomers. To stop this behaviour, just create "~/.xmonad/". -== Simple Desktop configuration == +== Basic configuration for Desktop Environments == The default xmonad configuration does not work well with desktop environments. The following basic generic configuration requires ghc-xmonad-contrib-devel @@ -34,7 +43,7 @@ See: - http://haskell.org/haskellwiki/Xmonad/Basic_Desktop_Environment_Integration for more info on how to setup desktop support. -= How to configure = += Detailed configuration = For documentation and examples see: - xmonad man-page - /usr/share/doc/xmonad-$version/xmonad.hs (full default basic configuration) diff --git a/xmonad-start b/xmonad-start index a349b24..acd0367 100644 --- a/xmonad-start +++ b/xmonad-start @@ -1,9 +1,11 @@ #!/bin/sh +# if no user configuration if [ ! -d ~/.xmonad ]; then - # display the manpage if there is no user configuration - xterm -e man xmonad & - xterm -e less /usr/share/doc/xmonad*/README.fedora & + # display the manpage + xterm -e "man xmonad" & + # and the README + xterm -e "less /usr/share/doc/xmonad*/README.fedora" & # try to configure for a gnome session if [ "$DESKTOP_SESSION" = "xmonad-gnome" ]; then @@ -21,4 +23,8 @@ EOF fi fi +if [ -r ~/.xmonad/session ]; then + sh ~/.xmonad/session +fi + xmonad diff --git a/xmonad.spec b/xmonad.spec index a1ce67f..e1b510a 100644 --- a/xmonad.spec +++ b/xmonad.spec @@ -2,7 +2,7 @@ %global without_haddock 1 -%global common_summary A tiling window manager +%global common_summary xmonad tiling window manager %global common_description xmonad is a tiling window manager for X. Windows are arranged\ automatically to tile the screen without gaps or overlap, maximising\ @@ -16,7 +16,7 @@ on several screens. Name: %{pkg_name} Version: 0.9.2 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A tiling window manager Group: User Interface/X @@ -37,16 +37,43 @@ BuildRequires: ghc-rpm-macros BuildRequires: hscolour BuildRequires: desktop-file-utils BuildRequires: ghc-mtl-prof, ghc-X11-prof +Requires: %{pkg_name}-core = %{version}-%{release} +Requires: ghc-%{pkg_name}-devel = %{version}-%{release} +Requires: ghc-xmonad-contrib-devel + +%description +%{common_description} + +This is a meta-package that installs xmonad-core and ghc-xmonad-contrib-devel, +allowing xmonad to be configured with "~/.xmonad/xmonad.hs". + + +%package core +Summary: A tiling window manager # required until there is a command to open a system-default xterminal Requires: xterm # for xmessage Requires: xorg-x11-apps +# prevent doc file conflicts with ghc-xmonad +Requires: ghc-%{pkg_name} = %{version}-%{release} -%description -%{common_description} +%description core +This package contains the core xmonad window manager. + +If you want to configure xmonad please also install either xmonad or xmonad-gnome. + + +%package gnome +Summary: xmonad GNOME session +Requires: xmonad-core = %{version}-%{release} +Requires: ghc-xmonad-contrib-devel +Requires: gnome-session, gnome-terminal + +%description gnome +This package adds a "xmonad-gnome" X session configuration +so that xmonad can be started easily from GDM to run +in a GNOME session. -In order to configure and customize xmonad, ghc-xmonad-devel -and optionally ghc-xmonad-contrib-devel need to be installed. %prep %setup -q @@ -73,12 +100,21 @@ rm %{buildroot}%{_datadir}/%{name}-%{version}/man/xmonad.hs %files %defattr(-,root,root,-) + + +%files core +%defattr(-,root,root,-) %doc CONFIG LICENSE README man/%{name}.hs README.fedora %attr(755,root,root) %{_bindir}/%{name} %attr(755,root,root) %{_bindir}/%{name}-start %{_mandir}/man1/%{name}.1* %{_datadir}/applications/%{name}.desktop -%{_datadir}/xsessions/%{name}*.desktop +%{_datadir}/xsessions/%{name}.desktop + + +%files gnome +%defattr(-,root,root,-) +%{_datadir}/xsessions/%{name}-gnome.desktop %{_datadir}/gnome-session/sessions/%{name}.session @@ -86,6 +122,13 @@ rm %{buildroot}%{_datadir}/%{name}-%{version}/man/xmonad.hs %changelog +* Fri May 13 2011 Jens Petersen - 0.9.2-8 +- add a core subpackage and let the base package can pull in ghc-xmonad*-devel +- add a gnome subpackage for the gnome session +- more README.fedore improvements +- xmonad-start: quote the xterm commands and support ~/.xmonad/session +- fix doc files conflicts by having xmonad-core require ghc-xmonad + * Wed May 11 2011 Jens Petersen - 0.9.2-7 - xmonad-start no longer execs xmonad not to confuse gnome-session - xmonad-start now tries to setup a new xmonad.hs for GNOME desktop