Merge PR #153: Don't set debian/ubuntu specific paths in project file
This commit is contained in:
commit
87e8c5cbd3
1
debian/libnymea1-dev.install.in
vendored
1
debian/libnymea1-dev.install.in
vendored
@ -2,3 +2,4 @@ usr/lib/@DEB_HOST_MULTIARCH@/libnymea.so
|
|||||||
usr/include/nymea/* usr/include/nymea
|
usr/include/nymea/* usr/include/nymea
|
||||||
usr/bin/nymea-generateplugininfo usr/bin
|
usr/bin/nymea-generateplugininfo usr/bin
|
||||||
libnymea/plugin/plugin.pri usr/include/nymea/
|
libnymea/plugin/plugin.pri usr/include/nymea/
|
||||||
|
usr/lib/@DEB_HOST_MULTIARCH@/nymea.pc usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig/
|
||||||
|
|||||||
1
debian/nymead.install.in
vendored
1
debian/nymead.install.in
vendored
@ -1,5 +1,4 @@
|
|||||||
usr/bin/nymead
|
usr/bin/nymead
|
||||||
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-core.so
|
|
||||||
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-core.so.1
|
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-core.so.1
|
||||||
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-core.so.1.0
|
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-core.so.1.0
|
||||||
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-core.so.1.0.0
|
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-core.so.1.0.0
|
||||||
|
|||||||
2
debian/rules
vendored
2
debian/rules
vendored
@ -40,6 +40,8 @@ override_dh_auto_build:
|
|||||||
make -j$(DEB_PARALLEL_JOBS) $(MAKE_TARGETS)
|
make -j$(DEB_PARALLEL_JOBS) $(MAKE_TARGETS)
|
||||||
|
|
||||||
override_dh_install: $(PREPROCESS_FILES:.in=)
|
override_dh_install: $(PREPROCESS_FILES:.in=)
|
||||||
|
# libnymea-core isn't public api... delete dev lib and just keep runtime libs.
|
||||||
|
rm $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libnymea-core.so
|
||||||
dh_install --fail-missing
|
dh_install --fail-missing
|
||||||
# installing the documentation as there is no extra install target
|
# installing the documentation as there is no extra install target
|
||||||
cp -a $(CURDIR)/doc/html $(CURDIR)/debian/nymea-doc/usr/share/doc/nymea/ || true
|
cp -a $(CURDIR)/doc/html $(CURDIR)/debian/nymea-doc/usr/share/doc/nymea/ || true
|
||||||
|
|||||||
@ -7,7 +7,7 @@ QT += sql
|
|||||||
INCLUDEPATH += $$top_srcdir/libnymea
|
INCLUDEPATH += $$top_srcdir/libnymea
|
||||||
LIBS += -L$$top_builddir/libnymea/ -lnymea -lssl -lcrypto -lavahi-common -lavahi-client -lnymea-mqtt
|
LIBS += -L$$top_builddir/libnymea/ -lnymea -lssl -lcrypto -lavahi-common -lavahi-client -lnymea-mqtt
|
||||||
|
|
||||||
target.path = /usr/lib/$$system('dpkg-architecture -q DEB_HOST_MULTIARCH')
|
target.path = $$[QT_INSTALL_LIBS]
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
|
||||||
# icons for the webserver
|
# icons for the webserver
|
||||||
|
|||||||
@ -245,14 +245,13 @@ QStringList DeviceManager::pluginSearchDirs()
|
|||||||
if (!envPath.isEmpty()) {
|
if (!envPath.isEmpty()) {
|
||||||
searchDirs << QString(envPath).split(':');
|
searchDirs << QString(envPath).split(':');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (QString libraryPath, QCoreApplication::libraryPaths()) {
|
||||||
|
searchDirs << libraryPath.replace("qt5", "nymea");
|
||||||
|
}
|
||||||
searchDirs << QCoreApplication::applicationDirPath() + "/../lib/nymea/plugins";
|
searchDirs << QCoreApplication::applicationDirPath() + "/../lib/nymea/plugins";
|
||||||
searchDirs << QCoreApplication::applicationDirPath() + "/../plugins/";
|
searchDirs << QCoreApplication::applicationDirPath() + "/../plugins/";
|
||||||
searchDirs << QCoreApplication::applicationDirPath() + "/../../../plugins/";
|
searchDirs << QCoreApplication::applicationDirPath() + "/../../../plugins/";
|
||||||
searchDirs << QString("%1").arg(NYMEA_PLUGINS_PATH);
|
|
||||||
QString snapDir = QString::fromUtf8(qgetenv("SNAP"));
|
|
||||||
if (!snapDir.isEmpty()) {
|
|
||||||
searchDirs << QString("%1%2").arg(snapDir).arg(NYMEA_PLUGINS_PATH);
|
|
||||||
}
|
|
||||||
return searchDirs;
|
return searchDirs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,10 +8,6 @@ DEFINES += LIBNYMEA_LIBRARY
|
|||||||
|
|
||||||
QMAKE_LFLAGS += -fPIC
|
QMAKE_LFLAGS += -fPIC
|
||||||
|
|
||||||
target.path = /usr/lib/$$system('dpkg-architecture -q DEB_HOST_MULTIARCH')
|
|
||||||
INSTALLS += target
|
|
||||||
|
|
||||||
# Avahi libs
|
|
||||||
LIBS += -lavahi-common -lavahi-client
|
LIBS += -lavahi-common -lavahi-client
|
||||||
|
|
||||||
HEADERS += devicemanager.h \
|
HEADERS += devicemanager.h \
|
||||||
@ -35,11 +31,6 @@ HEADERS += devicemanager.h \
|
|||||||
network/oauth2.h \
|
network/oauth2.h \
|
||||||
network/avahi/qtavahiservicebrowser.h \
|
network/avahi/qtavahiservicebrowser.h \
|
||||||
network/avahi/avahiserviceentry.h \
|
network/avahi/avahiserviceentry.h \
|
||||||
#network/avahi/qtavahiclient.h \
|
|
||||||
#network/avahi/qt-watch.h \
|
|
||||||
#network/avahi/qtavahiservice.h \
|
|
||||||
#network/avahi/qtavahiservice_p.h \
|
|
||||||
#network/avahi/qtavahiservicebrowser_p.h \
|
|
||||||
hardware/bluetoothlowenergy/bluetoothlowenergydevice.h \
|
hardware/bluetoothlowenergy/bluetoothlowenergydevice.h \
|
||||||
hardware/bluetoothlowenergy/bluetoothdiscoveryreply.h \
|
hardware/bluetoothlowenergy/bluetoothdiscoveryreply.h \
|
||||||
hardware/bluetoothlowenergy/bluetoothlowenergymanager.h \
|
hardware/bluetoothlowenergy/bluetoothlowenergymanager.h \
|
||||||
@ -74,7 +65,7 @@ HEADERS += devicemanager.h \
|
|||||||
nymeadbusservice.h \
|
nymeadbusservice.h \
|
||||||
network/mqtt/mqttprovider.h \
|
network/mqtt/mqttprovider.h \
|
||||||
network/mqtt/mqttchannel.h \
|
network/mqtt/mqttchannel.h \
|
||||||
translator.h
|
translator.h
|
||||||
|
|
||||||
SOURCES += devicemanager.cpp \
|
SOURCES += devicemanager.cpp \
|
||||||
loggingcategories.cpp \
|
loggingcategories.cpp \
|
||||||
@ -95,11 +86,6 @@ SOURCES += devicemanager.cpp \
|
|||||||
network/oauth2.cpp \
|
network/oauth2.cpp \
|
||||||
network/avahi/avahiserviceentry.cpp \
|
network/avahi/avahiserviceentry.cpp \
|
||||||
network/avahi/qtavahiservicebrowser.cpp \
|
network/avahi/qtavahiservicebrowser.cpp \
|
||||||
#network/avahi/qt-watch.cpp \
|
|
||||||
#network/avahi/qtavahiclient.cpp \
|
|
||||||
#network/avahi/qtavahiservice.cpp \
|
|
||||||
#network/avahi/qtavahiservice_p.cpp \
|
|
||||||
#network/avahi/qtavahiservicebrowser_p.cpp \
|
|
||||||
hardware/bluetoothlowenergy/bluetoothlowenergymanager.cpp \
|
hardware/bluetoothlowenergy/bluetoothlowenergymanager.cpp \
|
||||||
hardware/bluetoothlowenergy/bluetoothlowenergydevice.cpp \
|
hardware/bluetoothlowenergy/bluetoothlowenergydevice.cpp \
|
||||||
hardware/bluetoothlowenergy/bluetoothdiscoveryreply.cpp \
|
hardware/bluetoothlowenergy/bluetoothdiscoveryreply.cpp \
|
||||||
@ -134,9 +120,14 @@ SOURCES += devicemanager.cpp \
|
|||||||
nymeadbusservice.cpp \
|
nymeadbusservice.cpp \
|
||||||
network/mqtt/mqttprovider.cpp \
|
network/mqtt/mqttprovider.cpp \
|
||||||
network/mqtt/mqttchannel.cpp \
|
network/mqtt/mqttchannel.cpp \
|
||||||
translator.cpp
|
translator.cpp
|
||||||
|
|
||||||
|
|
||||||
|
RESOURCES += \
|
||||||
|
interfaces/interfaces.qrc
|
||||||
|
|
||||||
|
## Install instructions
|
||||||
|
|
||||||
# install plugininfo python script for libnymea-dev
|
# install plugininfo python script for libnymea-dev
|
||||||
generateplugininfo.files = $$top_srcdir/plugins/nymea-generateplugininfo
|
generateplugininfo.files = $$top_srcdir/plugins/nymea-generateplugininfo
|
||||||
generateplugininfo.path = /usr/bin
|
generateplugininfo.path = /usr/bin
|
||||||
@ -145,11 +136,21 @@ INSTALLS += generateplugininfo
|
|||||||
|
|
||||||
# install header file with relative subdirectory
|
# install header file with relative subdirectory
|
||||||
for(header, HEADERS) {
|
for(header, HEADERS) {
|
||||||
path = /usr/include/nymea/$${dirname(header)}
|
path = $${PREFIX}/include/nymea/$${dirname(header)}
|
||||||
eval(headers_$${path}.files += $${header})
|
eval(headers_$${path}.files += $${header})
|
||||||
eval(headers_$${path}.path = $${path})
|
eval(headers_$${path}.path = $${path})
|
||||||
eval(INSTALLS *= headers_$${path})
|
eval(INSTALLS *= headers_$${path})
|
||||||
}
|
}
|
||||||
|
|
||||||
RESOURCES += \
|
# define install target
|
||||||
interfaces/interfaces.qrc
|
target.path = $$[QT_INSTALL_LIBS]
|
||||||
|
INSTALLS += target
|
||||||
|
|
||||||
|
# Create pkgconfig file
|
||||||
|
CONFIG += create_pc create_prl no_install_prl
|
||||||
|
QMAKE_PKGCONFIG_NAME = libnymea
|
||||||
|
QMAKE_PKGCONFIG_DESCRIPTION = nymea development library
|
||||||
|
QMAKE_PKGCONFIG_PREFIX = $${PREFIX}
|
||||||
|
QMAKE_PKGCONFIG_LIBDIR = $$target.path
|
||||||
|
QMAKE_PKGCONFIG_INCDIR = /usr/include/nymea
|
||||||
|
QMAKE_PKGCONFIG_VERSION = $$NYMEA_VERSION_STRING
|
||||||
|
|||||||
@ -85,12 +85,7 @@ void Translator::loadTranslator(DevicePlugin *plugin, const QLocale &locale)
|
|||||||
} else {
|
} else {
|
||||||
QString pluginId = plugin->pluginId().toString().remove(QRegExp("[{}]"));
|
QString pluginId = plugin->pluginId().toString().remove(QRegExp("[{}]"));
|
||||||
|
|
||||||
QStringList searchDirs = QString(qgetenv("NYMEA_PLUGINS_PATH")).split(':');
|
foreach (const QString &pluginPath, m_deviceManager->pluginSearchDirs()) {
|
||||||
searchDirs << QCoreApplication::applicationDirPath() + "/../lib/nymea/plugins";
|
|
||||||
searchDirs << QCoreApplication::applicationDirPath() + "/../plugins/";
|
|
||||||
searchDirs << QCoreApplication::applicationDirPath() + "/../../../plugins/";
|
|
||||||
|
|
||||||
foreach (const QString &pluginPath, searchDirs) {
|
|
||||||
if (translator->load(locale, pluginId, "-", QDir(pluginPath + "/translations/").absolutePath(), ".qm")) {
|
if (translator->load(locale, pluginId, "-", QDir(pluginPath + "/translations/").absolutePath(), ".qm")) {
|
||||||
qCDebug(dcTranslations()) << "* Loaded translation" << locale.name() << "for plugin" << plugin->pluginName() << "from" << QDir(pluginPath + "/translations/").absolutePath();
|
qCDebug(dcTranslations()) << "* Loaded translation" << locale.name() << "for plugin" << plugin->pluginName() << "from" << QDir(pluginPath + "/translations/").absolutePath();
|
||||||
loaded = true;
|
loaded = true;
|
||||||
|
|||||||
@ -1,9 +1,6 @@
|
|||||||
# Parse and export NYMEA_VERSION_STRING
|
# Parse and export NYMEA_VERSION_STRING
|
||||||
NYMEA_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
|
NYMEA_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
|
||||||
|
|
||||||
# Install path for plugins
|
|
||||||
NYMEA_PLUGINS_PATH=/usr/lib/$$system('dpkg-architecture -q DEB_HOST_MULTIARCH')/nymea/plugins/
|
|
||||||
|
|
||||||
# define protocol versions
|
# define protocol versions
|
||||||
JSON_PROTOCOL_VERSION_MAJOR=2
|
JSON_PROTOCOL_VERSION_MAJOR=2
|
||||||
JSON_PROTOCOL_VERSION_MINOR=0
|
JSON_PROTOCOL_VERSION_MINOR=0
|
||||||
@ -15,8 +12,7 @@ COPYRIGHT_YEAR_TO=2019
|
|||||||
DEFINES += NYMEA_VERSION_STRING=\\\"$${NYMEA_VERSION_STRING}\\\" \
|
DEFINES += NYMEA_VERSION_STRING=\\\"$${NYMEA_VERSION_STRING}\\\" \
|
||||||
JSON_PROTOCOL_VERSION=\\\"$${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}\\\" \
|
JSON_PROTOCOL_VERSION=\\\"$${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}\\\" \
|
||||||
REST_API_VERSION=\\\"$${REST_API_VERSION}\\\" \
|
REST_API_VERSION=\\\"$${REST_API_VERSION}\\\" \
|
||||||
COPYRIGHT_YEAR_STRING=\\\"$${COPYRIGHT_YEAR_FROM}-$${COPYRIGHT_YEAR_TO}\\\" \
|
COPYRIGHT_YEAR_STRING=\\\"$${COPYRIGHT_YEAR_FROM}-$${COPYRIGHT_YEAR_TO}\\\"
|
||||||
NYMEA_PLUGINS_PATH=\\\"$${NYMEA_PLUGINS_PATH}\\\"
|
|
||||||
|
|
||||||
QT *= network websockets bluetooth dbus
|
QT *= network websockets bluetooth dbus
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,6 @@ message("Copyright $${COPYRIGHT_YEAR_FROM} - $${COPYRIGHT_YEAR_TO}")
|
|||||||
message("Building nymea version $${NYMEA_VERSION_STRING}")
|
message("Building nymea version $${NYMEA_VERSION_STRING}")
|
||||||
message("JSON-RPC API version $${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}")
|
message("JSON-RPC API version $${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}")
|
||||||
message("REST API version $${REST_API_VERSION}")
|
message("REST API version $${REST_API_VERSION}")
|
||||||
message("Plugin path $${NYMEA_PLUGINS_PATH}")
|
|
||||||
message("Source directory: $${top_srcdir}")
|
message("Source directory: $${top_srcdir}")
|
||||||
message("Build directory: $${top_builddir}")
|
message("Build directory: $${top_builddir}")
|
||||||
message("Translations: $${TRANSLATIONS}")
|
message("Translations: $${TRANSLATIONS}")
|
||||||
|
|||||||
@ -34,5 +34,5 @@ PRE_TARGETDEPS += compiler_plugininfo_make_all compiler_externplugininfo_make_al
|
|||||||
QMAKE_EXTRA_COMPILERS += plugininfo externplugininfo
|
QMAKE_EXTRA_COMPILERS += plugininfo externplugininfo
|
||||||
|
|
||||||
# Install plugin
|
# Install plugin
|
||||||
target.path = $$NYMEA_PLUGINS_PATH
|
target.path = $$[QT_INSTALL_LIBS]/nymea/plugins/
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
|||||||
Reference in New Issue
Block a user