From 554234f5a5808227994025bdd6b14ef45a58e13d Mon Sep 17 00:00:00 2001 From: sezanzeb Date: Sun, 29 Nov 2020 17:32:31 +0100 Subject: [PATCH] deb packaging seems to work now --- .gitignore | 1 + README.md | 2 +- scripts/build.sh | 14 ++++---------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 19429107..0ed18a28 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.glade# .idea *.png~ +deb_dist/ # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/README.md b/README.md index aec499f3..4f6045bd 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ pacaur -S key-mapper-git ```bash git clone https://github.com/sezanzeb/key-mapper.git -cd key-mapper && sudo pip install . +sudo pip install key-mapper sudo usermod -a -G plugdev,input $USER ``` diff --git a/scripts/build.sh b/scripts/build.sh index 873346a0..0b0ca2b9 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -2,16 +2,10 @@ build_deb() { # https://github.com/phusion/debian-packaging-for-the-modern-developer/tree/master/tutorial-1 - dist=dist - name=key-mapper-0.1.0 - - python3 setup.py sdist --dist-dir $dist - tar -C $dist -xzf $dist/$name.tar.gz - rm $dist/$name.tar.gz - cp DEBIAN $dist/$name -r - dpkg-deb -b $dist/$name $dist/$name.deb - rm $dist/$name -r - echo "created $dist/$name.deb" + # https://shallowsky.com/blog/programming/python-debian-packages-w-stdeb.html + sudo apt install python3-stdeb fakeroot python3-all dh-python + python3 setup.py --command-packages=stdeb.command bdist_deb + echo "buid_deb done" } build_deb &