Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > by-pkgid > 793508ef3e21500452af0d6a2f7921bf > files > 11

pwm-1.0-12mdk.src.rpm

%define name		pwm
%define version		1.0
%define release		12mdk
%define x11bindir	%{_prefix}/X11R6/bin

Name:		%{name}
Summary:	A rather lightweight window manager for the X Window System.
Version:	%{version}
Release:	%{release}
License:	Artistic
URL:		http://www.students.tut.fi/~tuomov/pwm/
Source:		%{name}-%{version}.tar.bz2
Source1:	%{name}-moreThemes.tar.bz2
Source2:	%{name}-start%{name}.bz2
Source3:	%{name}-16.png.bz2
Source4:	%{name}-32.png.bz2
Source5:	%{name}-48.png.bz2
Source6:	%{name}-menu-method.bz2
Source7:	%{name}-menu-entry.bz2
Patch:		%{name}-%{version}-makefile-patch.bz2
Patch1:		%{name}-menus-patch.bz2
Group:		Graphical desktop/Other
BuildRoot:	%{_tmppath}/%{name}-%version-%release-root
Prefix:		%{_prefix}
BuildRequires:  XFree86-devel
Provides:	windowmanager

%description
PWM is a rather lightweight window manager for X11. It has the unique
feature that multiple client windows can be attached to the same frame.
This feature helps to keep windows organized.

PWM have workspaces, menus and Window Maker dockapp support. It has
pretty good keyboard possibilities and almost all the functionality
is configurable.

%prep
rm -rf %{buildroot}
%setup -a 1
%patch -p0
%patch1 -p0

%build
%make

%install
%makeinstall

mkdir -p %{buildroot}%{_menudir}
mkdir -p %{buildroot}%{_sysconfdir}/menu-methods
cat << EOF > %{buildroot}%{_menudir}/%{name}
?package(pwm): \
  needs=wm \
  section=Session/Windowmanagers \
  title=PWM \
  longtitle="PWM - a window manager with frames" \
  icon=pwm.png \
  command=%{x11bindir}/pwm
EOF
bzcat %{SOURCE6} > %{buildroot}%{_sysconfdir}/menu-methods/%{name}

# three icons
mkdir -p %{buildroot}%{_miconsdir}
mkdir -p %{buildroot}%{_iconsdir}
mkdir -p %{buildroot}%{_liconsdir}
bzcat %{SOURCE3} > %{buildroot}%{_miconsdir}/%{name}.png
bzcat %{SOURCE4} > %{buildroot}%{_iconsdir}/%{name}.png
bzcat %{SOURCE5} > %{buildroot}%{_liconsdir}/%{name}.png

# "PWM" menu entry itself
bzcat %{SOURCE7} > %{buildroot}/%{_menudir}/%{name}

# a session manager entry
mkdir -p %{buildroot}%{_sysconfdir}/X11/wmsession.d
cat << EOF > %{buildroot}%{_sysconfdir}/X11/wmsession.d/15PWM
NAME=PWM
ICON=pwm.png
DESC=PWM, a lightweight window manager with frames.
EXEC=%{x11bindir}/startpwm
SCRIPT:
exec %{x11bindir}/startpwm
EOF
bzcat %{SOURCE2} > %{buildroot}/%{x11bindir}/start%{name}

# We create an empty Mandrake menu file to make RPM happy
touch %{buildroot}%{_sysconfdir}/X11/%{name}/pwm-mdk-menu.conf

%{find_lang} %{name}

%post
%{update_menus}
%{make_session}

%postun
%{clean_menus}
%{make_session}

%clean
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%{x11bindir}/pwm
%attr(755,root,root) %{x11bindir}/startpwm
%{_libdir}/menu/%{name}
%config(noreplace)%{_sysconfdir}/X11/pwm/buttons-default.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/keys-default.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/look-beoslike.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/look-brownsteel.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/look-akike.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/look-clean.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/look-ioaone.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/look-jarkko.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/look-metall.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/look-rami.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/look-reid.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/look-sky2style.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/look-skyphstyle.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/menus-default.conf
%config(noreplace)%{_sysconfdir}/X11/pwm/pwm.conf
%{_iconsdir}/pwm.png
%{_liconsdir}/pwm.png
%{_miconsdir}/pwm.png
%{_mandir}/man1/pwm.1*
%{_defaultdocdir}/pwm/LICENSE
%{_defaultdocdir}/pwm/config.txt
%config(noreplace) %{_sysconfdir}/X11/wmsession.d/15PWM
%config(noreplace) %attr(755,root,root) %{_sysconfdir}/menu-methods/%{name}
%dir %{_sysconfdir}/X11/%{name}
%ghost %{_sysconfdir}/X11/%{name}/pwm-mdk-menu.conf
%config(noreplace) %{_sysconfdir}/X11/%name/sample.conf

%changelog
* Mon Feb 23 2004 Lenny Cartier <lenny@mandrakesoft.com> 1.0-12mdk
- rebuild

* Wed Jan 29 2003 Lenny Cartier <lenny@mandrakesoft.com> 1.0-11mdk
- rebuild

* Wed Sep 25 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.0-10mdk
- fix menu method (han)

* Mon Feb 25 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.0-9mdk
- fixes from Grégoire Colbert <gregus@linux-mandrake.com> :
	- Changed background color in "startpwm" to suit 8.1

* Mon Sep 10 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.0-8mdk

- added by Grégoire Colbert <gregus@linux-mandrake.com> :
- Specfile rewritten using sawfish.spec as an example
- Created several small patches instead of one big for ease of maintenance
- Created three icons
- Menu now uses i18n strings
- Menu can now launch command-line tools using an Xterm
- Added a PWM entry to "Session/Windowmanagers" submenu
- Fixed the "category with same name" menu bug ("Other")
- "Mandrake" is now the "root" menu
- I'm happy!

* Thu Aug 16 2001 Grégoire Colbert <gregus@linux-mandrake.com> 1.0-7mdk
- Changed Licence field to Artistic
- Corrected a minor bug in /etc/menu-methods/pwm

* Mon Aug 13 2001 Grégoire Colbert <gregus@linux-mandrake.com> 1.0-6mdk
- Added a workaround to avoid a warning during uninstall

* Mon Aug 13 2001 Grégoire Colbert <gregus@linux-mandrake.com> 1.0-5mdk
- Automatic menu generation (not perfect: root_menu is not "Mandrake")
- PWM now appears automatically in KDM sessions list
- Spec file clean up

* Thu Aug 09 2001 Grégoire Colbert <gregus@linux-mandrake.com> 1.0-3mdk
- Initial release
- Mandrake adaptations (hopefully good!)