chore: upkeep meson, manifests & others

This commit is contained in:
Evangelos Paterakis 2022-11-17 01:46:12 +02:00
parent 1f22cb52d9
commit 9539009a92
No known key found for this signature in database
GPG Key ID: FE5185F095BFC8C9
12 changed files with 134 additions and 159 deletions

View File

@ -12,7 +12,7 @@ jobs:
options: --privileged options: --privileged
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: flatpak/flatpak-github-actions/flatpak-builder@v4 - uses: flatpak/flatpak-github-actions/flatpak-builder@master
with: with:
bundle: "dev.geopjr.tooth.flatpak" bundle: "dev.geopjr.tooth.flatpak"
manifest-path: "dev.geopjr.tooth.json" manifest-path: "dev.geopjr.tooth.json"

View File

@ -30,7 +30,6 @@
<file>ui/dialogs/preferences.ui</file> <file>ui/dialogs/preferences.ui</file>
<file>ui/dialogs/list_editor.ui</file> <file>ui/dialogs/list_editor.ui</file>
<file>ui/menus.ui</file> <file>ui/menus.ui</file>
</gresource> </gresource>
</gresources> </gresources>

View File

@ -5,33 +5,51 @@ symbolic_dir = join_paths(icons_dir, 'symbolic', 'apps')
install_data( install_data(
join_paths('icons', 'color.svg'), join_paths('icons', 'color.svg'),
install_dir: scalable_dir, install_dir: scalable_dir,
rename: meson.project_name() + '.svg' rename: meson.project_name() + '.svg',
) )
install_data( install_data(
join_paths('icons', 'symbolic.svg'), join_paths('icons', 'symbolic.svg'),
install_dir: symbolic_dir, install_dir: symbolic_dir,
rename: meson.project_name() + '-symbolic.svg' rename: meson.project_name() + '-symbolic.svg',
) )
install_data( install_data(
meson.project_name() + '.gschema.xml', meson.project_name() + '.gschema.xml',
install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'glib-2.0', 'schemas') install_dir: join_paths(
get_option('prefix'),
get_option('datadir'),
'glib-2.0',
'schemas',
),
) )
i18n.merge_file( desktop_file = i18n.merge_file(
input: meson.project_name() + '.desktop.in', input: meson.project_name() + '.desktop.in',
output: meson.project_name() + '.desktop', output: meson.project_name() + '.desktop',
po_dir: join_paths(meson.source_root(), 'po'), po_dir: join_paths(meson.project_source_root(), 'po'),
type: 'desktop', type: 'desktop',
install: true, install: true,
install_dir: join_paths(get_option('datadir'), 'applications') install_dir: join_paths(get_option('datadir'), 'applications'),
) )
i18n.merge_file( desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('Validate desktop file', desktop_utils, args: [desktop_file])
endif
appstream_file = i18n.merge_file(
input: meson.project_name() + '.appdata.xml.in', input: meson.project_name() + '.appdata.xml.in',
output: meson.project_name() + '.appdata.xml', output: meson.project_name() + '.appdata.xml',
po_dir: join_paths(meson.source_root(), 'po'), po_dir: join_paths(meson.project_source_root(), 'po'),
install: true, install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo') install_dir: join_paths(get_option('datadir'), 'metainfo'),
) )
appstream_util = find_program('appstream-util', required: false)
if appstream_util.found()
test(
'Validate appstream file',
appstream_util,
args: ['validate', appstream_file],
)
endif

View File

@ -1,10 +1,10 @@
{ {
"app-id" : "dev.geopjr.tooth", "app-id": "dev.geopjr.tooth",
"runtime" : "org.gnome.Platform", "runtime": "org.gnome.Platform",
"sdk" : "org.gnome.Sdk", "runtime-version": "43",
"runtime-version" : "40", "sdk": "org.gnome.Sdk",
"command" : "dev.geopjr.tooth", "command": "dev.geopjr.tooth",
"finish-args" : [ "finish-args": [
"--device=dri", "--device=dri",
"--share=ipc", "--share=ipc",
"--share=network", "--share=network",
@ -14,7 +14,7 @@
"--talk-name=org.gtk.vfs.*", "--talk-name=org.gtk.vfs.*",
"--filesystem=xdg-run/gvfsd" "--filesystem=xdg-run/gvfsd"
], ],
"cleanup" : [ "cleanup": [
"/include", "/include",
"/lib/pkgconfig", "/lib/pkgconfig",
"/man", "/man",
@ -22,58 +22,21 @@
"/share/gtk-doc", "/share/gtk-doc",
"/share/man", "/share/man",
"/share/pkgconfig", "/share/pkgconfig",
"/share/vala",
"*.la", "*.la",
"*.a" "*.a"
], ],
"modules" : [ "modules": [
{ {
"name" : "libsass", "name": "tooth",
"buildsystem" : "meson", "builddir": true,
"builddir" : true, "buildsystem": "meson",
"sources" : [ "sources": [
{ {
"type" : "git", "type": "dir",
"url" : "https://github.com/lazka/libsass.git", "path": "."
"branch" : "meson"
}
]
},
{
"name" : "sassc",
"buildsystem" : "meson",
"builddir" : true,
"sources" : [
{
"type" : "git",
"url" : "https://github.com/lazka/sassc.git",
"branch" : "meson"
}
]
},
{
"name" : "libadwaita",
"buildsystem" : "meson",
"sources" : [
{
"type" : "git",
"url" : "https://gitlab.gnome.org/GNOME/libadwaita.git",
"branch" : "main"
}
]
},
{
"name" : "tooth",
"builddir" : true,
"buildsystem" : "meson",
"sources" : [
{
"type" : "dir",
"path" : "."
} }
] ]
} }
], ]
"build-options" : { }
"env" : { }
}
}

View File

@ -5,4 +5,5 @@ meson build --prefix=/usr
cd build cd build
ninja ninja
sudo ninja install sudo ninja install
# gdb dev.geopjr.tooth
dev.geopjr.tooth dev.geopjr.tooth

View File

@ -1,6 +1,16 @@
project('dev.geopjr.tooth', 'vala', 'c', version: '2.1.0') project(
'dev.geopjr.tooth',
['c', 'vala'],
version: '2.1.0',
meson_version: '>= 0.59.0',
default_options: [
'warning_level=2',
'werror=false',
],
)
add_global_arguments([ add_global_arguments(
[
'-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()),
], ],
language: 'c', language: 'c',
@ -9,106 +19,110 @@ add_global_arguments([
config = configuration_data() config = configuration_data()
config.set('EXEC_NAME', meson.project_name()) config.set('EXEC_NAME', meson.project_name())
config.set('GETTEXT_PACKAGE', meson.project_name()) config.set('GETTEXT_PACKAGE', meson.project_name())
config.set('RESOURCES', '/' + '/'.join(meson.project_name().split('.')) + '/' ) config.set('RESOURCES', '/' + '/'.join(meson.project_name().split('.')) + '/')
config.set('VERSION', meson.project_version()) config.set('VERSION', meson.project_version())
config.set('PREFIX', get_option('prefix')) config.set('PREFIX', get_option('prefix'))
config.set('NAME', 'Tooth') config.set('NAME', 'Tooth')
config.set('WEBSITE', 'https://github.com/GeopJr/tooth') config.set('WEBSITE', 'https://github.com/GeopJr/tooth')
config.set('SUPPORT_WEBSITE', 'https://github.com/GeopJr/tooth/issues') config.set('SUPPORT_WEBSITE', 'https://github.com/GeopJr/tooth/issues')
config.set('COPYRIGHT', '© 2018-2021 bleak_grey\n© 2022 Evangelos \"GeopJr\" Paterakis') config.set(
'COPYRIGHT',
'© 2018-2021 bleak_grey\n© 2022 Evangelos \"GeopJr\" Paterakis',
)
gnome = import('gnome') gnome = import('gnome')
i18n = import('i18n') i18n = import('i18n')
asresources = gnome.compile_resources( asresources = gnome.compile_resources(
'as-resources', 'data/gresource.xml', 'as-resources',
source_dir: 'data', 'data/gresource.xml',
c_name: 'as' source_dir: 'data',
c_name: 'as',
) )
libgtk_dep = dependency('gtk4', version: '>=4.0.0', required: true) libgtk_dep = dependency('gtk4', version: '>=4.0.0', required: true)
libadwaita_dep = dependency('libadwaita-1', version: '>=1.0.0', required: true) libadwaita_dep = dependency('libadwaita-1', version: '>=1.2', required: true)
sources = files( sources = files(
'src/API/Account.vala',
'src/API/AccountField.vala',
'src/API/Attachment.vala',
'src/API/Conversation.vala',
'src/API/Entity.vala',
'src/API/List.vala',
'src/API/Mention.vala',
'src/API/Notification.vala',
'src/API/Relationship.vala',
'src/API/SearchResults.vala',
'src/API/Status.vala',
'src/API/Tag.vala',
'src/Application.vala', 'src/Application.vala',
'src/Utils/Host.vala', 'src/Dialogs/Composer/AttachmentsPage.vala',
'src/Utils/Html.vala', 'src/Dialogs/Composer/Dialog.vala',
'src/Utils/DateTime.vala', 'src/Dialogs/Composer/EditorPage.vala',
'src/Services/Accounts/InstanceAccount.vala', 'src/Dialogs/Composer/Page.vala',
'src/Dialogs/Composer/PollPage.vala',
'src/Dialogs/ListEditor.vala',
'src/Dialogs/MainWindow.vala',
'src/Dialogs/NewAccount.vala',
'src/Dialogs/Preferences.vala',
'src/Dialogs/Saveable.vala',
'src/Services/Accounts/AccountHolder.vala',
'src/Services/Accounts/AccountStore.vala', 'src/Services/Accounts/AccountStore.vala',
'src/Services/Accounts/InstanceAccount.vala',
'src/Services/Accounts/Mastodon/Account.vala',
'src/Services/Accounts/Places.vala', 'src/Services/Accounts/Places.vala',
'src/Services/Accounts/SecretAccountStore.vala', 'src/Services/Accounts/SecretAccountStore.vala',
'src/Services/Accounts/AccountHolder.vala',
'src/Services/Accounts/Mastodon/Account.vala',
'src/Services/Cache/AbstractCache.vala', 'src/Services/Cache/AbstractCache.vala',
'src/Services/Cache/EntityCache.vala', 'src/Services/Cache/EntityCache.vala',
'src/Services/Cache/ImageCache.vala', 'src/Services/Cache/ImageCache.vala',
'src/Services/Network/Network.vala', 'src/Services/Network/Network.vala',
'src/Services/Network/Request.vala', 'src/Services/Network/Request.vala',
'src/Services/Network/Streams.vala',
'src/Services/Network/Streamable.vala', 'src/Services/Network/Streamable.vala',
'src/Services/Network/Streams.vala',
'src/Services/Settings.vala', 'src/Services/Settings.vala',
'src/API/Account.vala', 'src/Utils/DateTime.vala',
'src/API/AccountField.vala', 'src/Utils/Host.vala',
'src/API/Relationship.vala', 'src/Utils/Html.vala',
'src/API/Mention.vala', 'src/Views/Base.vala',
'src/API/Tag.vala', 'src/Views/Bookmarks.vala',
'src/API/Status.vala', 'src/Views/ContentBase.vala',
'src/API/Notification.vala', 'src/Views/Conversations.vala',
'src/API/Attachment.vala', 'src/Views/Favorites.vala',
'src/API/Conversation.vala', 'src/Views/Federated.vala',
'src/API/List.vala', 'src/Views/Hashtag.vala',
'src/API/SearchResults.vala', 'src/Views/Home.vala',
'src/API/Entity.vala', 'src/Views/List.vala',
'src/Widgets/Widgetizable.vala', 'src/Views/Lists.vala',
'src/Widgets/Background.vala', 'src/Views/Local.vala',
'src/Views/Main.vala',
'src/Views/Notifications.vala',
'src/Views/Profile.vala',
'src/Views/Search.vala',
'src/Views/Sidebar.vala',
'src/Views/TabbedBase.vala',
'src/Views/Thread.vala',
'src/Views/Timeline.vala',
'src/Widgets/Attachment/Box.vala',
'src/Widgets/Attachment/Image.vala',
'src/Widgets/Attachment/Item.vala',
'src/Widgets/Avatar.vala', 'src/Widgets/Avatar.vala',
'src/Widgets/Background.vala',
'src/Widgets/Conversation.vala',
'src/Widgets/LockableToggleButton.vala',
'src/Widgets/MarkupView.vala',
'src/Widgets/Notification.vala',
'src/Widgets/RelationshipButton.vala',
'src/Widgets/RichLabel.vala', 'src/Widgets/RichLabel.vala',
'src/Widgets/Status.vala', 'src/Widgets/Status.vala',
'src/Widgets/Notification.vala',
'src/Widgets/Conversation.vala',
'src/Widgets/Attachment/Box.vala',
'src/Widgets/Attachment/Item.vala',
'src/Widgets/Attachment/Image.vala',
'src/Widgets/LockableToggleButton.vala',
'src/Widgets/StatusActionButton.vala', 'src/Widgets/StatusActionButton.vala',
'src/Widgets/RelationshipButton.vala', 'src/Widgets/Widgetizable.vala',
'src/Widgets/MarkupView.vala',
'src/Dialogs/Saveable.vala',
'src/Dialogs/NewAccount.vala',
'src/Dialogs/MainWindow.vala',
'src/Dialogs/Preferences.vala',
'src/Dialogs/ListEditor.vala',
'src/Dialogs/Composer/Dialog.vala',
'src/Dialogs/Composer/Page.vala',
'src/Dialogs/Composer/EditorPage.vala',
'src/Dialogs/Composer/AttachmentsPage.vala',
'src/Dialogs/Composer/PollPage.vala',
'src/Views/Base.vala',
'src/Views/ContentBase.vala',
'src/Views/TabbedBase.vala',
'src/Views/Sidebar.vala',
'src/Views/Main.vala',
'src/Views/Timeline.vala',
'src/Views/Home.vala',
'src/Views/Local.vala',
'src/Views/Federated.vala',
'src/Views/Notifications.vala',
'src/Views/Conversations.vala',
'src/Views/Bookmarks.vala',
'src/Views/Thread.vala',
'src/Views/Profile.vala',
'src/Views/Favorites.vala',
'src/Views/Search.vala',
'src/Views/Hashtag.vala',
'src/Views/Lists.vala',
'src/Views/List.vala',
) )
build_file = configure_file( build_file = configure_file(
input: 'src/Build.vala.in', input: 'src/Build.vala.in',
output: 'Build.vala', output: 'Build.vala',
configuration: config configuration: config,
) )
executable( executable(
@ -132,4 +146,10 @@ executable(
subdir('data') subdir('data')
subdir('po') subdir('po')
gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true,
)
meson.add_install_script('meson/post_install.py') meson.add_install_script('meson/post_install.py')

View File

@ -1,5 +1,5 @@
#i18n.gettext(meson.project_name(), #i18n.gettext(meson.project_name(),
# args: ['--directory='+meson.source_root(), '--from-code=UTF-8'], # args: ['--directory='+meson.project_source_root(), '--from-code=UTF-8'],
# install: false, # install: false,
#) #)
i18n.gettext(meson.project_name(), preset: 'glib') i18n.gettext(meson.project_name(), preset: 'glib')

View File

@ -1,5 +0,0 @@
[wrap-file]
directory=libadwaita-594eb987c57e4d20370cc20520871f230ff02ae2
source_url=https://gitlab.gnome.org/GNOME/libadwaita/-/archive/594eb987c57e4d20370cc20520871f230ff02ae2/libadwaita-594eb987c57e4d20370cc20520871f230ff02ae2.zip
source_filename=libadwaita-594eb987c57e4d20370cc20520871f230ff02ae2.zip
source_hash=a2c604e573ac1f87c5f3ae6dbd9349666ad574321a66f9f05bb27d785db18aa7

View File

@ -1,5 +0,0 @@
[wrap-file]
directory=gtk-4.2.0
source_url=https://gitlab.gnome.org/GNOME/gtk/-/archive/4.2.0/gtk-4.2.0.tar
source_filename=gtk-4.2.0.tar
source_hash=4dee09cf3915304bd18cf0f466fff72e4be1b87d9e4dc5d16fba72b4d67b7c0c

View File

@ -1,5 +0,0 @@
[wrap-git]
directory=libsass
url=https://github.com/lazka/libsass.git
revision=meson
depth=1

View File

@ -1,6 +0,0 @@
[wrap-git]
directory=pango
url=https://gitlab.gnome.org/GNOME/pango.git
push-url=ssh://git@gitlab.gnome.org:GNOME/pango.git
revision=master
depth=1

View File

@ -1,5 +0,0 @@
[wrap-git]
directory=sassc
url=https://github.com/lazka/sassc.git
revision=meson
depth=1