Sophie

Sophie

distrib > Mandriva > mes5 > i586 > by-pkgid > 7bcce6a268267c7d8f110c32ea29174d > files > 4

linuxwacom-0.8.0-1mdv2009.0.src.rpm

%define version  0.8.0
%define fversion 0.8.0-3
%define fname    %{name}-%{fversion}
%define raw_libname wacom
%define libname  %mklibname %raw_libname 0

%define build_dkms 0
%{?_with_dkms: %global build_dkms 1}

%if %mdkversion < 200800
%define build_dkms 1
%endif

Name:    linuxwacom
Version: %version
Release: %mkrel 1
Summary: Tools to manage Wacom tablets
License: LGPL
Group:   System/X11
URL:     http://linuxwacom.sourceforge.net
Source0: http://prdownloads.sourceforge.net/linuxwacom/%{fname}.tar.bz2
# create additional symlinks (Debian) and ensure wacom module is loaded before usbmouse
Source1: 41-wacom.rules
# (fc) 0.8.0-1mdv fix build
Patch0: linuxwacom-0.8.0-fixbuild.patch

BuildRoot:     %{_tmppath}/%{name}-%{version}-root
BuildRequires: X11-devel, libxi-devel, x11-server-devel, ncurses-devel
# needed for detection of input module path 
BuildRequires: x11-driver-input-mouse

%description 
X.org XInput drivers, diagnostic tools and documentation for configuring
and running Wacom tablets.

%package controlpanel
Summary: Wacom Control Panel
Group:   System/X11
Requires: %{name} = %{version}
Requires: tcl
Requires: tk
BuildRequires: tcl-devel tk-devel

%description controlpanel
Control Panel for Wacom tablets.

%package -n %libname
Summary: Wacom Drivers
Group:   System/X11
Requires: %{name} = %{version}

%description -n %libname
Libraries for managing the Wacom tablets.

%package -n %libname-devel
Summary: Development libraries and header files for linuxwacom 
Group: Development/C
Requires: %{libname} = %{version}
Provides: lib%{raw_libname}-devel = %{version}

%description -n %libname-devel
Development libraries and header files required for developing applications
that manipulate Wacom tablets settings.

%if %{build_dkms}
%package -n dkms-wacom
Summary:        Wacom kernel module
Group:          System/Kernel and hardware
Requires(post):  dkms
Requires(preun): dkms

%description -n dkms-wacom
Latest version of wacom kernel module as well as hid-core, for support
for latest Wacom tablets.
%endif

%prep
%setup -q -n %{fname}
%patch0 -p1 -b .fixbuild

#needed by patch0
autoreconf -i 

%build
%configure2_5x 

%make

%install
rm -rf $RPM_BUILD_ROOT

%makeinstall_std 

%__install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/41-wacom.rules
rm -f  $RPM_BUILD_ROOT%{_libdir}/*.la
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib/TkXInput/%{*.a,la}

%if %{build_dkms}
# install wacom kernel module sources
mkdir -p $RPM_BUILD_ROOT%{_usr}/src/wacom-%{version}
cp src/2.6.16/* $RPM_BUILD_ROOT%{_usr}/src/wacom-%{version}/
cat > $RPM_BUILD_ROOT%{_usr}/src/wacom-%{version}/dkms.conf << EOF
PACKAGE_NAME=wacom
PACKAGE_VERSION=%{version}
MAKE="make WCM_OPTION_WACOM=yes -C \$kernel_source_dir M=\$dkms_tree/\$PACKAGE_NAME/\$PACKAGE_VERSION/build"
DEST_MODULE_LOCATION[0]=/kernel/drivers/usb/input/
BUILT_MODULE_NAME[0]=wacom
AUTOINSTALL=yes
EOF
%endif

#menu entry
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
cat << EOF > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-wacomcpl.desktop
[Desktop Entry]
Encoding=UTF-8
Categories=System;HardwareSettings;X-MandrivaLinux-System-Configuration-Hardware;
Name=Wacom Control Panel
Comment=Configuration tool for Wacom tablets
Exec=wacomcpl
Icon=hardware_configuration_section
Type=Application
Terminal=false
EOF

%clean
rm -rf $RPM_BUILD_ROOT

%if %mdkversion < 200900
%post   -n %libname -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %libname -p /sbin/ldconfig
%endif

%post controlpanel
%{update_desktop_database}

%postun controlpanel
%{clean_desktop_database}

%if %{build_dkms}
%post -n dkms-wacom
set -x
/usr/sbin/dkms --rpm_safe_upgrade add -m wacom -v %{version}
/usr/sbin/dkms --rpm_safe_upgrade build -m wacom -v %{version}
/usr/sbin/dkms --rpm_safe_upgrade install -m wacom -v %{version}

%preun -n dkms-wacom
# rmmod can fail
/sbin/rmmod %{wacom} hidcore >/dev/null 2>&1
set -x
/usr/sbin/dkms --rpm_safe_upgrade remove -m wacom -v %{version} --all || :
%endif

%files 
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog NEWS
%config(noreplace) %{_sysconfdir}/udev/rules.d/41-wacom.rules
%{_libdir}/xorg/modules/input/wacom_drv.*o
%{_bindir}/*dump
%{_bindir}/xsetwacom
%{_mandir}/man4/*

%files controlpanel
%defattr(-,root,root,-)
%{_bindir}/wacomcpl*
%{_datadir}/applications/*
%{_libdir}/TkXInput

%files -n %libname
%defattr(-,root,root,-)
%doc LGPL
%{_libdir}/lib*so.*

%files -n %libname-devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/lib*.a
%{_libdir}/lib*.so

%if %{build_dkms}
%files -n dkms-wacom
%defattr(-,root,root)
%{_usr}/src/wacom-%{version}
%endif


%changelog
* Mon Sep 01 2008 Frederic Crozat <fcrozat@mandriva.com> 0.8.0-1mdv2009.0
+ Revision: 278454
- Release 0.8.0-3
- Patch0: fix build with undefined ldflags

  + Thierry Vignaud <tvignaud@mandriva.com>
    - rebuild

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Mon Mar 03 2008 Frederic Crozat <fcrozat@mandriva.com> 0.7.9-4mdv2008.1
+ Revision: 178028
- Release 0.7.9-8
- Remove patches 0 & 1 (merged upstream)

  + Thierry Vignaud <tvignaud@mandriva.com>
    - fix 'error: for key "Icon" in group "Desktop Entry" is an icon name with an
      extension, but there should be no extension as described in the Icon Theme
      Specification if the value is not an absolute path'

* Tue Jan 22 2008 Frederic Crozat <fcrozat@mandriva.com> 0.7.9-3mdv2008.1
+ Revision: 156431
- Release 0.7.9-6
- Remove patch0, no longer needed
- Update source1 with additionnal models
- Patch0 (GIT): no longer requires kernel source installed to build package
- Patch1 (GIT): init keystruct once, fix crash when changing VT
- Simplify specfile

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Sat Nov 17 2007 Funda Wang <fundawang@mandriva.org> 0.7.9-2mdv2008.1
+ Revision: 109220
- rebuild for new lzma

* Wed Oct 31 2007 Austin Acton <austin@mandriva.org> 0.7.9-1mdv2008.1
+ Revision: 104258
- new release
- drop patches (merged upstream)

* Wed Oct 17 2007 Austin Acton <austin@mandriva.org> 0.7.8-5mdv2008.1
+ Revision: 99765
- uh, pixman-devel
- buildrequires kernel-source and libpixman-devel
- fix includes for xorg7.3
- patch for xorg7.3 build (linuxwacom on sf.net)
- patch for scaling on xorg7.3 (linuxwacom on sf.net)
- build with no-stack-protector (won't insert otherwise,like Ubuntu #66681)

  + Thierry Vignaud <tvignaud@mandriva.com>
    - do not harcode icon extension
    - kill desktop-file-validate's 'warning: key "Encoding" in group "Desktop Entry" is deprecated'

* Tue Aug 21 2007 Frederic Crozat <fcrozat@mandriva.com> 0.7.8-4mdv2008.0
+ Revision: 68471
- Release 0.7.8-3

* Tue Jul 10 2007 Frederic Crozat <fcrozat@mandriva.com> 0.7.8-3mdv2008.0
+ Revision: 50988
- Move control panel to its own subpackage (since it requires tcl/tk and isn't required by everybody)
- Add menu entry for control panel (Philippe DIDIER)
- add udev rules to ensure wacom is always loaded before usbmouse and to create additional symlinks similar to Debian ones (cosmetic, they aren't used by mousedrake)

* Mon Jul 09 2007 Frederic Crozat <fcrozat@mandriva.com> 0.7.8-2mdv2008.0
+ Revision: 50471
- Patch0: fix lib64 issue
- Add dkms subpackage for 2007.0 / Spring
- Package X configuration tool too

* Sat Jul 07 2007 Frederic Crozat <fcrozat@mandriva.com> 0.7.8-1mdv2008.0
+ Revision: 49605
- Release 0.7.8 (


* Sat Mar 03 2007 Emmanuel Andry <eandry@mandriva.org> 0.7.6_4-1mdv2007.0
+ Revision: 131851
- New version 0.7.6-4
- Import linuxwacom

* Thu Sep 21 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.7.4_2-3mdv2007.0
- fix build

* Tue Sep 19 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.7.4_2-2mdv2007.0
- Rebuild

* Fri Jun 09 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.7.4_2-1mdv2007.0
- initial release