diff --git a/Makefile b/Makefile index 65eb2c40b..c3e3a5a4c 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,8 @@ clean: release: clean build $(RELOBJ) mkdir -p $(DIST) + # Force liboxide makefile to regenerate so that install targets get when being build in toltecmk + cd $(BUILD)/oxide/shared/liboxide && make qmake INSTALL_ROOT=$(DIST) $(MAKE) -C $(BUILD)/oxide install build: $(BUILD) $(OBJ) diff --git a/package b/package index f67a7f70e..27d8a0680 100644 --- a/package +++ b/package @@ -2,7 +2,7 @@ # Copyright (c) 2020 The Toltec Contributors # SPDX-License-Identifier: MIT -pkgnames=(oxide oxide-extra oxide-utils inject_evdev liboxide libsentry) +pkgnames=(oxide oxide-extra oxide-utils inject_evdev liboxide liboxide-dev libsentry) _oxidever=2.7 pkgver="$_oxidever~VERSION~" _sentryver=0.5.0 @@ -181,6 +181,19 @@ liboxide() { } } +liboxide-dev() { + pkgdesc="Shared library for oxide applications" + section="devel" + installdepends=("liboxide=$pkgver") + + package() { + install -D -m 755 -t "$pkgdir"/opt/lib/pkgconfig "$srcdir"/release/opt/lib/pkgconfig/liboxide.pc + install -D -m 755 -t "$pkgdir"/opt/include "$srcdir"/release/opt/include/epframebuffer.h + install -D -m 755 -t "$pkgdir"/opt/include "$srcdir"/release/opt/include/liboxide.h + cp -ar "$srcdir"/release/opt/include/liboxide/ "$pkgdir"/opt/include/ + } +} + libsentry() { pkgdesc="Sentry SDK for C, C++ and native applications." section="devel" diff --git a/shared/liboxide/liboxide.pro b/shared/liboxide/liboxide.pro index f5c9f6413..b3eb5a6d9 100644 --- a/shared/liboxide/liboxide.pro +++ b/shared/liboxide/liboxide.pro @@ -8,6 +8,9 @@ DEFINES += LIBOXIDE_LIBRARY CONFIG += c++11 CONFIG += warn_on CONFIG += precompile_header +CONFIG += create_pc +CONFIG += create_prl +CONFIG += no_install_prl DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 @@ -78,7 +81,15 @@ liboxide_h.commands = \ clean_headers.target = include/.clean-target clean_headers.commands = rm -rf include -QMAKE_EXTRA_TARGETS += liboxide_liboxide_h liboxide_h clean_headers +liboxide_h_install.files = \ + include/liboxide.h \ + include/liboxide \ + include/epframebuffer.h +liboxide_h_install.depends = liboxide_h +liboxide_h_install.path = /opt/include/ +INSTALLS += liboxide_h_install + +QMAKE_EXTRA_TARGETS += liboxide_liboxide_h liboxide_h clean_headers liboxide_h_install PRE_TARGETDEPS += $$clean_headers.target POST_TARGETDEPS += $$liboxide_liboxide_h.target $$liboxide_h.target QMAKE_CLEAN += $$liboxide_h.target include/liboxide/*.h @@ -90,3 +101,11 @@ INSTALLS += target LIBS += -L$$PWD/../epaper -lqsgepaper INCLUDEPATH += $$PWD/../epaper include(../../qmake/sentry.pri) + +QMAKE_PKGCONFIG_NAME = liboxide +QMAKE_PKGCONFIG_DESCRIPTION = Shared library for Oxide application development +QMAKE_PKGCONFIG_VERSION = $$VERSION +QMAKE_PKGCONFIG_PREFIX = /opt +QMAKE_PKGCONFIG_LIBDIR = /opt/lib +QMAKE_PKGCONFIG_INCDIR = /opt/include +QMAKE_PKGCONFIG_DESTDIR = pkgconfig