This commit is contained in:
Ward Nakchbandi (Cosmic Fusion) 2023-09-30 11:09:09 +03:00 committed by GitHub
parent 563275711c
commit cb4d6f6434
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 238 additions and 99 deletions

95
debian/changelog vendored
View File

@ -1,5 +1,94 @@
upstream-name (pkgver-pkgrel) distro_codename; urgency=medium
switcheroo-control (2.6-100pika1) pikauwu; urgency=medium
* Initial release. (Closes: #nnnn) <nnnn is the bug number of your ITP>
* Add nvidia-vaapi-driver integration patch
-- ferreo <harderthanfire@gmail.com> Wed, 18 Jan 2023 21:48:14 +0000
-- Jeremy Bicha <jbicha@ubuntu.com> Wed, 24 Aug 2022 23:34:40 -0400
switcheroo-control (2.6-1) unstable; urgency=medium
* New upstream release
* Bump debhelper-compat to 13
* Build-Depend on dh-sequence-gnome instead of gnome-pkg-tools
* debian/control.in: Build-Depend on python3-gi
* debian/control.in: Set Rules-Requires-Root: no
* debian/rules: Run tests
* debian/rules: Drop no-longer-needed -Wl,--as-needed
* Bump Standards-Version to 4.6.1
-- Jeremy Bicha <jbicha@ubuntu.com> Wed, 24 Aug 2022 23:34:40 -0400
switcheroo-control (2.4-3) unstable; urgency=medium
* debian/control.in: umockdev is also needed for the tests
-- Sebastien Bacher <seb128@debian.org> Mon, 01 Mar 2021 10:37:10 +0100
switcheroo-control (2.4-2) unstable; urgency=medium
* debian/control.in:
- Build-Depends on gir1.2-umockdev-1.0, python3-dbus, python3-dbusmock,
those are needed for the new tests
-- Sebastien Bacher <seb128@ubuntu.com> Fri, 26 Feb 2021 20:06:27 +0100
switcheroo-control (2.4-1) unstable; urgency=medium
* New upstream version
* Updated for the new upstream build requirements
-- Sebastien Bacher <seb128@ubuntu.com> Fri, 26 Feb 2021 16:17:31 +0100
switcheroo-control (2.1-1) unstable; urgency=medium
* New upstream version
-- Sebastien Bacher <seb128@ubuntu.com> Mon, 13 Jan 2020 15:10:38 +0100
switcheroo-control (2.0-1) unstable; urgency=medium
* debian/watch: update for move from github to freedesktop.org
* New upstream release.
* Revert "* debian/patches/gtk-doc-make.patch:"
* Cherry-pick upstream fix GPUs property variant declaration
* Add libgudev-1.0-dev build-dependency
* Replace configure option udevrulesdir with hwdbdir
-- Andreas Henriksson <andreas@fatal.se> Sun, 15 Dec 2019 12:26:51 +0100
switcheroo-control (1.3.1-2) unstable; urgency=medium
* debian/patches/gtk-doc-make.patch:
- include gtk-doc.make file which is missing from the tarball,
it's needed to be able to autoreconf the source
-- Sebastien Bacher <seb128@ubuntu.com> Wed, 28 Aug 2019 11:12:47 +0200
switcheroo-control (1.3.1-1) unstable; urgency=medium
* New upstream version
- Work-around lack of access to vga_switcheroo when booting with
SecureBoot enabled (lp: #1768988)
-- Sebastien Bacher <seb128@ubuntu.com> Wed, 21 Aug 2019 16:10:03 +0200
switcheroo-control (1.2-2) unstable; urgency=medium
* Build-Depend on debhelper-compat 12 and drop debian/compat
* Add -Wl,-O1 to our LDFLAGS
* Bump Standards-Version to 4.3.0
-- Jeremy Bicha <jbicha@debian.org> Thu, 27 Dec 2018 12:38:04 -0500
switcheroo-control (1.2-1) unstable; urgency=medium
* New upstream release
* Update Vcs fields for migration to https://salsa.debian.org/
* Bump debhelper compat to 11
-- Jeremy Bicha <jbicha@debian.org> Sun, 21 Jan 2018 11:06:48 -0500
switcheroo-control (1.1-1) unstable; urgency=medium
* Initial release (Closes: #857503) (LP: #1671828)
-- Jeremy Bicha <jbicha@ubuntu.com> Tue, 04 Apr 2017 09:34:04 -0400

62
debian/control vendored
View File

@ -1,19 +1,45 @@
Source: upstream-name
Section: admin
Priority: optional
Maintainer: name <email>
Standards-Version: 4.6.1
Build-Depends: debhelper-compat (= 13)
Rules-Requires-Root: no
Package: pkgname1
Architecture: linux-any
# Delete any of these lines if un-used
Depends: ${misc:Depends}, depends
Recommends: high priority optdepends
Conflicts: conflicts
Suggests: low priority optdepends
Breaks: also conflicts!?
Provides: provides
# This file is autogenerated. DO NOT EDIT!
#
Description: pkgdesc
# Modifications should be made to debian/control.in instead.
# This file is regenerated automatically in the clean target.
Source: switcheroo-control
Section: gnome
Priority: optional
Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Uploaders: Jeremy Bicha <jbicha@ubuntu.com>, Sebastien Bacher <seb128@debian.org>
Build-Depends: debhelper-compat (= 13),
dh-sequence-gnome,
gir1.2-umockdev-1.0,
gtk-doc-tools,
libglib2.0-dev,
libgudev-1.0-dev,
libudev-dev,
meson (>= 0.50),
pkg-config (>= 0.22),
python3-gi,
python3-dbus,
python3-dbusmock,
udev,
umockdev,
Standards-Version: 4.6.1
Rules-Requires-Root: no
Vcs-Browser: https://salsa.debian.org/gnome-team/switcheroo-control
Vcs-Git: https://salsa.debian.org/gnome-team/switcheroo-control.git
Homepage: https://github.com/hadess/switcheroo-control
Package: switcheroo-control
Architecture: linux-any
Depends: ${misc:Depends},
${shlibs:Depends}
Description: D-Bus service to check the availability of dual-GPU
For systems that have both an integrated GPU and a dedicated GPU, this
package by default will force the integrated GPU to be used to save power.
.
You can launch individual apps using the dedicated GPU by running them
with the environment variable DRI_PRIME=1. Or you can right-click on the
app (while it's not running) in GNOME Shell's Activities Overview
and choose the "Launch using Dedicated Graphics Card" option.
.
If this default behavior is not appropriate, uninstall this package or
set xdg.force_integrated=0 as a kernel command-line option in your
bootloader.

41
debian/control.in vendored Normal file
View File

@ -0,0 +1,41 @@
Source: switcheroo-control
Section: gnome
Priority: optional
Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Uploaders: @GNOME_TEAM@
Build-Depends: debhelper-compat (= 13),
dh-sequence-gnome,
gir1.2-umockdev-1.0,
gtk-doc-tools,
libglib2.0-dev,
libgudev-1.0-dev,
libudev-dev,
meson (>= 0.50),
pkg-config (>= 0.22),
python3-gi,
python3-dbus,
python3-dbusmock,
udev,
umockdev,
Standards-Version: 4.6.1
Rules-Requires-Root: no
Vcs-Browser: https://salsa.debian.org/gnome-team/switcheroo-control
Vcs-Git: https://salsa.debian.org/gnome-team/switcheroo-control.git
Homepage: https://github.com/hadess/switcheroo-control
Package: switcheroo-control
Architecture: linux-any
Depends: ${misc:Depends},
${shlibs:Depends}
Description: D-Bus service to check the availability of dual-GPU
For systems that have both an integrated GPU and a dedicated GPU, this
package by default will force the integrated GPU to be used to save power.
.
You can launch individual apps using the dedicated GPU by running them
with the environment variable DRI_PRIME=1. Or you can right-click on the
app (while it's not running) in GNOME Shell's Activities Overview
and choose the "Launch using Dedicated Graphics Card" option.
.
If this default behavior is not appropriate, uninstall this package or
set xdg.force_integrated=0 as a kernel command-line option in your
bootloader.

24
debian/copyright vendored
View File

@ -0,0 +1,24 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: switcheroo-control
Source: https://github.com/hadess/switcheroo-control
Files: *
Copyright: 2016 Bastien Nocera <hadess@hadess.net>
License: GPL-3+
License: GPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
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 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, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-3'.

2
debian/docs vendored Normal file
View File

@ -0,0 +1,2 @@
README.md
NEWS

5
debian/gbp.conf vendored Normal file
View File

@ -0,0 +1,5 @@
[DEFAULT]
pristine-tar = True
debian-branch = debian/master
upstream-branch = upstream/latest
upstream-vcs-tag = %(version)s

88
debian/rules vendored
View File

@ -1,80 +1,18 @@
#!/usr/bin/make -f
## See debhelper(7) (uncomment to enable).
## Output every command that modifies files on the build system.
export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,-z,defs
## === Set paths env vars ===
## Source directory, called upon by $(srcdir)
srcdir = $(shell debian/scripts/get_pwd.sh)
## The Root of package number one, called upon by $(pkgdir1)
pkgdir1 = $(srcdir)/debian/pkgdir1
## The Root of package number two, you can add as many of these as you like
pkgdir2 = $(srcdir)/debian/pkgdir2
## If building a singular package you can remove the number, and as you guessed you call upon it with $(pkgdir)
# pkgdir = $(srcdir)/debian/pkgdir
## === End end of region ===
## === the chain of command ===
## debuild runs a chain of dh functions in the following order:
## dh_testdir
## dh_clean
## dh_auto_clean
## dh_update_autotools_config
## dh_autoreconf
## dh_auto_configure
## dh_prep
## dh_build
## dh_auto_build
## dh_install
## dh_auto_install
## dh_installdocs
## dh_installchangelogs
## dh_perl
## dh_link
## dh_strip_nondeterminism
## dh_compress
## dh_fixperms
## dh_missing
## dh_dwz
## dh_strip
## dh_makeshlibs
## dh_shlibdeps
## dh_installdeb
## dh_gencontrol
## but you are most likely to only need to override the following:
## dh_clean
## dh_auto_configure
## dh_build
## dh_install
## === End end of region ===
## === overriding dh functions ===
## by default all dh functions will run a specific command based on the build system selected by "dh $@"
## if you have a makefile that does everything you need this is fine,
## but most likely you have no MakeFile and you want to add your own commands
## Note : overrides must be places above %:
## So here's a few examples:
## overriding dh_clean to make it not delete rust vendor files:
#override_dh_clean:
# echo "disabled"
## overriding dh_auto_configure to add custom configs:
#override_dh_auto_configure:
# $(srcdir)/configure -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_DATADIR=/usr/share -DCMAKE_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu -DBUILD_PLUGIN=OFF
## overriding dh_install to install files to a package:
#override_dh_auto_configure:
# mkdir -p $(pkgdir1)/usr/bin
# cp $(srcdir)/pikman $(pkgdir1)/usr/bin/
## === End end of region ===
## This here will start the build:
%:
dh $@
override_dh_auto_configure:
dh_auto_configure -- \
-Dgtk_doc=false \
-Dsystemdsystemunitdir=/lib/systemd/system \
-Dhwdbdir=/lib/udev/hwdb.d \
-Dtests=true
execute_before_dh_install:
# The developer documentation isn't very useful
rm -rf debian/switcheroo-control/usr/share/gtk-doc

View File

@ -1,2 +0,0 @@
#! /bin/sh
env | grep -w "PWD" | cut -c5-

2
debian/watch vendored Normal file
View File

@ -0,0 +1,2 @@
version=4
https://gitlab.freedesktop.org/hadess/switcheroo-control/-/tags?sort=updated_desc .*/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@

14
patches/libva-nvidia.diff Normal file
View File

@ -0,0 +1,14 @@
diff '--color=auto' -ru a/src/switcheroo-control.c b/src/switcheroo-control.c
--- a/src/switcheroo-control.c 2022-07-01 12:29:43.000000000 +0300
+++ b/src/switcheroo-control.c 2023-09-30 00:39:37.340679199 +0300
@@ -254,6 +254,10 @@
/* Make sure Vulkan apps always select Nvidia GPUs */
g_ptr_array_add (array, g_strdup ("__VK_LAYER_NV_optimus"));
g_ptr_array_add (array, g_strdup ("NVIDIA_only"));
+
+ /* Make sure LIBVA apps always select Nvidia GPUs */
+ g_ptr_array_add (array, g_strdup ("LIBVA_DRIVER_NAME"));
+ g_ptr_array_add (array, g_strdup ("nvidia"));
} else {
char *id;