Blob Blame History Raw
Name:           dwm
Version:        6.0
Release:        4%{?dist}
Summary:        Dynamic window manager for X

%global         _dwmsourcedir       %{_usrsrc}/dwm-user-%{version}-%{release}

Group:          User Interface/Desktops
License:        MIT
URL:            http://dwm.suckless.org/
Source0:        http://dl.suckless.org/dwm/%{name}-%{version}.tar.gz
# dwm-start script and its manpage
Source1:        dwm-start
Source2:        dwm-start.1
# Desktop files
Source3:        dwm.desktop
Source4:        dwm-user.desktop

BuildRequires:  libX11-devel, libXinerama-devel, libxcb-devel
Requires:       dmenu, xterm, terminus-fonts

# Default Fedora configuration for dwm
Patch1:         fedora-config.patch
# Install to /usr instead of /usr/local, respect opt. flags
Patch2:         dwm-5.9-config.patch
# Fedora config changes Mod1 to Mod4, adjust manpage
Patch3:         dwm-6.0-modmask.patch
# Fedora notes referring to dwm-user in dwm(1)
Patch4:         dwm-5.8.2-user-notes.patch

%description
dwm is a dynamic window manager for X. It manages windows in tiled, monocle and
floating layouts. All of the layouts can be applied dynamically, optimizing
the environment for the application in use and the task performed.

%package user
Summary:        Dynamic window manager sources and tools for user configuration
Group:          User Interface/Desktops
License:        MIT
Requires:       dwm = %{version}-%{release}
Requires:       gcc, make, libX11-devel, libXinerama-devel, libxcb-devel

%description user
dwm sources and dwm-start script for individual user configuration. dwm-start
reads user's header file and creates custom dwm build for user to use on
the fly.

%prep
%setup -q
%patch1 -p1 -b .fedora-config
%patch2 -p1 -b .config
%patch3 -p1 -b .modmask
%patch4 -p1 -b .usernotes

%build
make %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot}
install -m755 %{SOURCE1} %{buildroot}%{_bindir}/dwm-start
sed -i "s/version=VERSION/version=%{version}/" %{buildroot}%{_bindir}/dwm-start
sed -i "s/release=RELEASE/release=%{release}/" %{buildroot}%{_bindir}/dwm-start
install -m644 %{SOURCE2} %{buildroot}%{_mandir}/man1/dwm-start.1
sed -i "s/VERSION/%{version}/" %{buildroot}%{_mandir}/man1/dwm-start.1
sed -i "s/RELEASE/%{release}/" %{buildroot}%{_mandir}/man1/dwm-start.1
mkdir -p %{buildroot}%{_dwmsourcedir}
install -m644 config.mk %{buildroot}%{_dwmsourcedir}/config.mk
install -m644 config.def.h %{buildroot}%{_dwmsourcedir}/config.def.h
install -m644 dwm.c %{buildroot}%{_dwmsourcedir}/dwm.c
install -m644 dwm.1 %{buildroot}%{_dwmsourcedir}/dwm.1
install -m644 Makefile %{buildroot}%{_dwmsourcedir}/Makefile
mkdir -p %{buildroot}%{_datadir}/xsessions
install -m644 %{SOURCE3} %{buildroot}%{_datadir}/xsessions/dwm.desktop
install -m644 %{SOURCE4} %{buildroot}%{_datadir}/xsessions/dwm-user.desktop

%files
%doc LICENSE
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_datadir}/xsessions/dwm.desktop

%files user
%{_bindir}/%{name}-start
%{_mandir}/man1/%{name}-start.1*
%{_datadir}/xsessions/dwm-user.desktop
%{_dwmsourcedir}

%changelog
* Mon Jan 21 2013 Petr Šabata <contyk@redhat.com> - 6.0-4
- dwm-start: Copy the config file before applying patches (#902239)
- dwm-start: Don't overwrite the default dwm config file (#902239)
- dwm-start: Don't require a user config file for rebuilding
- dwm-start: Use $() instad of backticks

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Dec 21 2011 Petr Šabata <contyk@redhat.com> - 6.0-1
- 6.0 bump

* Mon Jul 11 2011 Petr Sabata <contyk@redhat.com> - 5.9-1
- 5.9 bump

* Mon Jun 27 2011 Petr Sabata <contyk@redhat.com> - 5.8.2-9
- Remove now obsolete defattr
- Move dwm-start(.1) substitutions to install section since we don't want to
  modify sources in place
- Change the prefix patch to generic config patch; we now respect Fedora
  RPM_OPT_FLAGS

* Mon Apr 04 2011 Petr Sabata <psabata@redhat.com> - 5.8.2-8
- Switch to Terminus (upstream default, anyway)

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.8.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Nov 26 2010 Petr Sabata <psabata@redhat.com> - 5.8.2-6
- dwm-start now supports user patches via ~/.dwm/patches directory
- dwm-start now supports -f option

* Thu Nov 18 2010 Petr Sabata <psabata@redhat.com> - 5.8.2-5
- dwm-start update, rhbz#654571

* Tue Oct 19 2010 Petr Sabata <psabata@redhat.com> - 5.8.2-4
- dwm(1) Fedora notes update

* Tue Oct 19 2010 Petr Sabata <psabata@redhat.com> - 5.8.2-3
- dwm-start(1) fix

* Mon Oct 18 2010 Petr Sabata <psabata@redhat.com> - 5.8.2-2
- Description spelling changed to US english
- Changed /usr/src to _usrsrc macro, dwmsourcedir changed to _dwmsourcedir
- Added BuildRequires for Xinerama and xcb
- Added dwm and dwm-users desktop files

* Wed Oct 15 2010 Petr Sabata <psabata@redhat.com> - 5.8.2-1
- New package