diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96b31d3b4..e3df07680 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: build - path: .build/package/dist + path: .build/package/build/rmall/src/release release: needs: build if: ${{ github.ref == 'refs/heads/master' }} diff --git a/Makefile b/Makefile index 619e3498f..a4575f271 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,8 @@ clean: release: clean build $(DIST) # Force sentry makefile to regenerate so that install targets get when being build in toltecmk cd $(BUILD)/oxide/shared/sentry && make qmake + # 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: $(OBJ) diff --git a/package b/package index cf39579e9..56a598cf7 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=3.0 pkgver="$_oxidever~VERSION~" _sentryver=0.6.5 @@ -187,6 +187,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 9feccaf8c..676bfe5d7 100644 --- a/shared/liboxide/liboxide.pro +++ b/shared/liboxide/liboxide.pro @@ -11,6 +11,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 @@ -93,7 +96,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 @@ -107,3 +118,11 @@ INCLUDEPATH += ../../shared/mxcfb include(../../qmake/epaper.pri) 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