]>
Commit | Line | Data |
---|---|---|
ec6ee6b1 JB |
1 | # |
2 | # Conditional build: | |
03d9b719 KK |
3 | %bcond_without gnome # don't build gnome applet |
4 | %bcond_without gtk # don't build GTK+ GUI | |
5 | %bcond_without static_libs # don't build static library | |
ec6ee6b1 | 6 | # |
a2bb49b1 | 7 | %define dbversion 20061014 |
8ca2049d | 8 | %define ddcdb %{name}-db-%{dbversion} |
9 | ||
b0230620 | 10 | Summary: DDCcontrol - control the monitor parameters |
f44a9355 | 11 | Summary(pl.UTF-8): DDCcontrol - narzędzie do regulacji parametrów monitora |
54771ea2 | 12 | Name: ddccontrol |
5645bf3c | 13 | Version: 0.4.2 |
9ec936b0 | 14 | Release: 3 |
ec6ee6b1 | 15 | License: GPL v2+ |
8ca2049d | 16 | Group: Applications |
17 | Source0: http://dl.sourceforge.net/ddccontrol/%{name}-%{version}.tar.bz2 | |
5645bf3c | 18 | # Source0-md5: b0eb367f3bc0564bd577e38d0b4107fc |
8ca2049d | 19 | Source1: http://dl.sourceforge.net/ddccontrol/%{ddcdb}.tar.bz2 |
a2bb49b1 | 20 | # Source1-md5: 91951918e5bc553c251776cdff8cea9c |
5645bf3c JB |
21 | Patch0: %{name}-desktop.patch |
22 | Patch1: %{name}-gnome.patch | |
23 | Patch2: %{name}-pl.patch | |
a2bb49b1 | 24 | Patch3: %{name}-link.patch |
8ca2049d | 25 | URL: http://ddccontrol.sourceforge.net/ |
ec6ee6b1 JB |
26 | BuildRequires: autoconf >= 2.50 |
27 | BuildRequires: automake | |
03d9b719 | 28 | BuildRequires: gettext-devel |
ec6ee6b1 JB |
29 | %{?with_gnome:BuildRequires: gnome-panel-devel >= 2.10} |
30 | %{?with_gtk:BuildRequires: gtk+2-devel >= 2:2.4} | |
03d9b719 | 31 | BuildRequires: intltool |
8ca2049d | 32 | BuildRequires: libtool |
8cb8f086 | 33 | BuildRequires: libxml2-devel |
34 | BuildRequires: pciutils-devel | |
ec6ee6b1 | 35 | BuildRequires: pkgconfig |
8ca2049d | 36 | Requires: %{name}-libs = %{version}-%{release} |
8ca2049d | 37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
38 | ||
39 | %description | |
40 | DDCcontrol is a program used to control monitor parameters, like | |
41 | brightness and contrast, by software, i.e. without using the OSD and | |
42 | the buttons in front of the monitor. | |
43 | ||
fc601448 JR |
44 | %description -l pl.UTF-8 |
45 | DDCcontrol jest programem służącym do regulacji parametrów monitora | |
46 | takich jak jaskrawość i kontrast, bez używania OSD i przycisków na | |
8ca2049d | 47 | obudowie monitora. |
48 | ||
ec6ee6b1 JB |
49 | %package gtk |
50 | Summary: GTK+ GUI for ddccontrol | |
f44a9355 | 51 | Summary(pl.UTF-8): Graficzny interfejs GTK+ dla ddccontrol |
ec6ee6b1 JB |
52 | Group: X11/Applications |
53 | Requires: %{name} = %{version}-%{release} | |
54 | ||
55 | %description gtk | |
56 | GTK+ GUI for ddccontrol. | |
57 | ||
fc601448 | 58 | %description gtk -l pl.UTF-8 |
ec6ee6b1 JB |
59 | Graficzny interfejs GTK+ dla ddccontrol. |
60 | ||
8cb8f086 | 61 | %package applet |
62 | Summary: GNOME applet for ddccontrol | |
f44a9355 | 63 | Summary(pl.UTF-8): Aplet GNOME dla ddccontrol |
ec6ee6b1 | 64 | Group: X11/Applications |
8cb8f086 | 65 | Requires: %{name} = %{version}-%{release} |
66 | ||
67 | %description applet | |
68 | GNOME applet for ddccontrol. | |
69 | ||
fc601448 | 70 | %description applet -l pl.UTF-8 |
8cb8f086 | 71 | Aplet GNOME dla ddccontrol. |
72 | ||
b0230620 | 73 | %package libs |
ec6ee6b1 | 74 | Summary: ddccontrol library |
f44a9355 | 75 | Summary(pl.UTF-8): Biblioteka ddccontrol |
b0230620 | 76 | Group: Libraries |
b0230620 JB |
77 | |
78 | %description libs | |
ec6ee6b1 | 79 | DDCcontrol library. |
b0230620 | 80 | |
fc601448 | 81 | %description libs -l pl.UTF-8 |
ec6ee6b1 | 82 | Biblioteka DDCcontrol. |
b0230620 | 83 | |
8ca2049d | 84 | %package devel |
ec6ee6b1 | 85 | Summary: Development files for ddccontrol library |
f44a9355 | 86 | Summary(pl.UTF-8): Pliki niezbędne programistom używającym biblioteki ddccontrol |
8ca2049d | 87 | Group: Development/Libraries |
ec6ee6b1 JB |
88 | Requires: %{name}-libs = %{version}-%{release} |
89 | Requires: libxml2-devel | |
90 | Requires: pciutils-devel | |
8ca2049d | 91 | |
92 | %description devel | |
ec6ee6b1 | 93 | Development files for ddccontrol library. |
8ca2049d | 94 | |
fc601448 JR |
95 | %description devel -l pl.UTF-8 |
96 | Pliki niezbędne programistom używającym biblioteki ddccontrol. | |
8ca2049d | 97 | |
98 | %package static | |
ec6ee6b1 | 99 | Summary: Static ddccontrol library |
f44a9355 | 100 | Summary(pl.UTF-8): Biblioteka statyczna ddccontrol |
8ca2049d | 101 | Group: Development/Libraries |
54771ea2 | 102 | Requires: %{name}-devel = %{version}-%{release} |
8ca2049d | 103 | |
104 | %description static | |
ec6ee6b1 | 105 | Static ddccontrol library. |
8ca2049d | 106 | |
fc601448 | 107 | %description static -l pl.UTF-8 |
ec6ee6b1 | 108 | Biblioteka statyczna ddccontrol. |
8ca2049d | 109 | |
110 | %prep | |
111 | %setup -q -a 1 | |
112 | %patch0 -p1 | |
113 | %patch1 -p1 | |
ec6ee6b1 | 114 | %patch2 -p1 |
a2bb49b1 | 115 | %patch3 -p1 |
8ca2049d | 116 | |
117 | %build | |
ec6ee6b1 JB |
118 | %{__libtoolize} |
119 | %{__aclocal} -I m4 | |
120 | %{__autoconf} | |
121 | %{__autoheader} | |
122 | %{__automake} | |
123 | %configure \ | |
124 | %{!?with_gtk:--disable-gnome} \ | |
03d9b719 KK |
125 | %{!?with_gnome:--disable-gnome-applet} \ |
126 | %{!?with_static_libs:--disable-static} | |
8ca2049d | 127 | %{__make} |
128 | cd %{ddcdb} | |
129 | %configure | |
130 | %{__make} | |
131 | ||
132 | %install | |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | %{__make} install \ | |
135 | DESTDIR=$RPM_BUILD_ROOT | |
b0230620 JB |
136 | |
137 | %{__make} -C %{ddcdb} install \ | |
8ca2049d | 138 | DESTDIR=$RPM_BUILD_ROOT |
8cb8f086 | 139 | |
ec6ee6b1 | 140 | %find_lang %{name} --all-name |
8ca2049d | 141 | |
142 | %clean | |
143 | rm -rf $RPM_BUILD_ROOT | |
144 | ||
4f06543a KK |
145 | %post libs -p /sbin/ldconfig |
146 | %postun libs -p /sbin/ldconfig | |
ec6ee6b1 | 147 | |
8cb8f086 | 148 | %files -f %{name}.lang |
8ca2049d | 149 | %defattr(644,root,root,755) |
ec6ee6b1 | 150 | %doc AUTHORS ChangeLog NEWS README TODO doc/html |
8ca2049d | 151 | %attr(755,root,root) %{_bindir}/ddccontrol |
152 | %attr(755,root,root) %{_bindir}/ddcpci | |
466826b9 | 153 | %{_datadir}/ddccontrol-db |
5645bf3c | 154 | %{_mandir}/man1/ddccontrol.1* |
8ca2049d | 155 | |
ec6ee6b1 JB |
156 | %if %{with gtk} |
157 | %files gtk | |
158 | %defattr(644,root,root,755) | |
159 | %attr(755,root,root) %{_bindir}/gddccontrol | |
160 | %{_desktopdir}/gddccontrol.desktop | |
161 | %{_pixmapsdir}/gddccontrol.png | |
5645bf3c | 162 | %{_mandir}/man1/gddccontrol.1* |
ec6ee6b1 JB |
163 | %endif |
164 | ||
165 | %if %{with gnome} | |
8cb8f086 | 166 | %files applet |
167 | %defattr(644,root,root,755) | |
168 | %dir %{_libdir}/ddccontrol | |
8cb8f086 | 169 | %attr(755,root,root) %{_libdir}/ddccontrol/ddcc-applet |
ec6ee6b1 | 170 | %{_datadir}/ddccontrol |
8cb8f086 | 171 | %{_libdir}/bonobo/servers/* |
ec6ee6b1 | 172 | %endif |
8cb8f086 | 173 | |
b0230620 JB |
174 | %files libs |
175 | %defattr(644,root,root,755) | |
ec6ee6b1 | 176 | %attr(755,root,root) %{_libdir}/libddccontrol.so.*.*.* |
b0230620 | 177 | |
8ca2049d | 178 | %files devel |
179 | %defattr(644,root,root,755) | |
ec6ee6b1 JB |
180 | %attr(755,root,root) %{_libdir}/libddccontrol.so |
181 | %{_libdir}/libddccontrol.la | |
182 | %{_includedir}/ddccontrol | |
8ca2049d | 183 | |
03d9b719 | 184 | %if %{with static_libs} |
8ca2049d | 185 | %files static |
186 | %defattr(644,root,root,755) | |
ec6ee6b1 | 187 | %{_libdir}/libddccontrol.a |
03d9b719 | 188 | %endif |