]> git.pld-linux.org Git - packages/nvidia-settings.git/blob - nvidia-settings.spec
- new (based on altlinux spec)
[packages/nvidia-settings.git] / nvidia-settings.spec
1 %bcond_with     nvidia_settings # build the main package
2 %bcond_without  libXNVCtrl      # build libXNVCtrl for http://websvn.kde.org/trunk/kdenonbeta/nvidia/
3 Summary:        Tool for configuring the NVIDIA driver
4 Name:           nvidia-settings
5 Version:        1.0
6 Release:        0.3
7 License:        GPL
8 Group:          X11
9 URL:            ftp://download.nvidia.com/XFree86/nvidia-settings/
10 Source0:        ftp://download.nvidia.com/XFree86/nvidia-settings/%{name}-%{version}.tar.gz
11 # Source0-md5:  e6025e7fe05162c4608333702895f97c
12 Patch0:         %{name}-shared.patch
13 Patch1:         %{name}-xlibs.patch
14 %if %{with nvidia_settings}
15 #BuildRequires: XFree86-devel
16 #BuildRequires: XFree86-libs
17 #BuildRequires: fontconfig
18 #BuildRequires: freetype2
19 #BuildRequires: glib2-devel
20 #BuildRequires: libatk-devel
21 #BuildRequires: libgtk+2-devel
22 #BuildRequires: libpango-devel
23 #BuildRequires: pkgconfig
24 %endif
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 The `nvidia-settings` utility is a tool for configuring the NVIDIA
29 Linux graphics driver. It operates by communicating with the NVIDIA X
30 driver, querying and updating state as appropriate. This communication
31 is done with the NV-CONTROL X extension.
32
33 Values such as brightness and gamma, XVideo attributes, temperature,
34 and OpenGL settings can be queried and configured via nvidia-settings.
35
36 When nvidia-settings starts, it reads the current settings from its
37 configuration file and sends those settings to the X server. Then, it
38 displays a graphical user interface (GUI) interface for configuring
39 the current settings. When nvidia-settings exits, it queries the
40 current settings from the X server and saves them to the configuration
41 file.
42
43 %package -n libXNVCtrl
44 Summary:        libXNVCtrl library
45 Group:          Libraries
46
47 %description -n libXNVCtrl
48 Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
49
50 %package -n libXNVCtrl-devel
51 Summary:        libXNVCtrl development headers and library
52 Group:          Development/Libraries
53 Requires:       libXNVCtrl = %{version}-%{release}
54 Requires:       XFree86-devel
55
56 %description -n libXNVCtrl-devel
57 Library and development headers for libXNVCtrl.
58
59 %package -n libXNVCtrl-static
60 Summary:        libXNVCtrl static library
61 Group:          Developmment/Libraries
62 Requires:       libXNVCtrl-devel = %{version}-%{release}
63
64 %description -n libXNVCtrl-static
65 Static library for libXNVCtrl.
66
67 %prep
68 %setup -q
69 %patch0 -p1
70 %patch1 -p1
71
72 %build
73 %if %{with libXNVCtrl}
74 cd src/libXNVCtrl
75 xmkmf
76 %{__make} clean
77 %{__make}
78 cd ../../
79 %endif
80
81 %if %{with nvidia_settings}
82 %{__make} \
83         CC="%{__cc}" \
84         CFLAGS="%{rpmcflags}"
85 %endif
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89 %if %{with nvidia_settings}
90 install -d $RPM_BUILD_ROOT%{_bindir}
91 install nvidia-settings $RPM_BUILD_ROOT%{_bindir}
92 %endif
93
94 %if %{with libXNVCtrl}
95 %{__make} install \
96         -C src/libXNVCtrl \
97         DESTDIR=$RPM_BUILD_ROOT
98 %endif
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %post   -n libXNVCtrl -p /sbin/ldconfig
104 %postun -n libXNVCtrl -p /sbin/ldconfig
105
106 %if %{with nvidia_settings}
107 %files
108 %defattr(644,root,root,755)
109 %doc doc/*.txt samples
110 %attr(755,root,root) %{_bindir}/%{name}
111 %endif
112
113 %files -n libXNVCtrl
114 %defattr(644,root,root,755)
115 %attr(755,root,root) %{_prefix}/X11R6/lib64/libXNVCtrl.so.*.*.*
116
117 %files -n libXNVCtrl-devel
118 %defattr(644,root,root,755)
119 %{_prefix}/X11R6/include/X11/extensions/NVCtrl.h
120 %{_prefix}/X11R6/include/X11/extensions/NVCtrlLib.h
121 %{_prefix}/X11R6/lib64/libXNVCtrl.so
122
123 %files -n libXNVCtrl-static
124 %defattr(644,root,root,755)
125 %{_prefix}/X11R6/lib64/libXNVCtrl.a
This page took 0.036009 seconds and 4 git commands to generate.