File fbset.spec of Package fbset

#
# spec file for package fbset
#
# Copyright (c) 2012 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/
#


Name:           fbset
BuildRequires:  bison
BuildRequires:  flex
PreReq:         %insserv_prereq %fillup_prereq
Summary:        Framebuffer Configuration Tool
License:        GPL-2.0+
Group:          System/Console
Version:        2.1
Release:        0
%define fbdump_version 0.4.1
Url:            http://users.telenet.be/geertu/Linux/fbdev/
Source0:        %name-%version.tar.bz2
Source1:        fb.modes.bz2
Source2:        fbset.fillup
Source3:        rcfbset
Source4:        http://www.rcdrummond.net/fbdump/fbdump-src-%{fbdump_version}.tar.bz2
Patch0:         %name-%version-makefile.patch
Patch1:         %name-%version-update.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
FBSet can query and change console framebuffer settings.

Some framebuffers do not support this, such as the VESA framebuffer
"vesafb".



Authors:
--------
    Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be>

%prep
%setup -q -a 4
%patch0
%patch1
bzcat %{S:1} > etc/fb.modes
mv fbdump-%{fbdump_version} fbdump

%build
make CFLAGS="$RPM_OPT_FLAGS" CC="%{__cc}"
cd fbdump
%configure --prefix=/usr
make AM_CFLAGS=
cd ..

%install
%make_install \
    MANDIR=%{_mandir} \
    SBINDIR=%{_sbindir} \
    CONFDIR=%{_sysconfdir}
cd fbdump
%make_install
cd ..
install -m 755 -d $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 %{S:2} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.console-fbset
install -m 755 -d $RPM_BUILD_ROOT/etc/init.d
install -m 755 %{S:3} $RPM_BUILD_ROOT/etc/init.d/fbset
ln -sf /etc/init.d/fbset $RPM_BUILD_ROOT/%{_sbindir}/rcfbset
#UsrMerge
mkdir $RPM_BUILD_ROOT/sbin
ln -sf /etc/init.d/fbset $RPM_BUILD_ROOT/sbin/rcfbset
ln -sf %{_sbindir}/fbset $RPM_BUILD_ROOT/sbin
ln -sf %{_sbindir}/modeline2fb $RPM_BUILD_ROOT/sbin
#EndUsrMerge

%files
%defattr(-,root,root)
%doc etc/fb.modes*
#UsrMerge
/sbin/*
#EndUsrMerge
 %{_sbindir}/*
/usr/bin/*
%_mandir/man*/*
%config(noreplace) /etc/fb.modes
/var/adm/fillup-templates/sysconfig.console-fbset
%config /etc/init.d/fbset

%clean
rm -rf $RPM_BUILD_ROOT

%post
%{fillup_and_insserv -y fbset}
%{fillup_only -an console}

%postun
%{insserv_cleanup}

%changelog
openSUSE Build Service is sponsored by