-Summary: Very small and fast window manger for the X-Windows.
-Summary(pl): Bardzo ma³y i szybki menad¿er okien dla X-Windows.
-Name: blackbox
-Version: 0.40.7
-Release: 1
-URL: http://linux.wiw.org/blackbox/
-Copyright: GPL-2.0
-Group: X11/Window Managers
-Vendor: Brad Hughes <bhughes@arn.net>
-Source: http://linux.wiw.org/blackbox/sources/%{name}-%{version}.tar.bz2
-Buildroot: /tmp/%{name}-%{version}-root
+#
+# TODO: review/update patches
+#
+# Conditional build:
+%bcond_with epistrophy # enables using epistorophy key grabber
+#
+Summary: Very small and fast window manger for the X Window
+Summary(pl.UTF-8): Mały i szybki zarządca okien dla X Window
+Summary(de.UTF-8): Blackbox ist ein Windowmanager
+Name: blackbox
+Version: 0.70.1
+Release: 2
+License: BSD-like
+Group: X11/Window Managers
+Source0: http://dl.sourceforge.net/blackboxwm/%{name}-%{version}.tar.gz
+# Source0-md5: 2d173b95ca5e64ef478c6a5d2deee9df
+Source1: %{name}.desktop
+Source3: %{name}.1
+Source4: bsetroot.1
+Source5: %{name}-README.PLD
+Source6: %{name}-xsession.desktop
+Patch0: %{name}-am_fixes.patch
+Patch1: %{name}-pipe.patch
+Patch3: %{name}-epistrophy.patch
+Patch4: %{name}-etc_dir.patch
+Patch5: %{name}-nls-codesets.patch
+Patch6: %{name}-assert.patch
+Patch7: %{name}-assert.patch
+URL: http://blackboxwm.sourceforge.net/
+BuildRequires: autoconf
+BuildRequires: automake
+%{?with_epistrophy:Requires: epistrophy}
+BuildRequires: rpm >= 4.0.2-48
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXft-devel
+Obsoletes: fluxbox
+Conflicts: filesystem < 3.0-20
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _sysconfdir /etc/X11/%{name}
+%define _wmpropsdir /usr/share/gnome/wm-properties
+
+%define _gcc_ver %(%{__cc} -dumpversion | cut -b 1)
+%if %{_gcc_ver} == 2
+%define __cxx "%{__cc}"
+%endif
%description
-Blackbox is a window manager for the X/Windows environment.
-It suports many "nice" features:
-- Small code size (10352 lines in the 0.40.7).
-- Minimal resource usage. Memory, CPU horse power and the load on
- the X server's resources are minimal.
-- Fast interface with simple menus, multiple workspaces, and decorated windows
-- Built-in graphics code to render solids, gradients and bevels on the fly
- when needed.
-- Image dithering is possible for displays running at depths of 8,
- 15 and 16 bits per pixel.
-- Ability to run on displays with 8, 15, 16, 24 and 32 bits per pixel
-- Near complete support for all ICCCM specified operation policies.
+Blackbox is a window manager for the X Window environment, which is
+almost completely compliant with ICCCM specified operation policies.
+It features nice and fast interface with multiple workspaces and
+simple menus. Fast built-in graphics code that can render solids,
+gradients and bevels is used to draw window decorations. Remaining
+small in size, blackbox preserves memory and CPU.
+
+%description -l pl.UTF-8
+Blackbox jest zarządcą okien dla X Window spełniającym prawie
+wszystkie zalecenia ICCM. Jego zaletą jest estetyczny i szybki
+interfejs z wieloma pulpitami i prostym menu. Wbudowano weń także
+algorytm rysowania dekoracji okien, które mogą być jednokolorowe,
+gradientowe lub trójwymiarowe. Blackbox oszczędza pamięć i czas CPU.
-%description -l pl
-Blackbox to menad¿er okien dla ¶rodowiska X-Windows.
-Ma wiele ciekawych w³a¶ciwo¶ci:
-- Bardzo ma³y kod ¼ród³owy (10352 linii w wersji 0.40.7)
-- Minimalne zu¿ycie zasobów. Zajêto¶æ pamiêci, obci±¿enie procesora oraz
- zasobów X Serwera jest minimalne.
-- Szybki interfejs z prostym systemem menu, wieloma pulpitami i dekoracyjnymi
- oknami.
-- Wbudowany kod graficzny generuj±ce pe³nokolorowe, gradientowe i wyt³aczane
- elementy w czasie rzeczywistym.
-- Przeliczanie palety kolorów (image dithering) pomiêdzy 8, 15 i 16-bitowym
- kolorem.
-- Zdolno¶æ pracy z 8, 15, 16, 24 i 32-bitowym kolorem.
-- Bliska kompletnej zgodno¶æ z za³o¿eniami ICCCM.
+%description -l de.UTF-8
+Blackbox ist ein Windowmanager für offene Betriebssystem wie z.B.
+Linux oder freie BSD-Varianten. Er erfreut sich einer großen
+Fangemeinde, da er sehr ressourcenschonend und voll konfigurierbar
+ist.
%prep
%setup -q
+#%patch0 -p1
+#%patch1 -p1
+%{?with_epistrophy:%patch3 -p1}
+#%patch4 -p1
+#%patch5 -p1
+#%patch6 -p1
+%ifarch %{x8664}
+%patch7 -p0
+%endif
%build
-xmkmf -a
-make CXXDEBUGFLAGS=$RPM_OPT_FLAGS CDEBUGFLAGS=$RPM_OPT_FLAGS
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+rm -f missing
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+%configure
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-make DESTDIR=$RPM_BUILD_ROOT install
+install -d \
+ $RPM_BUILD_ROOT{%{_wmpropsdir},%{_mandir}/pl/man1,%{_sysconfdir}} \
+ $RPM_BUILD_ROOT%{_datadir}/xsessions
-%files
-%defattr(644, root, root, 755)
-%doc README Changelog
-%attr(755, root, root) /usr/X11R6/bin/blackbox
-/usr/X11R6/lib/X11/app-defaults/*
-- added -q in %setup,
-- added pl translation.
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
-%changelog
-* Fri Sep 25 1998 Maciej Lesniewski <nimir@kis.p.lodz.pl>
- [0.40.7-1]
-- added -q in %setup,
-- added pl translation.
+install %{SOURCE1} $RPM_BUILD_ROOT%{_wmpropsdir}
+install %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/pl/man1
+install %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/pl/man1
+cp %{SOURCE5} README.PLD
+install %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/xsessions/%{name}.desktop
-* Sun Aug 23 1998 Maciej Lesniewski <nimir@kis.p.lodz.pl>
- [0.40.4-1]
-- Removed old log enteries.
+%clean
+rm -rf $RPM_BUILD_ROOT
-* Thu Aug 13 1998 Maciej Lesniewski <nimir@kis.p.lodz.pl>
- [0.40.3-1]
-- New version
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS README* ChangeLog LICENSE TODO
+%attr(755,root,root) %{_bindir}/*
+%dir %{_sysconfdir}
+%dir %{_datadir}/blackbox
+%{_datadir}/blackbox/styles
+%{_datadir}/xsessions/%{name}.desktop
+%{_wmpropsdir}/blackbox.desktop
+%{_mandir}/man1/*
+%lang(pl) %{_mandir}/pl/man1/*
+%{_datadir}/blackbox/menu