From 59211053dc8a3f2241e168be19520efac83ed159 Mon Sep 17 00:00:00 2001 From: fuzzgun Date: Tue, 7 May 2013 10:02:28 +0100 Subject: [PATCH] Changed Debian install directory and run script name based upon issue #135 --- Makefile | 55 +++++++++++++++++++----------------- debian/pybm | 2 +- debian/rules | 32 +++++++++++---------- desktop/pybitmessage.desktop | 2 +- 4 files changed, 48 insertions(+), 43 deletions(-) diff --git a/Makefile b/Makefile index 891bf8c9..91c682c9 100755 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ APP=pybitmessage VERSION=0.3.0 +DEST_SHARE=/usr/share +DEST_APP=$(DEST_SHARE)/$(APP) all: @@ -9,35 +11,36 @@ source: tar -cvzf ../$(APP)_$(VERSION).orig.tar.gz ../$(APP)-$(VERSION) --exclude=.git install: - mkdir -m 755 -p /usr/share/applications - mkdir -m 755 -p /usr/share/applications/$(APP) - mkdir -m 755 -p /usr/share/applications/$(APP)/images - mkdir -m 755 -p /usr/share/applications/$(APP)/pyelliptic - mkdir -m 755 -p /usr/share/applications/$(APP)/socks - mkdir -m 755 -p /usr/share/applications/$(APP)/bitmessageqt - mkdir -m 755 -p /usr/share/pixmaps - mkdir -m 755 -p /usr/share/icons - mkdir -m 755 -p /usr/share/icons/hicolor - mkdir -m 755 -p /usr/share/icons/hicolor/scalable - mkdir -m 755 -p /usr/share/icons/hicolor/scalable/apps - mkdir -m 755 -p /usr/share/icons/hicolor/24x24 - mkdir -m 755 -p /usr/share/icons/hicolor/24x24/apps + mkdir -m 755 -p $(DEST_APP) + mkdir -m 755 -p $(DEST_SHARE)/applications + mkdir -m 755 -p $(DEST_SHARE)/applications/$(APP) + mkdir -m 755 -p $(DEST_APP)/images + mkdir -m 755 -p $(DEST_APP)/pyelliptic + mkdir -m 755 -p $(DEST_APP)/socks + mkdir -m 755 -p $(DEST_APP)/bitmessageqt + mkdir -m 755 -p $(DEST_SHARE)/pixmaps + mkdir -m 755 -p $(DEST_SHARE)/icons + mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor + mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/scalable + mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/scalable/apps + mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/24x24 + mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/24x24/apps - install -m 644 src/*.ui /usr/share/applications/$(APP) - install -m 644 src/*.py /usr/share/applications/$(APP) - install -m 644 src/*.qrc /usr/share/applications/$(APP) + install -m 644 src/*.ui $(DEST_APP) + install -m 644 src/*.py $(DEST_APP) + install -m 644 src/*.qrc $(DEST_APP) - install -m 644 src/images/*.png /usr/share/applications/$(APP)/images - install -m 644 src/images/*.ico /usr/share/applications/$(APP)/images - install -m 644 src/pyelliptic/*.py /usr/share/applications/$(APP)/pyelliptic - install -m 644 src/socks/*.py /usr/share/applications/$(APP)/socks - install -m 644 src/bitmessageqt/*.py /usr/share/applications/$(APP)/bitmessageqt - install -m 755 debian/pybm /usr/bin + install -m 644 src/images/*.png $(DEST_APP)/images + install -m 644 src/images/*.ico $(DEST_APP)/images + install -m 644 src/pyelliptic/*.py $(DEST_APP)/pyelliptic + install -m 644 src/socks/*.py $(DEST_APP)/socks + install -m 644 src/bitmessageqt/*.py $(DEST_APP)/bitmessageqt + install -m 755 debian/pybm /usr/bin/pybitmessage - install -m 644 desktop/$(APP).desktop /usr/share/applications/$(APP)/$(APP).desktop - install -m 644 src/images/can-icon-24px.png /usr/share/icons/hicolor/24x24/apps/$(APP).png - install -m 644 desktop/can-icon.svg /usr/share/icons/hicolor/scalable/apps/$(APP).svg - install -m 644 desktop/can-icon.svg /usr/share/pixmaps/$(APP).svg + install -m 644 desktop/$(APP).desktop $(DEST_SHARE)/applications/$(APP)/$(APP).desktop + install -m 644 src/images/can-icon-24px.png $(DEST_SHARE)/icons/hicolor/24x24/apps/$(APP).png + install -m 644 desktop/can-icon.svg $(DEST_SHARE)/icons/hicolor/scalable/apps/$(APP).svg + install -m 644 desktop/can-icon.svg $(DEST_SHARE)/pixmaps/$(APP).svg clean: rm -rf debian/$(APP) diff --git a/debian/pybm b/debian/pybm index 1d90ee60..d806eedd 100644 --- a/debian/pybm +++ b/debian/pybm @@ -1,4 +1,4 @@ #!/bin/bash -cd /usr/share/applications/pybitmessage +cd /usr/share/pybitmessage python bitmessagemain.py diff --git a/debian/rules b/debian/rules index 2d26c6e8..a5e5f162 100755 --- a/debian/rules +++ b/debian/rules @@ -1,8 +1,9 @@ #!/usr/bin/make -f APP=pybitmessage -DEST_MAIN = $(CURDIR)/debian/$(APP)/usr/bin -DEST_SHARE = $(CURDIR)/debian/$(APP)/usr/share +DEST_MAIN=$(CURDIR)/debian/$(APP)/usr/bin +DEST_SHARE=$(CURDIR)/debian/$(APP)/usr/share +DEST_APP=$(DEST_SHARE)/$(APP) build: build-stamp make @@ -21,12 +22,13 @@ install: build clean dh_installdirs mkdir -m 755 -p $(CURDIR)/debian/$(APP)/usr mkdir -m 755 -p $(CURDIR)/debian/$(APP)/usr/bin + mkdir -m 755 -p $(DEST_APP) mkdir -m 755 -p $(DEST_SHARE)/applications mkdir -m 755 -p $(DEST_SHARE)/applications/$(APP) - mkdir -m 755 -p $(DEST_SHARE)/applications/$(APP)/images - mkdir -m 755 -p $(DEST_SHARE)/applications/$(APP)/pyelliptic - mkdir -m 755 -p $(DEST_SHARE)/applications/$(APP)/socks - mkdir -m 755 -p $(DEST_SHARE)/applications/$(APP)/bitmessageqt + mkdir -m 755 -p $(DEST_APP)/images + mkdir -m 755 -p $(DEST_APP)/pyelliptic + mkdir -m 755 -p $(DEST_APP)/socks + mkdir -m 755 -p $(DEST_APP)/bitmessageqt mkdir -m 755 -p $(DEST_SHARE)/pixmaps mkdir -m 755 -p $(DEST_SHARE)/icons mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor @@ -35,16 +37,16 @@ install: build clean mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/24x24 mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/24x24/apps - install -m 644 $(CURDIR)/src/*.ui $(DEST_SHARE)/applications/$(APP) - install -m 644 $(CURDIR)/src/*.py $(DEST_SHARE)/applications/$(APP) - install -m 644 $(CURDIR)/src/*.qrc $(DEST_SHARE)/applications/$(APP) + install -m 644 $(CURDIR)/src/*.ui $(DEST_APP) + install -m 644 $(CURDIR)/src/*.py $(DEST_APP) + install -m 644 $(CURDIR)/src/*.qrc $(DEST_APP) - install -m 644 $(CURDIR)/src/images/*.png $(DEST_SHARE)/applications/$(APP)/images - install -m 644 $(CURDIR)/src/images/*.ico $(DEST_SHARE)/applications/$(APP)/images - install -m 644 $(CURDIR)/src/pyelliptic/*.py $(DEST_SHARE)/applications/$(APP)/pyelliptic - install -m 644 $(CURDIR)/src/socks/*.py $(DEST_SHARE)/applications/$(APP)/socks - install -m 644 $(CURDIR)/src/bitmessageqt/*.py $(DEST_SHARE)/applications/$(APP)/bitmessageqt - install -m 755 $(CURDIR)/debian/pybm $(DEST_MAIN) + install -m 644 $(CURDIR)/src/images/*.png $(DEST_APP)/images + install -m 644 $(CURDIR)/src/images/*.ico $(DEST_APP)/images + install -m 644 $(CURDIR)/src/pyelliptic/*.py $(DEST_APP)/pyelliptic + install -m 644 $(CURDIR)/src/socks/*.py $(DEST_APP)/socks + install -m 644 $(CURDIR)/src/bitmessageqt/*.py $(DEST_APP)/bitmessageqt + install -m 755 $(CURDIR)/debian/pybm $(DEST_MAIN)/pybitmessage install -m 644 $(CURDIR)/desktop/$(APP).desktop $(DEST_SHARE)/applications/$(APP)/$(APP).desktop install -m 644 $(CURDIR)/src/images/can-icon-24px.png $(DEST_SHARE)/icons/hicolor/24x24/apps/$(APP).png diff --git a/desktop/pybitmessage.desktop b/desktop/pybitmessage.desktop index affd63d1..83da32cd 100644 --- a/desktop/pybitmessage.desktop +++ b/desktop/pybitmessage.desktop @@ -3,7 +3,7 @@ Type=Application Name=PyBitmessage GenericName=PyBitmessage Comment=Send encrypted messages to another person or to many subscribers -Exec=pybm %U +Exec=pybitmessage %U Icon=pybitmessage Terminal=false Categories=Network