fvwm2/fvwm2.spec

199 lines
6.8 KiB
RPMSpec

#
# spec file for package fvwm2 (Version 2.5.26)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: fvwm2
BuildRequires: freetype2-devel fribidi-devel gcc-c++ libpng-devel libstroke-devel pkgconfig readline-devel update-desktop-files xorg-x11-devel
License: GPLv2+
Group: System/GUI/Other
Provides: fvwm fvwmicns windowmanager xpmroot
Obsoletes: fvwm xpmroot
AutoReqProv: on
Version: 2.5.26
Release: 42
Summary: Improved Version of FVWM Window Manager
Url: http://www.fvwm.org
Source0: fvwm-%{version}.tar.bz2
Source1: fvwm_icons.tar.bz2
Source3: %name.desktop
Source4: system.fvwm2rc
Source5: _system.fvwm2rc
Source6: openSuSE.xpm
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: xdg-menu, desktop-data, mktemp, xli
Patch0: fvwm-configure.patch
Patch1: fvwm-%{version}-gcc-warnings.patch
Patch2: fvwm-%{version}-ia64.patch
Patch3: fvwm-%{version}-sv_SE.patch
Patch4: fvwm-%{version}-utf_encoding.patch
Patch5: fvwm-%{version}-charset_in_title.patch
%description
FVWM is a virtual desktop window manager for the X Window System.
FVWM is intended to have a small memory footprint but a rich feature
set, to be extremely customizable and extendible, and to be very
compatible with the Motif MWM.
Authors:
--------
The fvwm developers <fvwm-workers@fvwm.org>
%if "%(xft-config --prefix)" == "/usr"
%define _xorg7libs %_lib
%define _xorg7bin bin
%define _xorg7libs32 lib
%define _xorg7libshare share
%define _xorg7prefix /usr
%define _xorg7mandir %_mandir
%else
%define _xorg7libs X11R6/%_lib
%define _xorg7bin X11R6/bin
%define _xorg7libshare X11R6/lib
%define _xorg7libs32 X11R6/lib
%define _xorg7prefix /usr/X11R6
%define _xorg7mandir /usr/X11R6/man
%endif
%prep
%setup -q -n fvwm-%{version}
%patch0
%patch1
%patch2
%patch3
%patch5
find . -name *sv_SE* |xargs rename sv_SE sv
mkdir icons
tar -C icons -j -x -v -f $RPM_SOURCE_DIR/fvwm_icons.tar.bz2
cp %{S:6} icons
#
# build
%build
%{?suse_update_config:%{suse_update_config -f}}
autoreconf -fi
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
LDFLAGS="-L/usr/%_lib" \
./configure \
--prefix=%{_xorg7prefix} \
--bindir=%{_prefix}/%{_xorg7bin} \
--sysconfdir=/etc/X11/fvwm2 \
--libexecdir=%{_xorg7prefix}/lib/X11/fvwm2 \
--mandir=%{_xorg7mandir} \
--x-includes=%{_xorg7prefix}/include \
--x-libraries=%{_xorg7prefix}/%_lib \
--with-imagepath=%{_prefix}/%{_xorg7libshare}/X11/fvwm2/pixmaps:%{_prefix}/%{_xorg7libshare}/X11/fvwm2/bitmaps:/usr/share/wallpapers \
--disable-gtk
make %{?jobs:-j%jobs}
%install
make DESTDIR=$RPM_BUILD_ROOT install
#make prefix=$RPM_BUILD_ROOT%{_xorg7prefix} \
# sysconfdir=$RPM_BUILD_ROOT/etc/X11/fvwm2 \
# install
#
# default config
install -d -m 755 $RPM_BUILD_ROOT/etc/X11/fvwm2
%if "%(xft-config --prefix)" == "/usr"
install -m 644 %SOURCE4 $RPM_BUILD_ROOT/etc/X11/fvwm2/system.fvwm2rc
%else
install -m 644 %SOURCE5 $RPM_BUILD_ROOT/etc/X11/fvwm2/system.fvwm2rc
%endif
#
# some extra utils
install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/%{_xorg7libshare}/X11/fvwm2/utils
install utils/quantize_pixmaps $RPM_BUILD_ROOT%{_prefix}/%{_xorg7libshare}/X11/fvwm2/utils
#
# documentation for modules
rm sample.fvwmrc/Makefile* sample.fvwmrc/system.fvwm2rc-sample-95
rm docs/Makefile*
install -d -m 755 docu-module
for i in `find -name "README*" ! -name "*,v" ! -name "*.orig"`
do
TMPDIR=`dirname ${i#./}`
if [ "x$TMPDIR" = "x." ]; then
install -m 644 $i docu-module/${i#./}
else
install -m 644 $i docu-module/README.`basename "$TMPDIR"`
fi
done
#
# icons
install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/%{_xorg7libshare}/X11/fvwm2/pixmaps
install -m 644 icons/* $RPM_BUILD_ROOT%{_prefix}/%{_xorg7libshare}/X11/fvwm2/pixmaps
#
# install kdm/gdm entry
install -m 0755 -d $RPM_BUILD_ROOT/usr/share/xsessions/
install -m 0644 %SOURCE3 $RPM_BUILD_ROOT/usr/share/xsessions/
# removing the useless README.vms file
rm -f $RPM_BUILD_ROOT/%{_prefix}/share/doc/packages/fvwm2/README.vms
%suse_update_desktop_file $RPM_BUILD_ROOT/usr/share/xsessions/%name.desktop
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS docs sample.fvwmrc docu-module/*
%dir /etc/X11/fvwm2
%config /etc/X11/fvwm2/system.fvwm2rc
%{_prefix}/%{_xorg7bin}/*
%{_prefix}/%{_xorg7libs32}/X11/fvwm2/*
%{_prefix}/%{_xorg7libshare}/X11/fvwm2/pixmaps/*
#%{_xorg7prefix}/share/locale/*/*/*
# the find_lang macro is not very usable for fwvm,
# listing the files manually
%lang(ar) %{_xorg7prefix}/share/locale/ar/LC_MESSAGES/fvwm.mo
%lang(de) %{_xorg7prefix}/share/locale/de/LC_MESSAGES/fvwm.mo
%lang(fr) %{_xorg7prefix}/share/locale/fr/LC_MESSAGES/fvwm.mo
%lang(sv) %{_xorg7prefix}/share/locale/sv/LC_MESSAGES/fvwm.mo
%lang(zh) %{_xorg7prefix}/share/locale/zh_CN/LC_MESSAGES/fvwm.mo
%lang(ar) %{_xorg7prefix}/share/locale/ar/LC_MESSAGES/FvwmScript.mo
%lang(ar) %{_xorg7prefix}/share/locale/ar/LC_MESSAGES/FvwmTaskBar.mo
%lang(de) %{_xorg7prefix}/share/locale/de/LC_MESSAGES/FvwmScript.mo
%lang(de) %{_xorg7prefix}/share/locale/de/LC_MESSAGES/FvwmTaskBar.mo
%lang(fr) %{_xorg7prefix}/share/locale/fr/LC_MESSAGES/FvwmScript.mo
%lang(fr) %{_xorg7prefix}/share/locale/fr/LC_MESSAGES/FvwmTaskBar.mo
%lang(sv) %{_xorg7prefix}/share/locale/sv/LC_MESSAGES/FvwmScript.mo
%lang(sv) %{_xorg7prefix}/share/locale/sv/LC_MESSAGES/FvwmTaskBar.mo
%lang(zh) %{_xorg7prefix}/share/locale/zh_CN/LC_MESSAGES/FvwmScript.mo
%lang(zh) %{_xorg7prefix}/share/locale/zh_CN/LC_MESSAGES/FvwmTaskBar.mo
%{_prefix}/%{_xorg7libshare}/X11/fvwm2/utils/quantize_pixmaps
%dir %{_xorg7prefix}/lib/X11/fvwm2
%{_xorg7prefix}/share/fvwm
%dir %{_prefix}/%{_xorg7libshare}/X11/fvwm2
%dir %{_prefix}/%{_xorg7libshare}/X11/fvwm2/pixmaps
%dir %{_prefix}/%{_xorg7libshare}/X11/fvwm2/utils
%{_xorg7mandir}/man1/*
%{_datadir}/xsessions/*desktop
%if "%(xft-config --prefix)" == "/usr/X11R6"
%dir %{_xorg7prefix}/share/locale/ar
%dir %{_xorg7prefix}/share/locale/ar/LC_MESSAGES
%dir %{_xorg7prefix}/share/locale/de
%dir %{_xorg7prefix}/share/locale/de/LC_MESSAGES
%dir %{_xorg7prefix}/share/locale/fr
%dir %{_xorg7prefix}/share/locale/fr/LC_MESSAGES
%dir %{_xorg7prefix}/share/locale/zh_CN
%dir %{_xorg7prefix}/share/locale/zh_CN/LC_MESSAGES
%endif
%changelog