File via-chrome9-kmp.spec of Package via-chrome9-kmp

Name:           via-chrome9-kmp
# List of additional build dependencies
#BuildRequires:  gcc-c++ libxml2-devel
BuildRequires: kernel-source kernel-default kernel-default-base kernel-default-extra
Version:        0
Release:        1
License:        Freeware
Source0:        drm-via_chrome9-2.6.27-85a-44411-src.tar.gz
Source1:        xorg.conf.hp-2133-mini-note
Patch:          drm-via_chrome9-kmp-Makefile.patch
Group:          System/Kernel
Summary:        VIA Chrome9 graphic kernel module package

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Kernel modules for VIA Chrome9 from VIA Linux Portal.

This driver provides support for the Direct Rendering Infrastructure
(DRI) in XFree86 4.1.0 and higher.

/*
 * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
 * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved.
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sub license,
 * and/or sell copies of the Software, and to permit persons to
 * whom the Software is furnished to do so, subject to the
 * following conditions:
 *
 * The above copyright notice and this permission notice
 * (including the next paragraph) shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NON-INFRINGEMENT. IN NO EVENT SHALL VIA, S3 GRAPHICS, AND/OR
 * ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

%prep
%setup -q -n drm-via_chrome9-2.6.27-85a-44411-src
%patch
chmod 644 readme
cp -p $RPM_SOURCE_DIR/xorg.conf.hp-2133-mini-note .

%build

# Assume that the package is built by plain 'make' if there's no ./configure.
# This test is there only because the wizard doesn't know much about the
# package, feel free to clean it up
if test -x ./configure; then
	%configure
fi
make

    

%install

make DESTDIR=%buildroot install
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
cp do_kernel_patch_note.txt $RPM_BUILD_ROOT%{_docdir}/%{name}
cp readme $RPM_BUILD_ROOT%{_docdir}/%{name}
cp xorg.conf.hp-2133-mini-note $RPM_BUILD_ROOT%{_docdir}/%{name}


echo '%%defattr(-,root,root)' >filelist
find %buildroot -type f -printf '/%%P*\n' >>filelist


%clean
rm -rf %buildroot

%files
%defattr(-,root,root)
/lib/modules/*
%doc do_kernel_patch_note.txt readme xorg.conf.hp-2133-mini-note

%post
if [ -d /lib/modules/`uname -r` ]; then
	depmod -a
fi

%postun
if [ -d /lib/modules/`uname -r` ]; then
	depmod -a
fi

# This is a place for a proper filelist:
# /usr/bin/via-chrome9-kmp
# You can also use shell wildcards:
# /usr/share/via-chrome9-kmp/*
# This installs documentation files from the top build directory
# into /usr/share/doc/...
# %doc README COPYING
# The advantage of using a real filelist instead of the '-f filelist' trick is
# that rpmbuild will detect if the install section forgets to install
# something that is listed here


%changelog
* Thu Jan 29 2009 minish
- Fixed readme permission
- Added post and postun macro

* Wed Jan 28 2009 minish
- Add License information
- Add xorg.conf for HP 2133 Mini-Note PC

* Thu Jan 22 2009 minish
- add documents of source

* Tue Jan 20 2009 minish
- packaged via-chrome9-kmp version 0 using the buildservice spec file wizard
openSUSE Build Service is sponsored by