]> git.pld-linux.org Git - packages/ddccontrol.git/blobdiff - ddccontrol.spec
- fixed linking with pciutils
[packages/ddccontrol.git] / ddccontrol.spec
index f48d10f1abc87bfd2f60370835c9287d541e50ea..2d155e30f029a932b90e9acceb5fb66aea7cb293 100644 (file)
@@ -1,28 +1,38 @@
-%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 20060730
 %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):   DDCcontrol - narzêdzie do regulacji parametrów monitora
 Name:          ddccontrol
-Version:       0.4.1
+Version:       0.4.2
 Release:       1
-License:       GPL
+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: eaf9189e2f29d14b52cce104aaf3144b
+Patch0:                %{name}-desktop.patch
+Patch1:                %{name}-gnome.patch
+Patch2:                %{name}-pl.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
@@ -31,64 +41,87 @@ 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
+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):   Graficzny interfejs GTK+ dla ddccontrol
+Group:         X11/Applications
+Requires:      %{name} = %{version}-%{release}
+
+%description gtk
+GTK+ GUI for ddccontrol.
+
+%description gtk -l pl
+Graficzny interfejs GTK+ dla ddccontrol.
+
+%package applet
+Summary:       GNOME applet for ddccontrol
+Summary(pl):   Aplet GNOME dla ddccontrol
+Group:         X11/Applications
+Requires:      %{name} = %{version}-%{release}
+
+%description applet
+GNOME applet for ddccontrol.
+
+%description applet -l pl
+Aplet GNOME dla ddccontrol.
+
 %package libs
-Summary:       ddccontrol libraries
-Summary(pl):   Pliki niezbêdne programistom dla ddccontrol
+Summary:       ddccontrol library
+Summary(pl):   Biblioteka ddccontrol
 Group:         Libraries
-Requires:      %{name} = %{version}-%{release}
 
 %description libs
-DDCcontrol libraries.
+DDCcontrol library.
 
 %description libs -l pl
-Biblioteki do DDCcontrol.
+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):   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.
+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):   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.
+Biblioteka statyczna ddccontrol.
 
 %prep
 %setup -q -a 1
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
+%{__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,33 +131,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/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.091449 seconds and 4 git commands to generate.