Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: timvideos/HDMI2USB-mode-switch
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 10c5e72310ce
Choose a base ref
...
head repository: timvideos/HDMI2USB-mode-switch
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d6193ed2b16f
Choose a head ref
  • 7 commits
  • 8 files changed
  • 1 contributor

Commits on Aug 10, 2016

  1. Only remove file if it exists.

    mithro committed Aug 10, 2016
    Copy the full SHA
    6a108a3 View commit details
  2. Copy the full SHA
    6524b6e View commit details
  3. Copy the full SHA
    68a689e View commit details
  4. Copy the full SHA
    f2522c6 View commit details
  5. Clean up other cruft.

    mithro committed Aug 10, 2016
    Copy the full SHA
    20b9d84 View commit details
  6. pep8 fixes.

    mithro committed Aug 10, 2016
    Copy the full SHA
    a04fb3f View commit details

Commits on Aug 11, 2016

  1. Merge pull request #32 from mithro/debian

    Initial (crappy) Debian packaging
    mithro authored Aug 11, 2016
    Copy the full SHA
    d6193ed View commit details
Showing with 97 additions and 5 deletions.
  1. +5 −0 .gitignore
  2. +2 −2 Makefile
  3. +5 −0 debian/changelog
  4. +1 −0 debian/compat
  5. +43 −0 debian/control
  6. +28 −0 debian/rules
  7. +3 −0 debian/substvars
  8. +10 −3 setup.py
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -56,9 +56,14 @@ docs/_build/
# PyBuilder
target/

# Debian stuff
debian/files
debian/hdmi2usb-mode-switch*

# conda
Miniconda3-latest-Linux-x86_64.sh
conda

# Helper util.
bin/unbind-helper

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ check-unbind-helper:
@[ "$$(stat -c "%a %U" bin/unbind-helper)" = "4755 root" ]

clean-unbind-helper:
sudo rm bin/unbind-helper
if [ -e bin/unbind-helper ]; then sudo rm bin/unbind-helper; fi

# udev rules
install-udev:
@@ -94,7 +94,7 @@ update-usb-ids:
clean:
make clean-conda
make clean-unbind-helper
make uninstall-udev
git clean -d -x -f

setup:
if ! make check-conda; then \
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
hdmi2usb-mode-switch (0.0.0) unstable; urgency=low

* Initial (dirty) packaging.

-- Tim 'mithro' Ansell <mithro@mithis.com> Mon, 09 Dec 2013 02:58:24 +0000
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
43 changes: 43 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Source: hdmi2usb-mode-switch
Section: admin
Priority: optional
Maintainer: Tim 'mithro' Ansell <mithro@mithis.com>
Build-Depends: debhelper (>= 9), dh-python, build-essential, git-buildpackage, python3-setuptools
Standards-Version: 3.9.5
X-Python3-Version: >= 3.2
Homepage: https://hdmi2usb.tv/
Vcs-Git: https://github.com/timvideos/HDMI2USB-mode-switch.git

Package: hdmi2usb-mode-switch
Priority: extra
Architecture: all
Recommends: openocd
Depends: ${python:Depends}, ${misc:Depends}, fxload
Description: HDMI2USB mode-switch tool
${Description}
.
Tool for changing the operating mode of HDMI2USB devices.
.
${Requirement}

Package: hdmi2usb-mode-switch-unbind-helper
Architecture: linux-any
Depends: ${misc:Depends}
Suggests: hdmi2usb-mode-switch-udev
Description: HDMI2USB mode-switch driver unbinding helper
${Description}
.
Tool to allow non-root users to unbind drivers from USB devices.
.
${Requirement}

Package: hdmi2usb-mode-switch-udev
Architecture: all
Suggests: hdmi2usb-mode-switch-unbind-helper
Description: HDMI2USB udev rules
${Description}
.
This package provides a udev rules files for HDMI2USB devices.
.
${Requirement}

28 changes: 28 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export PYBUILD_NAME=hdmi2usb.modeswitch

include /usr/share/dpkg/pkg-info.mk

%:
dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_install:
python3 setup.py install --root=$(CURDIR)/debian/$(DEB_SOURCE) --install-layout=deb
# udev rules
mkdir -p $(CURDIR)/debian/$(DEB_SOURCE)-udev/lib/udev/rules.d/
cp udev/*.rules $(CURDIR)/debian/$(DEB_SOURCE)-udev/lib/udev/rules.d/
install --mode=0755 --owner=root --group=root udev/hdmi2usb-human-path-helper.sh $(CURDIR)/debian/$(DEB_SOURCE)-udev/lib/udev/rules.d/
sed -i -e's-/etc/udev/rules.d/-/lib/udev/rules.d/-' $(CURDIR)/debian/$(DEB_SOURCE)-udev/lib/udev/rules.d/*
# unbind-helper
gcc -Wall -std=c99 unbind-helper.c -o debian/unbind-helper
mkdir -p $(CURDIR)/debian/$(DEB_SOURCE)-unbind-helper/usr/sbin/
install --mode=4755 --owner=root --group=root debian/unbind-helper $(CURDIR)/debian/$(DEB_SOURCE)-unbind-helper/usr/sbin/
rm debian/unbind-helper

# Include the same text at the beginning of the extended description of
# each package, and the same requirement at the end.
override_dh_gencontrol:
dh_gencontrol -- -Tdebian/substvars
3 changes: 3 additions & 0 deletions debian/substvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Description=Tool for changing the operating mode of HDMI2USB devices.

Requirement=OpenOCD and fxload
13 changes: 10 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env python3
# vim: set ts=4 sw=4 et sts=4 ai:

import sys
from setuptools import setup
from setuptools import find_packages
from setuptools import setup
import os
import sys

import versioneer

@@ -12,6 +13,12 @@
raise SystemExit("You need Python 3.3+")


if os.environ.get('PYBUILD_NAME'):
setup_requires = []
else:
setup_requires = ['setuptools-pep8']


setup(
name="hdmi2usb.modeswitch",
version=versioneer.get_version(),
@@ -47,7 +54,7 @@
# ('/etc/udev/rules.d/', os.listdir(udev,
# "*-hdmi2usb-*.rules", "hdmi2usb-*.sh"),
# ],
setup_requires=['setuptools-pep8'],
setup_requires=setup_requires,
include_package_data=True,
entry_points={
"console_scripts": [x+"=hdmi2usb.modeswitch.cli:main" for x in (