--- nvidia-settings-319-319.32.orig/debian/rules +++ nvidia-settings-319-319.32/debian/rules @@ -0,0 +1,130 @@ +#!/usr/bin/make -f +# +# Copyright (C) 2009 Canonical Ltd. + +PKG_flavour := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p' | sed 's/nvidia\-settings\-//g') +PKG_name := nvidia-settings-$(PKG_flavour) +PKG_version := $(shell dpkg-parsechangelog | awk -F' ' '/^Version:/ {print $$2}' | awk -F- '{print $$1}') +PKG_source := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p') +bindir := /usr/bin +libdir := /usr/lib +includedir := /usr/include +PKG_bindir := $(libdir)/$(PKG_name)/bin +PKG_libdir := $(libdir)/$(PKG_name) +PKG_includedir := $(PKG_libdir)/include +datadir := /usr/share +PKG_datadir := $(datadir)/$(PKG_name) +libdir := /usr/lib +includedir := /usr/include +sysconfdir := /etc +PKG_libdir := $(libdir)/$(PKG_name) +PKG_bindir := $(PKG_libdir)/bin +PKG_deskdir := $(PKG_datadir) +PKG_configdir := $(PKG_libdir) +ld_so_conf_dir := $(PKG_configdir) +ld_so_conf_file := ld.so.conf +ld_so_conf_path := $(ld_so_conf_dir)/$(ld_so_conf_file) +mandir := /usr/share/man/man1 +PKG_mandir := $(PKG_libdir)/share/man/man1 +url := http://cgit.freedesktop.org/~aplattner/nvidia-settings/snapshot +tarball := nvidia-settings-$(PKG_version).tar.gz +file_url := $(url)/$(tarball) + + +# Priority of the alternative +alt_priority := 9701 + +.PHONY: download-sources +download-sources: + # Remove any previous extracted tarball + find . -maxdepth 1 \( ! -iname 'debian' ! -iname '.*' ! -iname '..*' \) | xargs rm -rf + # Downloads the new tarball from NVIDIA's website + wget -c $(file_url) -P ../ + tar -xzvf ../$(tarball) --strip 1 + +.PHONY: regen-from-templates +regen-from-templates: + #Create important strings + for i in control \ + dirs \ + postrm \ + postinst \ + prerm; do \ + sed -e "s|#LIBDIR#|$(libdir)|g" \ + -e "s|#BINDIR#|$(bindir)|g" \ + -e "s|#VERSION#|$(PKG_version)|g" \ + -e "s|#SYSCONFDIR#|$(sysconfdir)|g" \ + -e "s|#MANDIR#|$(mandir)|g" \ + -e "s|#PKGMANDIR#|$(PKG_mandir)|g" \ + -e "s|#LDSOCONF#|$(ld_so_conf_path)|g" \ + -e "s|#ALTPRIORITY#|$(alt_priority)|g" \ + -e "s|#DATADIR#|$(datadir)|g" \ + -e "s|#PKGDESKDIR#|$(PKG_deskdir)|g" \ + -e "s|#PKGDATADIR#|$(PKG_datadir)|g" \ + -e "s|#PKGCONFIGDIR#|$(PKG_configdir)|g" \ + -e "s|#PKGBINDIR#|$(PKG_bindir)|g" \ + -e "s|#PKGLIBDIR#|$(PKG_libdir)|g" \ + -e "s|#PKGNAME#|$(PKG_name)|g" \ + -e "s|#FLAVOUR#|$(PKG_flavour)|g" \ + -e "s|#SRCNAME#|$(PKG_source)|g" \ + -e "s|#INCLUDEDIR#|$(includedir)|g" \ + -e "s|#PKGINCLUDEDIR#|$(PKG_includedir)|g" \ + debian/$$i.in > debian/$$i; \ + done + +build: build-arch +build-arch: regen-from-templates + dh_quilt_patch + + $(MAKE) -C src/libXNVCtrl EXTINCSRC=/usr/include/X11/extensions \ + CFLAGS="$(CFLAGS) -fPIC" PREFIX=$(PKG_libdir) + $(MAKE) + dh build + + +clean: regen-from-templates + -$(MAKE) -C src/libXNVCtrl distclean 2>/dev/null + -$(MAKE) clean + if [ -e src/XF86Config-parser/Makefile ]; then \ + $(MAKE) -C src/XF86Config-parser clean; \ + fi + + rm -Rf $(CURDIR)/_out + + dh_quilt_unpatch + + dh clean + +binary-arch: + #dh_auto_install -- prefix=$(CURDIR)/debian/$(PKG_name)$(PKG_libdir) + $(MAKE) PREFIX=$(CURDIR)/debian/$(PKG_name)$(PKG_libdir) install + dh_install -p$(PKG_name) src/libXNVCtrl/libXNVCtrl.a "$(PKG_libdir)" + dh_install -p$(PKG_name) src/libXNVCtrl/NVCtrl.h "$(PKG_includedir)/NVCtrl" + dh_install -p$(PKG_name) src/libXNVCtrl/NVCtrlLib.h "$(PKG_includedir)/NVCtrl" + + # ld.so.conf + dh_installdirs -p$(PKG_name) "$(ld_so_conf_dir)" + echo "$(PKG_libdir)" > "$(CURDIR)/debian/$(PKG_name)$(ld_so_conf_path)" + + #Run the normal stuff + dh binary-arch + +binary: binary-arch binary-indep ; + #Run the normal stuff + dh binary + +override_dh_auto_install: + dh_auto_install -- DESTDIR=$(CURDIR)/debian/$(PKG_name)$(PKG_libdir) + +override_dh_installman: + dh_installman + + # Rename the man pages in order to use alternatives + mv $(CURDIR)/debian/$(PKG_name)$(PKG_libdir)/share/man/man1/nvidia-settings.1.gz \ + $(CURDIR)/debian/$(PKG_name)$(PKG_libdir)/share/man/man1/alt-$(PKG_name).1.gz + +override_dh_usrlocal: + rm -Rf $(CURDIR)/debian/$(PKG_name)/usr/local + +%: + dh $@ --with quilt --- nvidia-settings-319-319.32.orig/debian/dirs +++ nvidia-settings-319-319.32/debian/dirs @@ -0,0 +1,3 @@ +/usr/bin +/usr/lib +/usr/include --- nvidia-settings-319-319.32.orig/debian/dirs.in +++ nvidia-settings-319-319.32/debian/dirs.in @@ -0,0 +1,3 @@ +#BINDIR# +#LIBDIR# +#INCLUDEDIR# --- nvidia-settings-319-319.32.orig/debian/copyright +++ nvidia-settings-319-319.32/debian/copyright @@ -0,0 +1,198 @@ +This package was debianized by Randall Donald on +Wed, 30 Jun 2004 16:45:52 -0700. + +It was downloaded from ftp://download.nvidia.com/XFree86/nvidia-settings/ + +Upstream Author: NVIDIA Corporation + +Copyright: + +Copyright (C) 2004-2005 NVIDIA Corporation. + +some files (see below for a complete list): +Copyright (c) 1997-2003 by The XFree86 Project, Inc. +Copyright (c) 1997 Metro Link Incorporated +Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2004 Red Hat Inc., Raleigh, North Carolina. + + +This program is free software; you can redistribute it and/or +modify it under the terms of Version 2 of the GNU General Public +License as published by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See Version 2 +of the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the: + + Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA + + +On Debian GNU/Linux systems the full text of Version 2 the GPL maybe be found +in /usr/share/common-licenses/GPL-2 + +These files fall under a different (less restrictive) license: +../src/XF86Config-parser/Device.c +../src/XF86Config-parser/Keyboard.c +../src/XF86Config-parser/Layout.c +../src/XF86Config-parser/Merge.c +../src/XF86Config-parser/Module.c +../src/XF86Config-parser/Monitor.c +../src/XF86Config-parser/Pointer.c +../src/XF86Config-parser/Scan.c +../src/XF86Config-parser/Screen.c +../src/XF86Config-parser/Vendor.c +../src/XF86Config-parser/Video.c +../src/XF86Config-parser/Write.c +../src/XF86Config-parser/Configint.h +../src/XF86Config-parser/Files.c +../src/XF86Config-parser/Flags.c +../src/XF86Config-parser/xf86Parser.h +../src/XF86Config-parser/xf86tokens.h + + * Copyright (c) 1997 Metro Link Incorporated + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Metro Link shall not be + * used in advertising or otherwise to promote the sale, use or other dealings + * in this Software without prior written authorization from Metro Link. + * + */ +/* + * Copyright (c) 1997-2003 by The XFree86 Project, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of the copyright holder(s) + * and author(s) shall not be used in advertising or otherwise to promote + * the sale, use or other dealings in this Software without prior written + * authorization from the copyright holder(s) and author(s). + */ + +and: +../src/XF86Config-parser/DRI.c: + +/* DRI.c -- DRI Section in XF86Config file + * Created: Fri Mar 19 08:40:22 1999 by faith@precisioninsight.com + * Revised: Thu Jun 17 16:08:05 1999 by faith@precisioninsight.com + * + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + +and also: +../src/XF86Config-parser/Extensions.c: + * Copyright 2004 Red Hat Inc., Raleigh, North Carolina. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +../src/XF86Config-parser/configProcs.h +/* + * Copyright (c) 1997-2001 by The XFree86 Project, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of the copyright holder(s) + * and author(s) shall not be used in advertising or otherwise to promote + * the sale, use or other dealings in this Software without prior written + * authorization from the copyright holder(s) and author(s). + */ + +The packaging is a derived work of the upstream source, and hence falls under +the GPL-2 as weel (see usr/share/common-licenses/GPL-2). --- nvidia-settings-319-319.32.orig/debian/compat +++ nvidia-settings-319-319.32/debian/compat @@ -0,0 +1 @@ +7 --- nvidia-settings-319-319.32.orig/debian/prerm +++ nvidia-settings-319-319.32/debian/prerm @@ -0,0 +1,22 @@ +#!/bin/sh +# prerm script for nvidia-settings-319 +# +# Copyright (C) 2011 Canonical Ltd +# Authors: Alberto Milone + + +PACKAGE_NAME=nvidia-settings-319 + +case "$1" in + remove) + update-alternatives --remove nvidia_setting_conf /usr/lib/nvidia-settings-319/ld.so.conf + + # Trigger gmenu so as to update the gnome menu + dpkg-trigger --by-package=$PACKAGE_NAME gmenucache || true + + # explicit ldconfig due to alternatives + ldconfig + ;; +esac + +#DEBHELPER# --- nvidia-settings-319-319.32.orig/debian/control +++ nvidia-settings-319-319.32/debian/control @@ -0,0 +1,35 @@ +Source: nvidia-settings-319 +Section: contrib/x11 +Priority: optional +XSBC-Original-Maintainer: Debian NVIDIA Maintainers +Maintainer: Ubuntu MOTU Developers +Uploaders: Randall Donald +Build-Depends: debhelper (>= 7), m4, libgtk2.0-dev, libxext-dev, xutils-dev, libxrandr-dev, + libgl1-mesa-dev | libgl-dev, libxxf86vm-dev, libxv-dev, libvdpau-dev, quilt +Standards-Version: 3.8.0 +Vcs-Git: git://github.com/tseliot/nvidia-settings.git +Vcs-Browser: http://github.com/tseliot/nvidia-settings + +Package: nvidia-settings-319 +Architecture: i386 amd64 lpia +Depends: python-gtk2, pkg-config, screen-resolution-extra (>= 0.12), + libvdpau1, ${shlibs:Depends}, ${misc:Depends} +Conflicts: libxnvctrl-dev, nvidia-settings-binary +Replaces: libxnvctrl-dev, nvidia-settings-binary +Provides: nvidia-settings-binary +Description: Tool for configuring the NVIDIA graphics driver + The nvidia-settings utility is a tool for configuring the NVIDIA + Linux graphics driver. It operates by communicating with the NVIDIA + X driver, querying and updating state as appropriate. This + communication is done with the NV-CONTROL X extension. + . + Values such as brightness and gamma, XVideo attributes, temperature, + and OpenGL settings can be queried and configured via nvidia-settings. + +Package: nvidia-settings-310 +Architecture: i386 amd64 lpia +Depends: nvidia-settings-319 +Description: Transitional package for nvidia-settings-310 + This is a transitional package for nvidia-settings-310, and can be + safely removed after the installation is complete. + . --- nvidia-settings-319-319.32.orig/debian/examples +++ nvidia-settings-319-319.32/debian/examples @@ -0,0 +1 @@ +samples --- nvidia-settings-319-319.32.orig/debian/postinst +++ nvidia-settings-319-319.32/debian/postinst @@ -0,0 +1,36 @@ +#!/bin/sh +# Copyright (C) 2011 Canonical Ltd +# Authors: Alberto Milone +set -e + +PACKAGE_NAME=nvidia-settings-319 + +case "$1" in + configure) + # Deal with alternatives + update-alternatives --force \ + --install /etc/ld.so.conf.d/nvidia_settings.conf nvidia_settings_conf /usr/lib/nvidia-settings-319/ld.so.conf 9701 \ + --slave /usr/share/man/man1/nvidia-settings.1.gz man_nvidiasettings.gz /usr/lib/nvidia-settings-319/share/man/man1/alt-nvidia-settings-319.1.gz \ + --slave /usr/bin/nvidia-settings nvidia_settings /usr/lib/nvidia-settings-319/bin/nvidia-settings \ + --slave /usr/include/NVCtrl nvctrl_include /usr/lib/nvidia-settings-319/include/NVCtrl \ + --slave /usr/lib/libXNVCtrl.a libxnvctrl.a /usr/lib/nvidia-settings-319/libXNVCtrl.a + + # ldconfig needs to be run immediately as we're changing /etc/ld.so.conf.d/ with + # alternatives. + LDCONFIG_NOTRIGGER=y ldconfig + + # Trigger gmenu so that the icons will show up in the menu + dpkg-trigger --by-package=$PACKAGE_NAME gmenucache || true + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# --- nvidia-settings-319-319.32.orig/debian/postrm +++ nvidia-settings-319-319.32/debian/postrm @@ -0,0 +1,45 @@ +#! /bin/sh +# postrm script for nvidia-settings-319 +# +# see: dh_installdeb(1) +# +# Copyright (C) 2009-2010 Canonical Ltd +# Authors: Alberto Milone + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + remove|purge) + # This should make sure that /usr/lib/nvidia-settings-319 is + # removed even if some links are left. + # See LP: #540143 + rm -Rf /usr/lib/nvidia-settings-319 + ;; + + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 0 + ;; + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# --- nvidia-settings-319-319.32.orig/debian/prerm.in +++ nvidia-settings-319-319.32/debian/prerm.in @@ -0,0 +1,22 @@ +#!/bin/sh +# prerm script for #PKGNAME# +# +# Copyright (C) 2011 Canonical Ltd +# Authors: Alberto Milone + + +PACKAGE_NAME=#PKGNAME# + +case "$1" in + remove) + update-alternatives --remove nvidia_setting_conf #LDSOCONF# + + # Trigger gmenu so as to update the gnome menu + dpkg-trigger --by-package=$PACKAGE_NAME gmenucache || true + + # explicit ldconfig due to alternatives + ldconfig + ;; +esac + +#DEBHELPER# --- nvidia-settings-319-319.32.orig/debian/control.in +++ nvidia-settings-319-319.32/debian/control.in @@ -0,0 +1,35 @@ +Source: #SRCNAME# +Section: contrib/x11 +Priority: optional +XSBC-Original-Maintainer: Debian NVIDIA Maintainers +Maintainer: Ubuntu MOTU Developers +Uploaders: Randall Donald +Build-Depends: debhelper (>= 7), m4, libgtk2.0-dev, libxext-dev, xutils-dev, libxrandr-dev, + libgl1-mesa-dev | libgl-dev, libxxf86vm-dev, libxv-dev, libvdpau-dev, quilt +Standards-Version: 3.8.0 +Vcs-Git: git://github.com/tseliot/nvidia-settings.git +Vcs-Browser: http://github.com/tseliot/nvidia-settings + +Package: #PKGNAME# +Architecture: i386 amd64 lpia +Depends: python-gtk2, pkg-config, screen-resolution-extra (>= 0.12), + libvdpau1, ${shlibs:Depends}, ${misc:Depends} +Conflicts: libxnvctrl-dev, nvidia-settings-binary +Replaces: libxnvctrl-dev, nvidia-settings-binary +Provides: nvidia-settings-binary +Description: Tool for configuring the NVIDIA graphics driver + The nvidia-settings utility is a tool for configuring the NVIDIA + Linux graphics driver. It operates by communicating with the NVIDIA + X driver, querying and updating state as appropriate. This + communication is done with the NV-CONTROL X extension. + . + Values such as brightness and gamma, XVideo attributes, temperature, + and OpenGL settings can be queried and configured via nvidia-settings. + +Package: nvidia-settings-310 +Architecture: i386 amd64 lpia +Depends: #PKGNAME# +Description: Transitional package for nvidia-settings-310 + This is a transitional package for nvidia-settings-310, and can be + safely removed after the installation is complete. + . --- nvidia-settings-319-319.32.orig/debian/postrm.in +++ nvidia-settings-319-319.32/debian/postrm.in @@ -0,0 +1,45 @@ +#! /bin/sh +# postrm script for #PKGNAME# +# +# see: dh_installdeb(1) +# +# Copyright (C) 2009-2010 Canonical Ltd +# Authors: Alberto Milone + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + remove|purge) + # This should make sure that #PKGLIBDIR# is + # removed even if some links are left. + # See LP: #540143 + rm -Rf #PKGLIBDIR# + ;; + + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 0 + ;; + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# --- nvidia-settings-319-319.32.orig/debian/changelog +++ nvidia-settings-319-319.32/debian/changelog @@ -0,0 +1,36 @@ +nvidia-settings-319 (319.32-0ubuntu2) saucy; urgency=low + + * debian/control.in: + - Conflict/replace/provide nvidia-settings-binary. + - Add transitional packages for nvidia-settings-310. + + -- Alberto Milone Thu, 11 Jul 2013 11:09:03 +0200 + +nvidia-settings-319 (319.32-0ubuntu1) saucy; urgency=low + + * New upstream release: + - Updated the nvidia-settings control panel to report + more detailed locking information. + - Fixed a bug that could cause nvidia-settings to + crash when switching VTs after changing some + settings. + - Added a "Prefer Consistent Performance" PowerMizer + Mode to the nvidia-settings control panel, + available on Quadro boards that support this feature. + + -- Alberto Milone Fri, 28 Jun 2013 15:53:23 +0200 + +nvidia-settings-319 (319.23-0ubuntu1) saucy; urgency=low + + * New upstream release: + - Fixed a bug that prevented some drop-down menus + in nvidia-settings from working correctly when + using older versions of GTK+. + + -- Alberto Milone Fri, 31 May 2013 10:45:52 +0200 + +nvidia-settings-319 (319.17-0ubuntu1) saucy; urgency=low + + * Initial release. + + -- Alberto Milone Mon, 20 May 2013 17:25:24 +0200 --- nvidia-settings-319-319.32.orig/debian/postinst.in +++ nvidia-settings-319-319.32/debian/postinst.in @@ -0,0 +1,36 @@ +#!/bin/sh +# Copyright (C) 2011 Canonical Ltd +# Authors: Alberto Milone +set -e + +PACKAGE_NAME=#PKGNAME# + +case "$1" in + configure) + # Deal with alternatives + update-alternatives --force \ + --install #SYSCONFDIR#/ld.so.conf.d/nvidia_settings.conf nvidia_settings_conf #LDSOCONF# #ALTPRIORITY# \ + --slave #MANDIR#/nvidia-settings.1.gz man_nvidiasettings.gz #PKGMANDIR#/alt-#PKGNAME#.1.gz \ + --slave #BINDIR#/nvidia-settings nvidia_settings #PKGBINDIR#/nvidia-settings \ + --slave #INCLUDEDIR#/NVCtrl nvctrl_include #PKGINCLUDEDIR#/NVCtrl \ + --slave #LIBDIR#/libXNVCtrl.a libxnvctrl.a #PKGLIBDIR#/libXNVCtrl.a + + # ldconfig needs to be run immediately as we're changing /etc/ld.so.conf.d/ with + # alternatives. + LDCONFIG_NOTRIGGER=y ldconfig + + # Trigger gmenu so that the icons will show up in the menu + dpkg-trigger --by-package=$PACKAGE_NAME gmenucache || true + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# --- nvidia-settings-319-319.32.orig/debian/docs +++ nvidia-settings-319-319.32/debian/docs @@ -0,0 +1 @@ +doc/*.txt --- nvidia-settings-319-319.32.orig/debian/patches/series +++ nvidia-settings-319-319.32/debian/patches/series @@ -0,0 +1,4 @@ +06_remove_local_prefix.patch +04_nvidia-settings_natty_ftbs.patch +01_allow_dark_themes.dpatch +05_add_polkit_support.patch --- nvidia-settings-319-319.32.orig/debian/patches/01_allow_dark_themes.dpatch +++ nvidia-settings-319-319.32/debian/patches/01_allow_dark_themes.dpatch @@ -0,0 +1,45 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_allow_dark_themes.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Allow nvidia-settings to work with dark backgrounds + +@DPATCH@ +diff -urNad nvidia-settings-173.14.09~/src/gtk+-2.x/ctkglx.c nvidia-settings-173.14.09/src/gtk+-2.x/ctkglx.c +--- nvidia-settings-173.14.09~/src/gtk+-2.x/ctkglx.c 2008-06-05 02:14:03.000000000 -0500 ++++ nvidia-settings-173.14.09/src/gtk+-2.x/ctkglx.c 2008-08-28 16:59:43.000000000 -0500 +@@ -265,8 +265,8 @@ + event = gtk_event_box_new(); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollWin), + GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); +- gtk_widget_modify_fg(event, GTK_STATE_NORMAL, &(event->style->text[GTK_STATE_NORMAL])); +- gtk_widget_modify_bg(event, GTK_STATE_NORMAL, &(event->style->base[GTK_STATE_NORMAL])); ++ //gtk_widget_modify_fg(event, GTK_STATE_NORMAL, &(event->style->text[GTK_STATE_NORMAL])); ++ //gtk_widget_modify_bg(event, GTK_STATE_NORMAL, &(event->style->base[GTK_STATE_NORMAL])); + gtk_container_add(GTK_CONTAINER(event), hbox); + gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollWin), + event); +@@ -349,15 +349,15 @@ + data_table = gtk_table_new(num_fbconfigs, NUM_FBCONFIG_ATTRIBS, FALSE); + event = gtk_event_box_new(); + +- gtk_widget_modify_fg(data_table, GTK_STATE_NORMAL, +- &(data_table->style->text[GTK_STATE_NORMAL])); +- gtk_widget_modify_bg(data_table, GTK_STATE_NORMAL, +- &(data_table->style->base[GTK_STATE_NORMAL])); ++ //gtk_widget_modify_fg(data_table, GTK_STATE_NORMAL, ++ // &(data_table->style->text[GTK_STATE_NORMAL])); ++ //gtk_widget_modify_bg(data_table, GTK_STATE_NORMAL, ++ // &(data_table->style->base[GTK_STATE_NORMAL])); + gtk_container_add (GTK_CONTAINER(event), data_table); +- gtk_widget_modify_fg(event, GTK_STATE_NORMAL, +- &(event->style->text[GTK_STATE_NORMAL])); +- gtk_widget_modify_bg(event, GTK_STATE_NORMAL, +- &(event->style->base[GTK_STATE_NORMAL])); ++ //gtk_widget_modify_fg(event, GTK_STATE_NORMAL, ++ // &(event->style->text[GTK_STATE_NORMAL])); ++ //gtk_widget_modify_bg(event, GTK_STATE_NORMAL, ++ // &(event->style->base[GTK_STATE_NORMAL])); + gtk_container_add(GTK_CONTAINER(data_viewport), event); + + /* Pack the fbconfig header and data tables */ --- nvidia-settings-319-319.32.orig/debian/patches/04_nvidia-settings_natty_ftbs.patch +++ nvidia-settings-319-319.32/debian/patches/04_nvidia-settings_natty_ftbs.patch @@ -0,0 +1,12 @@ +diff -Nurp nvidia-settings.orig/src/Makefile nvidia-settings/src/Makefile +--- nvidia-settings.orig/src/Makefile 2012-05-02 17:06:02.000000000 +0200 ++++ nvidia-settings/src/Makefile 2012-05-17 09:09:32.341638054 +0200 +@@ -51,7 +51,7 @@ ifndef GTK_CFLAGS + endif + + ifndef GTK_LDFLAGS +- GTK_LDFLAGS := $(shell $(PKG_CONFIG) --libs gtk+-2.0) ++ GTK_LDFLAGS := $(shell $(PKG_CONFIG) --libs gtk+-2.0) -ldl + endif + + --- nvidia-settings-319-319.32.orig/debian/patches/02_nvidia-settings-format-string.patch +++ nvidia-settings-319-319.32/debian/patches/02_nvidia-settings-format-string.patch @@ -0,0 +1,88 @@ +Index: nvidia-settings-1.0/src/query-assign.c +=================================================================== +--- nvidia-settings-1.0/src/query-assign.c ++++ nvidia-settings-1.0/src/query-assign.c 2009-07-17 04:23:15.528973916 +0300 +@@ -755,7 +755,7 @@ + for (i = 0; targetTypeTable[i].name; i++) { + if (valid.permissions & targetTypeTable[i].permission_bit) { + if (n > 0) c += sprintf(c, ", "); +- c += sprintf(c, targetTypeTable[i].name); ++ c += sprintf(c, "%s", targetTypeTable[i].name); + n++; + } + } +Index: nvidia-settings-1.0/src/gtk+-2.x/ctkdisplayconfig.c +=================================================================== +--- nvidia-settings-1.0/src/gtk+-2.x/ctkdisplayconfig.c ++++ nvidia-settings-1.0/src/gtk+-2.x/ctkdisplayconfig.c 2009-07-17 04:28:06.217972586 +0300 +@@ -653,7 +653,7 @@ + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_NONE, +- msg); ++ "%s", msg); + + gtk_dialog_add_buttons(GTK_DIALOG(dlg), + "Truncate MetaModes", +@@ -4220,7 +4220,7 @@ + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_OK, +- msg); ++ "%s", msg); + + gtk_dialog_run(GTK_DIALOG(dlg)); + gtk_widget_destroy(dlg); +@@ -5850,7 +5850,7 @@ + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_YES_NO, +- msg); ++ "%s", msg); + } else { + msg = g_strdup_printf("Failed to set MetaMode (%d) '%s' " + "(Mode %dx%d, id: %d) on X screen %d.", +@@ -5862,7 +5862,7 @@ + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_OK, +- msg); ++ "%s", msg); + } + + result = gtk_dialog_run(GTK_DIALOG(dlg)); +Index: nvidia-settings-1.0/src/gtk+-2.x/ctkslimm.c +=================================================================== +--- nvidia-settings-1.0/src/gtk+-2.x/ctkslimm.c ++++ nvidia-settings-1.0/src/gtk+-2.x/ctkslimm.c 2009-07-17 04:31:00.462973003 +0300 +@@ -353,7 +353,7 @@ + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_OK, +- err_msg); ++ "%s", err_msg); + + gtk_dialog_run(GTK_DIALOG(dlg)); + gtk_widget_destroy(dlg); +Index: nvidia-settings-1.0/src/gtk+-2.x/ctkutils.c +=================================================================== +--- nvidia-settings-1.0/src/gtk+-2.x/ctkutils.c ++++ nvidia-settings-1.0/src/gtk+-2.x/ctkutils.c 2009-07-17 04:26:44.069972888 +0300 +@@ -106,7 +106,7 @@ + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, +- msg); ++ "%s", msg); + gtk_dialog_run(GTK_DIALOG(dlg)); + gtk_widget_destroy(dlg); + } +@@ -134,7 +134,7 @@ + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_OK, +- msg); ++ "%s", msg); + gtk_dialog_run(GTK_DIALOG(dlg)); + gtk_widget_destroy(dlg); + } --- nvidia-settings-319-319.32.orig/debian/patches/03_do_not_exit_on_no_scanout.patch +++ nvidia-settings-319-319.32/debian/patches/03_do_not_exit_on_no_scanout.patch @@ -0,0 +1,26 @@ +Description: Do not fail if the driver doesn't support NV_CTRL_NO_SCANOUT + NV_CTRL_NO_SCANOUT is not supported by legacy drivers such as series + 173 and 96. Pretending that the property exists and is set to false + prevents nvidia-settings from breaking compatibility with these drivers. +Forwarded: no +Bug: https://bugs.launchpad.net/ubuntu/+source/nvidia-settings/+bug/539196 +Author: Alberto Milone + +diff -Nurp nvidia-settings-195.36.08.orig/src/gtk+-2.x/ctkdisplayconfig-utils.c nvidia-settings-195.36.08/src/gtk+-2.x/ctkdisplayconfig-utils.c +--- nvidia-settings-195.36.08.orig/src/gtk+-2.x/ctkdisplayconfig-utils.c 2010-02-25 14:44:28.000000000 +0100 ++++ nvidia-settings-195.36.08/src/gtk+-2.x/ctkdisplayconfig-utils.c 2010-04-06 19:47:14.335936746 +0200 +@@ -2112,11 +2112,14 @@ static int gpu_add_screen_from_server(nv + /* See if the screen is set to not scanout */ + ret = NvCtrlGetAttribute(screen->handle, NV_CTRL_NO_SCANOUT, &val); + if (ret != NvCtrlSuccess) { ++ /* + *err_str = g_strdup_printf("Failed to query NoScanout for " + "screen %d.", + screen_id); + nv_warning_msg(*err_str); + goto fail; ++ */ ++ val = NV_CTRL_NO_SCANOUT_DISABLED; + } + screen->no_scanout = (val == NV_CTRL_NO_SCANOUT_ENABLED) ? TRUE : FALSE; + --- nvidia-settings-319-319.32.orig/debian/patches/05_add_polkit_support.patch +++ nvidia-settings-319-319.32/debian/patches/05_add_polkit_support.patch @@ -0,0 +1,91 @@ +diff -Nurp nvidia-settings-190.53.orig/src/gtk+-2.x/ctkdisplayconfig-utils.c nvidia-settings-190.53/src/gtk+-2.x/ctkdisplayconfig-utils.c +--- nvidia-settings-190.53.orig/src/gtk+-2.x/ctkdisplayconfig-utils.c 2009-12-09 06:18:39.000000000 +0100 ++++ nvidia-settings-190.53/src/gtk+-2.x/ctkdisplayconfig-utils.c 2009-12-30 15:04:53.089702717 +0100 +@@ -2762,6 +2762,77 @@ static void update_banner(XConfigPtr con + + } /* update_banner() */ + ++/** ubuntu save_xconfig_file() ****************************** ++ * ++ * Calls Screen Resolution Extra (which uses PolicyKit) to save ++ * the X config file text from buf into a file called filename. ++ * If the filename already exists, a backup file named ++ * 'filename.backup' is created. ++ * ++ **/ ++ ++static int ubuntu_save_xconfig_file(SaveXConfDlg *dlg, ++ gchar *filename, char *buf, mode_t mode) ++{ ++ gchar *backup_filename = NULL; ++ int temp_fd; ++ gchar *err_msg = NULL; ++ ++ int ret = 0; ++ gchar *temp_filename; ++ gchar *command; ++ gboolean polkit_status; ++ int status; ++ char *nvidia_polkit = "/usr/share/screen-resolution-extra/nvidia-polkit.py"; ++ ++ if (!buf || !filename) goto done; ++ ++ backup_filename = g_strdup_printf("%s.backup", filename); ++ ++ /* Write out the X config file to a temporary file */ ++ temp_filename = g_strdup_printf("/tmp/nvidia-settings.XXXXXX"); ++ temp_fd = mkstemp(temp_filename); ++ write(temp_fd, buf, strlen(buf)); ++ close(temp_fd); ++ ++ /* Backup the the X config file (if any) and write out the X config ++ * file from the temporary file ++ */ ++ command = g_strconcat("python ", ++ nvidia_polkit, ++ " --write-from=", ++ temp_filename, ++ " --backup-to=", ++ backup_filename, ++ NULL); ++ polkit_status = (g_spawn_command_line_sync(command, NULL, NULL, &status, NULL) && status == 0); ++ g_free(command); ++ ++ /* Remove the temporary file */ ++ unlink(temp_filename); ++ g_free(temp_filename); ++ ++ if (!polkit_status) { ++ err_msg = g_strdup_printf("Unable to open X config file '%s' for writing.", ++ filename); ++ goto done; ++ } ++ ++ ret = 1; ++ ++ done: ++ /* Display any errors that might have occured */ ++ if (err_msg) { ++ ctk_display_error_msg(ctk_get_parent_window(GTK_WIDGET(dlg->parent)), ++ err_msg); ++ g_free(err_msg); ++ } ++ ++ g_free(backup_filename); ++ return ret; ++ ++} /* save_xconfig_file() */ ++ + + + /** save_xconfig_file() ********************************************** +@@ -2782,6 +2853,9 @@ static int save_xconfig_file(SaveXConfDl + + int ret = 0; + ++ ret = ubuntu_save_xconfig_file(dlg, filename, buf, mode); ++ ++ return ret; + + if (!buf || !filename) goto done; + --- nvidia-settings-319-319.32.orig/debian/patches/06_remove_local_prefix.patch +++ nvidia-settings-319-319.32/debian/patches/06_remove_local_prefix.patch @@ -0,0 +1,24 @@ +From 94f4a05935095362bdbd417bf6982c63172a08c2 Mon Sep 17 00:00:00 2001 +From: Alberto Milone +Date: Mon, 3 Sep 2012 14:45:15 +0200 +Subject: [PATCH 1/1] utils.mk: remove local from prefix + +--- + utils.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils.mk b/utils.mk +index b912f98..336007f 100644 +--- a/utils.mk ++++ b/utils.mk +@@ -126,7 +126,7 @@ endif + # the source tarball + ############################################################################## + +-PREFIX ?= /usr/local ++PREFIX ?= /usr + + BINDIR = $(DESTDIR)$(PREFIX)/bin + MANDIR = $(DESTDIR)$(PREFIX)/share/man/man1 +-- +1.7.9.5