File fspc.spec of Package fspc

# spec file for package fspc
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 Guido Berhoerster.
# 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

Name:           fspc
Release:        1
License:        BSD
Summary:        Sentelic Finger-sensing Pad Configuration Tool
Group:          Hardware/Other
# svn co fsp-lnxdrv-<VERSION>
Source:         fsp-lnxdrv-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM fspc-fix-linking.patch -- Fixes an underlinking issue
Patch0:         fspc-fix-linking.patch
BuildRequires:  update-desktop-files
BuildRequires:  gcc-c++
BuildRequires:  cmake
BuildRequires:  wxWidgets-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

The Finger-sensing Pad Configuration Tool is a small tool to configure Sentelic
"Finger-sensing Pad" touchpads.

%setup -q -n fsp-lnxdrv-%{version}
%patch0 -p1

export CFLAGS='%{optflags}'
export CXXFLAGS='%{optflags}'
    cd src/libfsp
    make CFLAGS="${CFLAGS} -I../kernel-driver" lib
    cd src/fspc
    cmake -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
          -DCMAKE_SKIP_RPATH=1 \
    make %{?_smp_mflags} VERBOSE=1 fspc

cd src/fspc
for file in fspcui.xrc fspcui_zh_CN.xrc fspcui_zh_TW.xrc pic/*; do
    install -D -p -m 644 "${file}" "%{buildroot}%{_datadir}/fspc/${file}"
install -D -p -m 755 fspc %{buildroot}%{_bindir}/fspc
install -d -m 755 %{buildroot}%{_datadir}/pixmaps
ln -sf "../fspc/pic/panelDeclaration.png" "%{buildroot}%{_datadir}/pixmaps/%{name}.png"
%suse_update_desktop_file -c %{name} %{name} 'Sentelic Finger-sensing Pad Configuration Tool' %{name} %{name} Settings HardwareSettings

%if 0%{?suse_version} >= 1140


rm -rf %{buildroot}