From a91c7700302a370d6dbb9e0601b3e541ef5f192a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Thu, 6 Aug 2015 14:44:15 +0200 Subject: [PATCH] fixed guhd.conf destination add generateplugininfo to libguh-dev --- debian/guhd.install | 2 +- debian/libguh1-dev.install | 1 + guh.pri | 4 +-- libguh/libguh.pro | 11 +++++--- ...nerateplugininfo.py => generateplugininfo} | 26 +++++++++++++++++-- plugins/plugins.pri | 4 +-- 6 files changed, 38 insertions(+), 10 deletions(-) rename plugins/{generateplugininfo.py => generateplugininfo} (83%) diff --git a/debian/guhd.install b/debian/guhd.install index 7bc31ca6..a278ab79 100644 --- a/debian/guhd.install +++ b/debian/guhd.install @@ -1,3 +1,3 @@ usr/bin/guhd data/init/* /etc/init.d -data/config/guhd.conf /etc/guh/guhd.conf +data/config/guhd.conf /etc/guh/ diff --git a/debian/libguh1-dev.install b/debian/libguh1-dev.install index d01be1c3..e40600ac 100644 --- a/debian/libguh1-dev.install +++ b/debian/libguh1-dev.install @@ -1,3 +1,4 @@ usr/lib/libguh.so usr/include/guh/* usr/include/guh +usr/bin/generateplugininfo usr/bin diff --git a/guh.pri b/guh.pri index 4d3ef9c5..97a8856f 100644 --- a/guh.pri +++ b/guh.pri @@ -26,8 +26,8 @@ enable433gpio { DEFINES += GPIO433 } -# check websocket support -equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 3) { +# check websocket support (sonce Qt 5.3) +equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 2) { DEFINES += WEBSOCKET } diff --git a/libguh/libguh.pro b/libguh/libguh.pro index 9da99cfd..165d62e8 100644 --- a/libguh/libguh.pro +++ b/libguh/libguh.pro @@ -5,6 +5,9 @@ TEMPLATE = lib QT += network +target.path = /usr/lib +INSTALLS += target + SOURCES += plugin/device.cpp \ plugin/deviceclass.cpp \ plugin/deviceplugin.cpp \ @@ -72,9 +75,11 @@ HEADERS += plugin/device.h \ guhsettings.h \ -target.path = /usr/lib - +# install files for libguh-dev headers.files = $$HEADERS headers.path = /usr/include/guh -INSTALLS += target headers +generateplugininfo.files = $$top_srcdir/plugins/generateplugininfo +generateplugininfo.path = /usr/bin + +INSTALLS += headers generateplugininfo diff --git a/plugins/generateplugininfo.py b/plugins/generateplugininfo similarity index 83% rename from plugins/generateplugininfo.py rename to plugins/generateplugininfo index 65cbc758..53fa2d5d 100755 --- a/plugins/generateplugininfo.py +++ b/plugins/generateplugininfo @@ -1,9 +1,31 @@ -#!/usr/bin/python +#!/usr/bin/env python + +# -*- coding: UTF-8 -*- + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # +# Copyright (C) 2015 Simon Stuerz # +# Copyright (C) 2014 Michael Zanetti # +# # +# This file is part of guh-cli. # +# # +# guh-cli 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, version 2 of the License. # +# # +# guh-cli 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 guh. If not, see . # +# # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # import json import sys - inputFile = open(sys.argv[1], "r") outputfile = open(sys.argv[2], "w") outputfile2 = open("extern-" + sys.argv[2], "w") diff --git a/plugins/plugins.pri b/plugins/plugins.pri index 1263541a..5ba35332 100644 --- a/plugins/plugins.pri +++ b/plugins/plugins.pri @@ -9,8 +9,8 @@ INCLUDEPATH += ../../../libguh LIBS += -L../../../libguh -lguh infofile.output = plugininfo.h -infofile.commands = $$top_srcdir/plugins/generateplugininfo.py ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT} -infofile.depends = $$top_srcdir/plugins/generateplugininfo.py +infofile.commands = $$top_srcdir/plugins/generateplugininfo ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT} +infofile.depends = $$top_srcdir/plugins/generateplugininfo infofile.CONFIG = no_link JSONFILES = deviceplugin"$$TARGET".json infofile.input = JSONFILES