]> git.pld-linux.org Git - packages/ddccontrol.git/blobdiff - ddccontrol.spec
- rel 4
[packages/ddccontrol.git] / ddccontrol.spec
index e5e3bcadbe5e8dd84baa0de41014e83725d90450..8b1caab2b70fe0445e1762d6cb2120dd1c10b4b1 100644 (file)
@@ -1,28 +1,39 @@
-%define dbversion 20060308
+#
+# Conditional build:
+%bcond_without gnome           # don't build gnome applet
+%bcond_without gtk             # don't build GTK+ GUI
+%bcond_without static_libs     # don't build static library
+#
+%define dbversion 20061014
 %define ddcdb  %{name}-db-%{dbversion}
 
-Summary:       DDCcontrol control the monitor parameters
-Summary(pl):   DDCcontrol s³u¿y do kontroli parametrów monitora
+Summary:       DDCcontrol control the monitor parameters
+Summary(pl.UTF-8):     DDCcontrol - narzędzie do regulacji parametrów monitora
 Name:          ddccontrol
-Version:       0.4.1
-Release:       1
-License:       GPL v2
+Version:       0.4.2
+Release:       4
+License:       GPL v2+
 Group:         Applications
 Source0:       http://dl.sourceforge.net/ddccontrol/%{name}-%{version}.tar.bz2
-# Source0-md5: bef6825f7dfffbb4fd40eb4a848cd438
+# Source0-md5: b0eb367f3bc0564bd577e38d0b4107fc
 Source1:       http://dl.sourceforge.net/ddccontrol/%{ddcdb}.tar.bz2
-# Source1-md5: 973a5db6081054bbb336254331820b0c
-Patch0:                %{name}-SAM0197.patch
-Patch1:                %{name}-desktop.patch
+# Source1-md5: 91951918e5bc553c251776cdff8cea9c
+Patch0:                %{name}-desktop.patch
+Patch1:                %{name}-gnome.patch
+Patch2:                %{name}-pl.patch
+Patch3:                %{name}-link.patch
 URL:           http://ddccontrol.sourceforge.net/
-BuildRequires: pciutils-devel
-BuildRequires: libxml2-devel
-BuildRequires: gtk+2-devel >= 2.4
+BuildRequires: autoconf >= 2.50
+BuildRequires: automake
+BuildRequires: gettext-devel
+%{?with_gnome:BuildRequires:   gnome-panel-devel >= 2.10}
+%{?with_gtk:BuildRequires:     gtk+2-devel >= 2:2.4}
+BuildRequires: intltool
 BuildRequires: libtool
-Requires:      pciutils
-Requires:      libxml2
+BuildRequires: libxml2-devel
+BuildRequires: pciutils-devel
+BuildRequires: pkgconfig
 Requires:      %{name}-libs = %{version}-%{release}
-Requires:      gtk+2 >= 2.4
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -30,65 +41,90 @@ DDCcontrol is a program used to control monitor parameters, like
 brightness and contrast, by software, i.e. without using the OSD and
 the buttons in front of the monitor.
 
-%description -l pl
-DDCcontrol jest programem s³u¿±cym do kontroli parametrów monitora
-takich jak jaskrawo¶æ i kontrast, bez u¿ywania OSD i przycisków na
+%description -l pl.UTF-8
+DDCcontrol jest programem służącym do regulacji parametrów monitora
+takich jak jaskrawość i kontrast, bez używania OSD i przycisków na
 obudowie monitora.
 
+%package gtk
+Summary:       GTK+ GUI for ddccontrol
+Summary(pl.UTF-8):     Graficzny interfejs GTK+ dla ddccontrol
+Group:         X11/Applications
+Requires:      %{name} = %{version}-%{release}
+
+%description gtk
+GTK+ GUI for ddccontrol.
+
+%description gtk -l pl.UTF-8
+Graficzny interfejs GTK+ dla ddccontrol.
+
+%package applet
+Summary:       GNOME applet for ddccontrol
+Summary(pl.UTF-8):     Aplet GNOME dla ddccontrol
+Group:         X11/Applications
+Requires:      %{name} = %{version}-%{release}
+
+%description applet
+GNOME applet for ddccontrol.
+
+%description applet -l pl.UTF-8
+Aplet GNOME dla ddccontrol.
+
 %package libs
-Summary:       ddccontrol libraries
-Summary(pl):   Pliki niezbêdne programistom dla ddccontrol
+Summary:       ddccontrol library
+Summary(pl.UTF-8):     Biblioteka ddccontrol
 Group:         Libraries
-Requires:      %{name} = %{version}-%{release}
 
 %description libs
-DDCcontrol libraries.
+DDCcontrol library.
 
-%description libs -l pl
-Biblioteki do DDCcontrol.
+%description libs -l pl.UTF-8
+Biblioteka DDCcontrol.
 
 %package devel
-Summary:       Development files for ddccontrol
-Summary(pl):   Pliki niezbêdne programistom dla ddccontrol
+Summary:       Development files for ddccontrol library
+Summary(pl.UTF-8):     Pliki niezbędne programistom używającym biblioteki ddccontrol
 Group:         Development/Libraries
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name}-libs = %{version}-%{release}
+Requires:      libxml2-devel
+Requires:      pciutils-devel
 
 %description devel
-DDCcontrol is a program used to control monitor parameters, like
-brightness and contrast, by software, i.e. without using the OSD and
-the buttons in front of the monitor. This package contains files need
-for development.
+Development files for ddccontrol library.
 
-%description devel -l pl
-DDCcontrol jest programem s³u¿±cym do kontroli parametrów monitora
-takich jak jaskrawo¶æ i kontrast, bez u¿ywania OSD i przycisków na
-obudowie monitora. Ten pakiet zawiera pliki niezbêdne programistom.
+%description devel -l pl.UTF-8
+Pliki niezbędne programistom używającym biblioteki ddccontrol.
 
 %package static
-Summary:       Static libraries for ddccontrol
-Summary(pl):   Biblioteki statyczne dla ddccontrol
+Summary:       Static ddccontrol library
+Summary(pl.UTF-8):     Biblioteka statyczna ddccontrol
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
-DDCcontrol is a program used to control monitor parameters, like
-brightness and contrast, by software, i.e. without using the OSD and
-the buttons in front of the monitor. This package contains static
-libraries.
+Static ddccontrol library.
 
-%description static -l pl
-DDCcontrol jest programem s³u¿±cym do kontroli parametrów monitora
-takich jak jaskrawo¶æ i kontrast, bez u¿ywania OSD i przycisków na
-obudowie monitora. Ten pakiet zawiera biblioteki statyczne.
+%description static -l pl.UTF-8
+Biblioteka statyczna ddccontrol.
 
 %prep
 %setup -q -a 1
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
+%{__intltoolize}
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure \
-       --disable-gnome-applet
+       %{!?with_gtk:--disable-gnome} \
+       %{!?with_gnome:--disable-gnome-applet} \
+       %{!?with_static_libs:--disable-static}
 %{__make}
 cd %{ddcdb}
 %configure
@@ -98,34 +134,56 @@ cd %{ddcdb}
 rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
-cd %{ddcdb}
-%{__make} install \
+
+%{__make} -C %{ddcdb} install \
         DESTDIR=$RPM_BUILD_ROOT
 
+%find_lang %{name} --all-name
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files
+%post  libs -p /sbin/ldconfig
+%postun        libs -p /sbin/ldconfig
+
+%files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog NEWS README TODO
+%doc AUTHORS ChangeLog NEWS README TODO doc/html
 %attr(755,root,root) %{_bindir}/ddccontrol
 %attr(755,root,root) %{_bindir}/ddcpci
+%{_datadir}/ddccontrol-db
+%{_mandir}/man1/ddccontrol.1*
+
+%if %{with gtk}
+%files gtk
+%defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/gddccontrol
-%{_desktopdir}/*
-%{_pixmapsdir}/*
-%{_datadir}/locale/*/*/*
-%{_datadir}/ddccontrol-db/*
+%{_desktopdir}/gddccontrol.desktop
+%{_pixmapsdir}/gddccontrol.png
+%{_mandir}/man1/gddccontrol.1*
+%endif
+
+%if %{with gnome}
+%files applet
+%defattr(644,root,root,755)
+%dir %{_libdir}/ddccontrol
+%attr(755,root,root) %{_libdir}/ddccontrol/ddcc-applet
+%{_datadir}/ddccontrol
+%{_libdir}/bonobo/servers/*
+%endif
 
 %files libs
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.so.*
+%attr(755,root,root) %{_libdir}/libddccontrol.so.*.*.*
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/*.so
-%{_libdir}/*.la
-%{_includedir}/*
+%attr(755,root,root) %{_libdir}/libddccontrol.so
+%{_libdir}/libddccontrol.la
+%{_includedir}/ddccontrol
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/*.a
+%{_libdir}/libddccontrol.a
+%endif
This page took 0.089205 seconds and 4 git commands to generate.