diff --git a/debian/control b/debian/control index 3d559543..b7da5c84 100644 --- a/debian/control +++ b/debian/control @@ -52,26 +52,11 @@ Package: nymead Architecture: any Section: net Multi-Arch: same -Depends: libqt5network5, - libqt5gui5, - libqt5sql5, - libqt5xml5, - libqt5dbus5, - libqt5websockets5, - libqt5bluetooth5, - libqt5sql5-sqlite, - libcap2-bin, - logrotate, - bluez, - tar, - iputils-tracepath, - iputils-ping, - qml-module-qtquick2, - dnsutils, +Depends: ${shlibs:Depends}, + ${misc:Depends}, nymea-translations, + libnymea-core (= ${binary:Version}), libnymea1 (= ${binary:Version}), - ${shlibs:Depends}, - ${misc:Depends} Recommends: nymea-cli, nymea-data, network-manager, @@ -162,7 +147,7 @@ Depends: ${shlibs:Depends}, Provides: nymea-update-plugin-api-1, nymea-zeroconf-plugin-api-1, nymea-system-plugin-api-3 -Description: An open source IoT server - core library +Description: An open source IoT server - library The nymea daemon is a plugin based IoT (Internet of Things) server. The server works like a translator for devices, things and services and allows them to interact. @@ -193,6 +178,57 @@ Description: The main libraries and header files for developing with nymea. . This package will install the development files for nymea. + +Package: libnymea-core +Section: libs +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libqt5network5, + libqt5gui5, + libqt5sql5, + libqt5xml5, + libqt5dbus5, + libqt5websockets5, + libqt5bluetooth5, + libqt5sql5-sqlite, + libcap2-bin, + logrotate, + bluez, + tar, + iputils-tracepath, + iputils-ping, + qml-module-qtquick2, + dnsutils, +Description: An open source IoT server - core library + The nymea daemon is a plugin based IoT (Internet of Things) server. The + server works like a translator for devices, things and services and + allows them to interact. + With the powerful rule engine you are able to connect any device available + in the system and create individual scenes and behaviors for your environment. + . + This package will install shared libraries for nymea core. + + +Package: libnymea-core-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libnymea-core (= ${binary:Version}), + libnymea-dev (= ${binary:Version}) +Description: The main libraries and header files for developing with nymea core. + The nymea daemon is a plugin based IoT (Internet of Things) server. The + server works like a translator for devices, things and services and + allows them to interact. + With the powerful rule engine you are able to connect any device available + in the system and create individual scenes and behaviors for your environment. + . + This package will install the development files for nymea core. + + Package: nymea-dev-tools Section: libdevel Architecture: any @@ -213,6 +249,7 @@ Depends: nymea-dev-tools (= ${binary:Version}), libnymea-dev (= ${binary:Version}), Recommends: nymea-qtcreator-wizards, crossbuilder, +Suggests: libnymea-core-dev (= ${binary:Version}) Description: The nymea SDK. . Meta-Package for everything required to develop on nymea. diff --git a/debian/libnymea-core-dev.install.in b/debian/libnymea-core-dev.install.in new file mode 100644 index 00000000..e28aba02 --- /dev/null +++ b/debian/libnymea-core-dev.install.in @@ -0,0 +1,3 @@ +usr/lib/@DEB_HOST_MULTIARCH@/libnymea-core.so +usr/include/nymea-core +usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig/nymea-core.pc diff --git a/debian/libnymea-core.install.in b/debian/libnymea-core.install.in new file mode 100644 index 00000000..d3da2294 --- /dev/null +++ b/debian/libnymea-core.install.in @@ -0,0 +1,3 @@ +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.0 diff --git a/debian/nymead.install.in b/debian/nymead.install.in index 60d6ea4d..09f777ec 100644 --- a/debian/nymead.install.in +++ b/debian/nymead.install.in @@ -1,7 +1,4 @@ usr/bin/nymead -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.0 data/systemd/nymead.service /lib/systemd/system/ data/logrotate/nymead /etc/logrotate.d/ data/dbus-1/io.guh.nymead.conf /etc/dbus-1/system.d/ diff --git a/debian/rules b/debian/rules index e19b2255..8b67190c 100755 --- a/debian/rules +++ b/debian/rules @@ -40,8 +40,6 @@ override_dh_auto_build: make -j$(DEB_PARALLEL_JOBS) $(MAKE_TARGETS) 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 # Make sure the docs directory exists, even if we didn't build them mkdir -p $(CURDIR)/doc/html dh_install --fail-missing diff --git a/libnymea-core/libnymea-core.pro b/libnymea-core/libnymea-core.pro index 2a0e5c4e..4c68a91d 100644 --- a/libnymea-core/libnymea-core.pro +++ b/libnymea-core/libnymea-core.pro @@ -52,14 +52,11 @@ packagesExist(libudev) { message("Building without udev support.") } -target.path = $$[QT_INSTALL_LIBS] -INSTALLS += target # icons for the webserver RESOURCES += $$top_srcdir/icons.qrc \ $$top_srcdir/data/debug-interface/debug-interface.qrc - HEADERS += nymeacore.h \ hardware/network/macaddressdatabasereplyimpl.h \ hardware/serialport/serialportmonitor.h \ @@ -290,3 +287,25 @@ HEADERS += \ SOURCES += \ integrations/pythonintegrationplugin.cpp } + +target.path = $$[QT_INSTALL_LIBS] +INSTALLS += target + +# install header file with relative subdirectory +for(header, HEADERS) { + path = $$[QT_INSTALL_PREFIX]/include/nymea-core/$${dirname(header)} + eval(headers_$${path}.files += $${header}) + eval(headers_$${path}.path = $${path}) + eval(INSTALLS *= headers_$${path}) +} + +# Create pkgconfig file +CONFIG += create_pc create_prl no_install_prl +QMAKE_PKGCONFIG_NAME = libnymea-core +QMAKE_PKGCONFIG_DESCRIPTION = nymea core development library +QMAKE_PKGCONFIG_PREFIX = $$[QT_INSTALL_PREFIX] +QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_PREFIX]/include/nymea-core/ +QMAKE_PKGCONFIG_LIBDIR = $$target.path +QMAKE_PKGCONFIG_VERSION = $$NYMEA_VERSION_STRING +QMAKE_PKGCONFIG_FILE = nymea-core +QMAKE_PKGCONFIG_DESTDIR = pkgconfig