Skip to content

Commit

Permalink
Add liboxide-dev package with headers and pkg-conf file (#334)
Browse files Browse the repository at this point in the history
* Install headers and privide pkg-config file

* Get package build working
  • Loading branch information
Eeems authored Dec 13, 2023
1 parent 5d773c0 commit 0c1192c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 14 additions & 1 deletion package
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
21 changes: 20 additions & 1 deletion shared/liboxide/liboxide.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit 0c1192c

Please sign in to comment.