File x11-input-wacom.spec of Package x11-input-wacom

#
# spec file for package x11-input-wacom (Version 0.8.3)
#
# Copyright (c) 2009 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

%define revision 6
%define udev_rules_custom 0

Name:           x11-input-wacom
BuildRequires:  ncurses ncurses-devel tk-devel update-desktop-files
%if %suse_version > 1110
BuildRequires:  gtk2-devel
%endif
%ifnarch s390 s390x 
BuildRequires:  hal-devel xorg-x11-driver-input xorg-x11-server-sdk
%endif
License:        GPL v2 or later
Url:            http://linuxwacom.sourceforge.net/
Group:          System/X11/Utilities
Version:        0.8.3
Release:        3.<RELEASE6>
Summary:        X11 input module for wacom tablet
Provides:       xorg-x11-server:/usr/X11R6/%{_lib}/modules/input/wacom_drv.o
Supplements:    xorg-x11-server
Source:         linuxwacom-%{version}-%{revision}.tar.bz2
#Source:         linuxwacom-%{version}.tar.bz2
%if %udev_rules_custom
Source1:        65-wacom.rules
%endif
#BuildRoot:      %{_tmppath}/%{name}-%{version}-%{revision}-build
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExcludeArch:    s390 s390x

%description
This package contains the X11 input module for wacom tablets.



Authors:
--------
    Ping Cheng <pingc@wacom.com>

%package tools
License:        GPL v2 or later
Summary:        Tools for configuration, diagnostic and libraries for Wacom tablets
Group:          System/X11/Utilities
Requires:       %{name} = %{version}-%{release} tk
Provides:       linuxwacom
Obsoletes:      linuxwacom
AutoReqProv:    on

%description tools
This package contains tools for configuration, diagnostic and libraries
for Wacom tablets.



Authors:
--------
    Ping Cheng <pingc@wacom.com>

%package devel
License:        GPL v2 or later
Summary:        Include Files and Libraries mandatory for Development
Group:          Development/Libraries/X11
Requires:       %{name}-tools = %{version}-%{release}
Provides:       linuxwacom-devel
Obsoletes:      linuxwacom-devel
AutoReqProv:    on

%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.



Authors:
--------
    Ping Cheng <pingc@wacom.com>

%prep
%setup -q -n linuxwacom-%{version}-%{revision}
#%setup -n linuxwacom-%{version}
touch NEWS

%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DWCM_XORG_XSERVER_1_6"
autoreconf --force --install
%ifarch s390 s390x
%configure --prefix=/usr
%else
%configure --prefix=/usr 					\
%ifarch x86_64
            --enable-xserver64 					\
%endif
	    --enable-wacdump					\
	    --enable-libwacomcfg				\
            --enable-dlloader 					\
            --with-xmoduledir=/usr/%{_lib}/xorg/modules/input 	\
            --with-xlib=/usr/%{_lib} \
			--disable-static \
			--with-pic
%endif
%{__make} %{?jobs:-j%jobs}

%install
make install DESTDIR=$RPM_BUILD_ROOT
# Script libraries for Tcl extensions should be in a package-specific 
# subdir of /usr/share/tcl
mkdir -p $RPM_BUILD_ROOT/usr/share/tcl/%{name}-tools
mv $RPM_BUILD_ROOT/usr/%{_lib}/TkXInput/pkgIndex.tcl \
   $RPM_BUILD_ROOT/usr/share/tcl/%{name}-tools
# workaround for Bug #118793
ln -snf /usr/%{_lib}/TkXInput/libwacomxi.so \
        $RPM_BUILD_ROOT/usr/share/tcl/x11-input-wacom-tools/libwacomxi.so
# udev rule for creating /dev/input/wacom symlink (Bug #404847)
mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d
%if %udev_rules_custom
install -m 644 $RPM_SOURCE_DIR/65-wacom.rules \
               $RPM_BUILD_ROOT/etc/udev/rules.d
%else
install -m 644 ./src/util/60-wacom.rules \
               $RPM_BUILD_ROOT/etc/udev/rules.d
%endif
mv $RPM_BUILD_ROOT%{_libexecdir}/hal-setup-wacom \
   $RPM_BUILD_ROOT/usr/bin/
find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} +

%clean
rm -rf %{buildroot}

%post tools -p /sbin/ldconfig

%postun tools -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS GPL README
%dir /usr/%_lib/xorg
%dir /usr/%_lib/xorg/modules/
%dir /usr/%_lib/xorg/modules/input
%dir /etc/udev
%dir /etc/udev/rules.d
/etc/udev/rules.d/6*-wacom.rules
/usr/bin/hal-setup-wacom
%attr (644,root,root) /usr/%_lib/xorg/modules/input/wacom_drv.so
%{_mandir}/man4/wacom.4x.gz
/usr/share/hal/fdi/policy/20thirdparty/10-linuxwacom.fdi

%files tools
%defattr(-,root,root)
/usr/bin/wacdump
/usr/bin/wacomcpl
/usr/bin/wacomcpl-exec
/usr/bin/xidump
/usr/bin/xsetwacom
%dir /usr/%_lib/TkXInput
/usr/%_lib/TkXInput/libwacomxi.so*
/usr/%_lib/libwacomcfg*so.*
%dir /usr/share/tcl/%{name}-tools
/usr/share/tcl/%{name}-tools/pkgIndex.tcl
/usr/share/tcl/%{name}-tools/libwacomxi.so

%files devel
%defattr(-,root,root)
%dir /usr/include/wacomcfg
/usr/include/wacomcfg/wacomcfg.h
/usr/%_lib/libwacomcfg.so

%changelog
openSUSE Build Service is sponsored by