]> git.pld-linux.org Git - packages/ddccontrol.git/blob - ddccontrol.spec
- post{un} ldconfig moved to -libs
[packages/ddccontrol.git] / ddccontrol.spec
1 #
2 # Conditional build:
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
6 #
7 %define dbversion 20060308
8 %define ddcdb   %{name}-db-%{dbversion}
9
10 Summary:        DDCcontrol - control the monitor parameters
11 Summary(pl):    DDCcontrol - narzêdzie do regulacji parametrów monitora
12 Name:           ddccontrol
13 Version:        0.4.1
14 Release:        1
15 License:        GPL v2+
16 Group:          Applications
17 Source0:        http://dl.sourceforge.net/ddccontrol/%{name}-%{version}.tar.bz2
18 # Source0-md5:  bef6825f7dfffbb4fd40eb4a848cd438
19 Source1:        http://dl.sourceforge.net/ddccontrol/%{ddcdb}.tar.bz2
20 # Source1-md5:  973a5db6081054bbb336254331820b0c
21 Patch0:         %{name}-SAM0197.patch
22 Patch1:         %{name}-desktop.patch
23 Patch2:         %{name}-gnome.patch
24 Patch3:         %{name}-pl.patch
25 URL:            http://ddccontrol.sourceforge.net/
26 BuildRequires:  autoconf >= 2.50
27 BuildRequires:  automake
28 BuildRequires:  gettext-devel
29 %{?with_gnome:BuildRequires:    gnome-panel-devel >= 2.10}
30 %{?with_gtk:BuildRequires:      gtk+2-devel >= 2:2.4}
31 BuildRequires:  intltool
32 BuildRequires:  libtool
33 BuildRequires:  libxml2-devel
34 BuildRequires:  pciutils-devel
35 BuildRequires:  pkgconfig
36 Requires:       %{name}-libs = %{version}-%{release}
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
44 %description -l pl
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
47 obudowie monitora.
48
49 %package gtk
50 Summary:        GTK+ GUI for ddccontrol
51 Summary(pl):    Graficzny interfejs GTK+ dla ddccontrol
52 Group:          X11/Applications
53 Requires:       %{name} = %{version}-%{release}
54
55 %description gtk
56 GTK+ GUI for ddccontrol.
57
58 %description gtk -l pl
59 Graficzny interfejs GTK+ dla ddccontrol.
60
61 %package applet
62 Summary:        GNOME applet for ddccontrol
63 Summary(pl):    Aplet GNOME dla ddccontrol
64 Group:          X11/Applications
65 Requires:       %{name} = %{version}-%{release}
66
67 %description applet
68 GNOME applet for ddccontrol.
69
70 %description applet -l pl
71 Aplet GNOME dla ddccontrol.
72
73 %package libs
74 Summary:        ddccontrol library
75 Summary(pl):    Biblioteka ddccontrol
76 Group:          Libraries
77
78 %description libs
79 DDCcontrol library.
80
81 %description libs -l pl
82 Biblioteka DDCcontrol.
83
84 %package devel
85 Summary:        Development files for ddccontrol library
86 Summary(pl):    Pliki niezbêdne programistom u¿ywaj±cym biblioteki ddccontrol
87 Group:          Development/Libraries
88 Requires:       %{name}-libs = %{version}-%{release}
89 Requires:       libxml2-devel
90 Requires:       pciutils-devel
91
92 %description devel
93 Development files for ddccontrol library.
94
95 %description devel -l pl
96 Pliki niezbêdne programistom u¿ywaj±cym biblioteki ddccontrol.
97
98 %package static
99 Summary:        Static ddccontrol library
100 Summary(pl):    Biblioteka statyczna ddccontrol
101 Group:          Development/Libraries
102 Requires:       %{name}-devel = %{version}-%{release}
103
104 %description static
105 Static ddccontrol library.
106
107 %description static -l pl
108 Biblioteka statyczna ddccontrol.
109
110 %prep
111 %setup -q -a 1
112 %patch0 -p1
113 %patch1 -p1
114 %patch2 -p1
115 %patch3 -p1
116
117 %build
118 %{__libtoolize}
119 %{__aclocal} -I m4
120 %{__autoconf}
121 %{__autoheader}
122 %{__automake}
123 %configure \
124         %{!?with_gtk:--disable-gnome} \
125         %{!?with_gnome:--disable-gnome-applet} \
126         %{!?with_static_libs:--disable-static}
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
136
137 %{__make} -C %{ddcdb} install \
138         DESTDIR=$RPM_BUILD_ROOT
139
140 %find_lang %{name} --all-name
141
142 %clean
143 rm -rf $RPM_BUILD_ROOT
144
145 %post   libs -p /sbin/ldconfig
146 %postun libs -p /sbin/ldconfig
147
148 %files -f %{name}.lang
149 %defattr(644,root,root,755)
150 %doc AUTHORS ChangeLog NEWS README TODO doc/html
151 %attr(755,root,root) %{_bindir}/ddccontrol
152 %attr(755,root,root) %{_bindir}/ddcpci
153 %{_datadir}/ddccontrol-db
154
155 %if %{with gtk}
156 %files gtk
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_bindir}/gddccontrol
159 %{_desktopdir}/gddccontrol.desktop
160 %{_pixmapsdir}/gddccontrol.png
161 %endif
162
163 %if %{with gnome}
164 %files applet
165 %defattr(644,root,root,755)
166 %dir %{_libdir}/ddccontrol
167 %attr(755,root,root) %{_libdir}/ddccontrol/ddcc-applet
168 %{_datadir}/ddccontrol
169 %{_libdir}/bonobo/servers/*
170 %endif
171
172 %files libs
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{_libdir}/libddccontrol.so.*.*.*
175
176 %files devel
177 %defattr(644,root,root,755)
178 %attr(755,root,root) %{_libdir}/libddccontrol.so
179 %{_libdir}/libddccontrol.la
180 %{_includedir}/ddccontrol
181
182 %if %{with static_libs}
183 %files static
184 %defattr(644,root,root,755)
185 %{_libdir}/libddccontrol.a
186 %endif
This page took 0.040958 seconds and 4 git commands to generate.