[ddccontrol] Initial import (#852893)

Jaroslav Škarvada jskarvad at fedoraproject.org
Mon Sep 17 14:37:40 UTC 2012


commit 7e62ab800770f0610bdae5c258d94c2734702831
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date:   Mon Sep 17 16:34:05 2012 +0200

    Initial import (#852893)

 .gitignore                       |    1 +
 ddccontrol-autopoint.patch       |   23 +++++
 ddccontrol-modules-autoload.conf |    2 +
 ddccontrol.spec                  |  164 ++++++++++++++++++++++++++++++++++++++
 sources                          |    1 +
 5 files changed, 191 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..59273e1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+ddccontrol-*.tar.bz2
diff --git a/ddccontrol-autopoint.patch b/ddccontrol-autopoint.patch
new file mode 100644
index 0000000..95805a7
--- /dev/null
+++ b/ddccontrol-autopoint.patch
@@ -0,0 +1,23 @@
+diff -up ddccontrol-0.4.2/autogen.sh.orig ddccontrol-0.4.2/autogen.sh
+--- ddccontrol-0.4.2/autogen.sh.orig	2012-08-03 10:57:29.000000000 +0200
++++ ddccontrol-0.4.2/autogen.sh	2012-09-04 16:57:13.280484179 +0200
+@@ -4,7 +4,7 @@ echo "Running libtoolize..."
+ libtoolize --copy --force --automake
+ 
+ echo "Running gettextize..."
+-gettextize --copy --force --no-changelog
++autopoint -f
+ mv Makefile.am~ Makefile.am
+ 
+ echo "Running intltoolize..."
+diff -up ddccontrol-0.4.2/configure.ac.orig ddccontrol-0.4.2/configure.ac
+--- ddccontrol-0.4.2/configure.ac.orig	2012-09-04 15:18:12.000000000 +0200
++++ ddccontrol-0.4.2/configure.ac	2012-09-04 17:05:17.824245453 +0200
+@@ -1,6 +1,7 @@
+ AC_INIT([DDC/CI control tool], [0.4.2],
+         [DDCControl users list <ddccontrol-users at lists.sourceforge.net>],
+         [ddccontrol])
++AM_GNU_GETTEXT_VERSION(0.18.1)
+ AM_CONFIG_HEADER(src/config.h)
+ AM_INIT_AUTOMAKE
+ 
diff --git a/ddccontrol-modules-autoload.conf b/ddccontrol-modules-autoload.conf
new file mode 100644
index 0000000..fe0b6b5
--- /dev/null
+++ b/ddccontrol-modules-autoload.conf
@@ -0,0 +1,2 @@
+# Load i2c-dev.ko at boot
+i2c-dev
diff --git a/ddccontrol.spec b/ddccontrol.spec
new file mode 100644
index 0000000..485fdc6
--- /dev/null
+++ b/ddccontrol.spec
@@ -0,0 +1,164 @@
+%global git_commit c3af663de0ebae2d899469f2de7f9a4a128ff5ed
+%global git_date 20120904
+
+%global git_short_commit %(echo %{git_commit} | cut -c -8)
+%global git_suffix %{git_date}git%{git_short_commit}
+
+# git clone git://ddccontrol.git.sourceforge.net/gitroot/ddccontrol/%%{name}
+# cd %%{name}
+# git archive --format=tar --prefix=%%{name}-%%{version}/ %%{git_commit} | \
+# bzip2 > ../%%{name}-%%{version}-%%{git_suffix}.tar.bz2
+
+
+Name:             ddccontrol
+URL:              http://ddccontrol.sourceforge.net/
+Version:          0.4.2
+Release:          3.%{git_suffix}%{?dist}
+License:          GPLv2+
+BuildRequires:    gtk2-devel, pkgconfig, pciutils-devel, desktop-file-utils
+BuildRequires:    perl(XML::Parser), gettext, libtool, libxml2-devel, tidy
+BuildRequires:    libX11-devel, xml-common, libxslt, libXt-devel
+BuildRequires:    docbook-style-xsl, gettext-devel, intltool
+Requires:         ddccontrol-db
+Requires(post):   /sbin/modprobe
+Requires(post):   /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+Group:            Applications/System
+Summary:          Control your monitor by software using the DDC/CI protocol
+#Source0:          http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
+Source0:          %{name}-%{version}-%{git_suffix}.tar.bz2
+# autoload i2c-dev module
+Source1:          %{name}-modules-autoload.conf
+# use autopoint instead of gettextize that is interactive tool
+Patch0:           %{name}-autopoint.patch
+
+%description
+DDCcontrol is a program to control monitor parameters, like brightness and
+contrast, by software, i.e. without using the OSD (On Screen Display) and
+the monitor HW controls.
+
+%package gtk
+Summary:        GTK GUI for ddccontrol
+Group:          Applications/System
+Requires:       %{name}%{?_isa} = %{version}-%{release}
+Requires:       bluecurve-cursor-theme, hicolor-icon-theme
+
+%description gtk
+This package provides the GTK graphical user interface for ddccontrol.
+
+%package doc
+Summary:        Documentation files for ddccontrol
+Group:          Applications/System
+Requires:       %{name} = %{version}-%{release}
+BuildArch:      noarch
+
+%description doc
+Documentation files for ddccontrol.
+
+%package devel
+Summary:        Development files for ddccontrol
+Group:          Applications/System
+Requires:       %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+Development files for ddccontrol.
+
+%prep
+%setup -q
+%patch0 -p1 -b .autopoint
+
+./autogen.sh
+
+%build
+# applet is not supported on Gnome 3
+%configure --enable-doc --disable-gnome-applet --prefix=%{_prefix} \
+  --exec-prefix=%{_exec_prefix} --disable-rpath
+
+# kill rpaths
+sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
+sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+
+# use as-needed to remove unused-direct-shlib-dependency
+sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
+
+make %{?_smp_mflags}
+
+%install
+make install DESTDIR=%{buildroot} libdir=%{_libdir}
+
+desktop-file-validate %{buildroot}%{_datadir}/applications/gddccontrol.desktop
+
+# autoload i2c-dev module
+install -m 644 -D %{SOURCE1} %{buildroot}%{_prefix}/lib/modules-load.d/%{name}.conf
+
+# fix docs
+mv %{buildroot}%{_docdir}/%{name} %{buildroot}%{_docdir}/%{name}-%{version}
+
+# move html to subdir
+mkdir %{buildroot}%{_docdir}/%{name}-%{version}/html
+mv %{buildroot}%{_docdir}/%{name}-%{version}/*.html %{buildroot}%{_docdir}/%{name}-%{version}/html
+
+# remove static and *.la files
+rm -f %{buildroot}%{_libdir}/{*.a,*.la}
+
+%find_lang %{name}
+
+%post
+/sbin/ldconfig
+
+# autoload i2c-dev module
+/sbin/modprobe i2c-dev &>/dev/null || :
+
+%postun -p /sbin/ldconfig
+
+%post gtk
+/bin/touch --no-create %{_datadir}/icons/{hicolor,Bluecurve} &>/dev/null || :
+
+%postun gtk
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /bin/touch --no-create %{_datadir}/icons/Bluecurve &>/dev/null
+    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
+    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/Bluecurve &>/dev/null || :
+fi
+
+%posttrans gtk
+/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
+/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/Bluecurve &>/dev/null || :
+
+%files -f %{name}.lang
+%doc AUTHORS COPYING NEWS README TODO
+%exclude %{_docdir}/%{name}-%{version}/html
+%{_bindir}/ddccontrol
+%attr(0755,root,root) %{_bindir}/ddcpci
+%{_prefix}/lib/modules-load.d/%{name}.conf
+%{_libdir}/lib*.so.*
+%{_mandir}/man1/ddccontrol.1*
+
+%files gtk
+%{_bindir}/gddccontrol
+%{_mandir}/man1/gddccontrol.1*
+%{_datadir}/icons/*
+%{_datadir}/applications/*
+
+%files doc
+%doc %{_docdir}/%{name}-%{version}/html
+
+%files devel
+%{_includedir}/%{name}
+%{_libdir}/lib*.so
+%{_libdir}/pkgconfig
+
+%changelog
+* Tue Sep 04 2012 Jaroslav Škarvada <jskarvad at redhat.com> - 0.4.2-3.20120904gitc3af663d
+- Rebased to latest git head
+
+* Tue Sep 04 2012 Jaroslav Škarvada <jskarvad at redhat.com> - 0.4.2-2
+- Desktop file and icon moved to gtk subpackage
+- Man pages are no longer explicitly gzipped
+- Config for modules autoload moved to /usr/lib/modules-load.d
+- Fixed requirements for gtk subpackage
+- Fixed unused-direct-shlib-dependency
+
+* Wed Aug 29 2012 Jaroslav Škarvada <jskarvad at redhat.com> - 0.4.2-1
+- Initial version
diff --git a/sources b/sources
index e69de29..bfb5bb9 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+67f0815be8d6db2704784439e2bc0ec3  ddccontrol-0.4.2-20120904gitc3af663d.tar.bz2


More information about the scm-commits mailing list