Name: libXNVCtrl
Version: 1.0
Release: 4%{?dist}
Summary: Library providing the NV-CONTROL API
Group: System Environment/Libraries
License: GPL
URL: ftp://download.nvidia.com/XFree86/nvidia-settings/
Source0: ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-%{version}.tar.gz
Patch0: libXNVCtrl-imake.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: imake libX11-devel libXext-devel
%description
This packages contains the libXNVCtrl library from the nvidia-settings
application. This library provides the NV-CONTROL API for communicating with
the proprietary NVidia xorg driver. This package does not contain the
nvidia-settings tool itself as that is included with the proprietary drivers
themselves.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}, libX11-devel
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q -n nvidia-settings-%{version}
%patch0 -p1 -z .imake
pushd src/%{name}
xmkmf
popd
%build
pushd src/%{name}
make %{?_smp_mflags} CDEBUGFLAGS="$RPM_OPT_FLAGS"
popd
%install
rm -rf $RPM_BUILD_ROOT
pushd src/%{name}
make install DESTDIR=$RPM_BUILD_ROOT INSTINCFLAGS="-p -m 644"
popd
# imake installs these under X11/extensions, but apps expect them under NVCtrl
mv $RPM_BUILD_ROOT%{_includedir}/X11/extensions \
$RPM_BUILD_ROOT%{_includedir}/NVCtrl
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc COPYING src/%{name}/README.LIBXNVCTRL
%{_libdir}/%{name}.so.0*
%files devel
%defattr(-,root,root,-)
%doc doc/NV-CONTROL-API.txt doc/FRAMELOCK.txt
%{_includedir}/NVCtrl
%{_libdir}/%{name}.so
%changelog
* Fri Jul 27 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0-4
- Add missing libXext-devel BuildRequires
* Fri Jul 27 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0-3
- Link the lib against libX11 and libXext to avoid undefined non weak symbols
(through updated libXNVCtrl-imake.patch)
* Sun Jul 22 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0-2
- Honor optflags
- Preserve timestamps of headers when installing them
* Sun Jul 15 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0-1
- Initial Fedora Extras version