File fbset.spec of Package fbset

#
# spec file for package fbset (Version 2.1)
#
# Copyright (c) 2008 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:           fbset
BuildRequires:  bison flex
License:        GPL v2 or later
Group:          System/Console
PreReq:         %insserv_prereq %fillup_prereq
AutoReqProv:    on
Summary:        Framebuffer Configuration Tool
Version:        2.1
Release:        919
%define fbdump_version 0.4.1
Url:            http://users.telenet.be/geertu/Linux/fbdev/
Source0:        %name-%version.tar.bz2
Source1:        fb.modes.gz
Source2:        fbset.fillup
Source3:        rcfbset
Source4:        http://www.rcdrummond.net/fbdump/fbdump-src-%{fbdump_version}.tar.gz
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
zcat %{S:1} > etc/fb.modes
mv fbdump-%{fbdump_version} fbdump

%build
make CFLAGS="$RPM_OPT_FLAGS"
cd fbdump
CFLAGS="$RPM_OPT_FLAGS" \
LDFLAGS="" \
./configure --prefix=/usr
make AM_CFLAGS=
cd ..

%install
make install \
    DESTDIR=$RPM_BUILD_ROOT \
    MANDIR=%{_mandir} \
    SBINDIR=/sbin \
    CONFDIR=/etc
cd fbdump
make install DESTDIR=$RPM_BUILD_ROOT
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/sbin/rcfbset
# delete fb.modes from /etc/ everywhere except powerpc (bnc#304995)
%ifnarch ppc ppc64
rm -rf $RPM_BUILD_ROOT/etc/fb.modes
%endif

%files
%defattr(-,root,root)
%doc etc/fb.modes*
/sbin/*
/usr/bin/*
%_mandir/man*/*
%ifarch ppc ppc64
%config(noreplace) /etc/fb.modes
%endif
/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
* Tue Dec 02 2008 puzel@suse.cz
- amended last change :
  - on powerpc, leave /etc/fb.modes as is
  - on other architectures, move fb.modes to %%docdir
* Fri Nov 28 2008 puzel@suse.cz
- /etc/fb.modes removed from installation (bnc#304995)
* Thu Mar 29 2007 rguenther@suse.de
- add bison and flex BuildRequires
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 23 2006 olh@suse.de
- add fbdump for console screenshots
* Wed Oct 05 2005 dmueller@suse.de
- add norootforbuild
* Wed Jun 29 2005 meissner@suse.de
- use RPM_OPT_FLAGS.
* Fri Dec 17 2004 coolo@suse.de
- move binaries to /sbin to avoid waiting for network to set framebuffer
  (speeding up boot process)
* Mon Sep 01 2003 mcihar@suse.cz
- remove feedback@suse.de
* Thu Apr 24 2003 mcihar@suse.cz
- included modeline2fb tool
- includes sample fb.modes
- updated headers and code
- fixed makefile not to create devices
* Wed Feb 19 2003 pmladek@suse.cz
- improved the tests in init script [#23301]:
  * either $FB_MODULES or $FBSET_PARAMS must be defined to do something
  * the framebuffer device must be already working or $FB_MODULES must be
  defined when $FBSET_PARAMS is not empty
  * test $FBSET_BIN only when $FBSET_PARAMS is not empty
* Tue Dec 31 2002 pmladek@suse.cz
- added metadata to the sysconfig template [#22626]
* Fri Aug 16 2002 pmladek@suse.cz
- added %%insserv_prereq and %%fillup_prereq to PreReq [#17835]
* Tue Jan 08 2002 ro@suse.de
- remove file-conflict for fillup-template
* Sun Dec 23 2001 garloff@suse.de
- Add -y to fillup_and_insserv.
* Sun Dec 23 2001 garloff@suse.de
- Fix provides (bugzilla #12549)
- Convert to new sysconfig scheme (1st try)
* Thu May 10 2001 garloff@suse.de
- Simplify init script
* Sun May 06 2001 garloff@suse.de
- Add some more modes to fb.modes
- Provide startup script that allows to
  * load FB modules
  * use fbset to modify your console video mode
* Fri Mar 09 2001 olh@suse.de
- add 832x624 and 1600x1024
* Wed Nov 29 2000 vinil@suse.cz
- homepage updated
- spec file beautified
- source bzip2ed
* Thu May 25 2000 garloff@suse.de
- Use BuildRoot.
* Sat Feb 05 2000 garloff@suse.de
- move manpages to /usr/share/man.
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Mon Jul 26 1999 garloff@suse.de
- New fb.modes to fix 800x600-100 and include 768x576 modes.
* Tue Jul 20 1999 garloff@suse.de
- Initial check in.
- Tweaked Makefile install to set /dev/fb? root.video 0660
openSUSE Build Service is sponsored by