make raven a shared library and make an arch linux package
This commit is contained in:
parent
2fa09abbf2
commit
5663552527
2 changed files with 86 additions and 4 deletions
65
meson.build
65
meson.build
|
@ -3,13 +3,21 @@ project(
|
|||
'cpp',
|
||||
default_options : ['cpp_std=c++17']
|
||||
)
|
||||
project_description = 'The Raven user interface library'
|
||||
|
||||
cairomm_dep = dependency('cairomm-1.0')
|
||||
pangocairo_dep = dependency('pangocairo')
|
||||
xlib_dep = dependency('x11')
|
||||
|
||||
executable(
|
||||
'ravenapp',
|
||||
raven_dependencies = [
|
||||
cairomm_dep,
|
||||
xlib_dep,
|
||||
pangocairo_dep
|
||||
]
|
||||
|
||||
headers = include_directories('src')
|
||||
|
||||
raven_source_files = [
|
||||
'./src/Box.cpp',
|
||||
'./src/Styles.cpp',
|
||||
'./src/Painter.cpp',
|
||||
|
@ -22,6 +30,55 @@ executable(
|
|||
'./src/ColumnLayout.cpp',
|
||||
'./src/BoxLayout.cpp',
|
||||
'./src/Label.cpp',
|
||||
'./src/main.cpp',
|
||||
dependencies : [cairomm_dep, xlib_dep, pangocairo_dep]
|
||||
]
|
||||
|
||||
raven_header_files = [
|
||||
'./src/Box.hpp',
|
||||
'./src/BoxLayout.hpp',
|
||||
'./src/Button.hpp',
|
||||
'./src/ColumnLayout.hpp',
|
||||
'./src/DocumentLayout.hpp',
|
||||
'./src/Events.hpp',
|
||||
'./src/Forward.hpp',
|
||||
'./src/GenericStyle.hpp',
|
||||
'./src/Label.hpp',
|
||||
'./src/Layout.hpp',
|
||||
'./src/Painter.hpp',
|
||||
'./src/Point.hpp',
|
||||
'./src/RGB.hpp',
|
||||
'./src/RowLayout.hpp',
|
||||
'./src/ScrollContainer.hpp',
|
||||
'./src/Styles.hpp',
|
||||
'./src/Widget.hpp',
|
||||
'./src/Window.hpp'
|
||||
]
|
||||
|
||||
|
||||
raven_lib = library(
|
||||
meson.project_name(),
|
||||
raven_source_files,
|
||||
dependencies : raven_dependencies,
|
||||
install : true
|
||||
)
|
||||
|
||||
raven_dep = declare_dependency(
|
||||
include_directories : headers,
|
||||
link_with : raven_lib
|
||||
)
|
||||
set_variable('raven_dep', raven_dep)
|
||||
install_headers(raven_header_files, subdir : meson.project_name())
|
||||
|
||||
pkg_mod = import('pkgconfig')
|
||||
pkg_mod.generate(
|
||||
name : meson.project_name(),
|
||||
filebase : meson.project_name(),
|
||||
description : project_description,
|
||||
subdirs : meson.project_name(),
|
||||
libraries : raven_lib
|
||||
)
|
||||
|
||||
executable(
|
||||
'ravenapp',
|
||||
'./src/main.cpp',
|
||||
dependencies : [raven_dependencies, raven_dep]
|
||||
)
|
||||
|
|
25
pkg/makepkg/PKGBUILD
Normal file
25
pkg/makepkg/PKGBUILD
Normal file
|
@ -0,0 +1,25 @@
|
|||
pkgname=libraven
|
||||
pkgver=r84.2fa09ab
|
||||
pkgrel=1
|
||||
pkgdesc='The Raven user interface library'
|
||||
url='https://git.hippoz.xyz/hippoz/raven'
|
||||
source=("git+https://git.hippoz.xyz/hippoz/raven")
|
||||
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64')
|
||||
license=('MIT')
|
||||
depends=('pango' 'cairo' 'libx11')
|
||||
makedepends=('meson')
|
||||
sha256sums=(SKIP)
|
||||
|
||||
pkgver() {
|
||||
cd raven
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
build() {
|
||||
arch-meson raven build
|
||||
meson compile -C build
|
||||
}
|
||||
|
||||
package() {
|
||||
meson install -C build --destdir "$pkgdir"
|
||||
}
|
Loading…
Reference in a new issue