Commit 25c97b9e authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

Meson: update minimum version to 0.50 and clean up

parent 5773050d
Pipeline #83777 passed with stage
in 2 minutes and 47 seconds
......@@ -83,4 +83,5 @@ target/
*.in~
*.gitignore~
*.build~
*.ui.in#
\ No newline at end of file
*.ui.in#
*.json~
{
"app-id": "com.github.bilelmoussaoui.AuthenticatorDevel",
"runtime": "org.gnome.Platform",
"runtime-version": "master",
"sdk": "org.gnome.Sdk",
"command": "authenticator",
"tags": ["devel", "development", "nightly"],
"desktop-file-name-prefix": "(Development) ",
"finish-args": [
/* X11 + XShm */
"--share=ipc", "--socket=x11",
/* Wayland */
"app-id" : "com.github.bilelmoussaoui.AuthenticatorDevel",
"runtime" : "org.gnome.Platform",
"runtime-version" : "master",
"sdk" : "org.gnome.Sdk",
"command" : "authenticator",
"tags" : [
"devel",
"development",
"nightly"
],
"desktop-file-name-prefix" : "(Development) ",
"finish-args" : [
"--share=ipc",
"--socket=x11",
"--socket=wayland",
/* Network */
"--share=network",
/* Keyring */
"--talk-name=org.freedesktop.secrets",
"--talk-name=org.freedesktop.Flatpak",
/* Screenshot (used to scan QR code)*/
"--talk-name=org.gnome.Shell.Screenshot",
/* Follow Night Light Settings */
"--talk-name=org.gnome.SettingsDaemon.Color",
/* dconf */
"--filesystem=xdg-run/dconf", "--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf",
/* Pyzbar library path */
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf",
"--env=DCONF_USER_CONFIG_DIR=.config/dconf",
"--env=ZBAR_PATH=/app/lib/libzbar.so",
/* GNOME Search Provider */
"--own-name=com.github.bilelmoussaoui.AuthenticatorDevel.SearchProvider"
],
"modules": [{
"name": "zbar",
"config-opts": [
"modules" : [
{
"name" : "zbar",
"config-opts" : [
"--without-qt",
"--without-gtk",
"--without-xv",
......@@ -39,193 +38,213 @@
"--without-python",
"--enable-codes=qrcode"
],
"sources": [{
"type": "git",
"url": "git://git.linuxtv.org/zbar.git",
"commit": "14900c67eccfb97e152063296f20cd32aa787578"
"sources" : [
{
"type" : "git",
"url" : "git://git.linuxtv.org/zbar.git",
"commit" : "14900c67eccfb97e152063296f20cd32aa787578"
},
{
"type": "script",
"dest-filename": "autogen.sh",
"commands": [
"type" : "script",
"dest-filename" : "autogen.sh",
"commands" : [
"autoreconf -vfi -W none"
]
}
]
},
{
"name": "pyotp",
"buildsystem": "simple",
"build-commands": [
"name" : "pyotp",
"buildsystem" : "simple",
"build-commands" : [
"python3 setup.py install --prefix=/app"
],
"ensure-writable": [
"ensure-writable" : [
"/lib/python*/site-packages/easy-install.pth",
"/lib/python*/site-packages/setuptools.pth",
"/app/lib/python*/site-packages/easy-install.pth",
"/app/lib/python*/site-packages/setuptools.pth"
],
"sources": [{
"type": "archive",
"url": "https://pypi.python.org/packages/ac/0c/bd96508e36956ae627e527a7a7fba486865a738b4682e7290cd0e7c34f52/pyotp-2.2.4.tar.gz#md5=16cb1a08d38777ca74b5e9c7803810b6",
"sha256": "92c3973ba91273e7e4a7fd4a1020ae4b050ccd2e149b554911e1b45ca458ac2d"
}]
"sources" : [
{
"type" : "archive",
"url" : "https://pypi.python.org/packages/ac/0c/bd96508e36956ae627e527a7a7fba486865a738b4682e7290cd0e7c34f52/pyotp-2.2.4.tar.gz#md5=16cb1a08d38777ca74b5e9c7803810b6",
"sha256" : "92c3973ba91273e7e4a7fd4a1020ae4b050ccd2e149b554911e1b45ca458ac2d"
}
]
},
{
"name": "python-pillow",
"buildsystem": "simple",
"build-options": {
"arch": {
"i386": {
"env": {
"MAX_CONCURRENCY": "1"
"name" : "python-pillow",
"buildsystem" : "simple",
"build-options" : {
"arch" : {
"i386" : {
"env" : {
"MAX_CONCURRENCY" : "1"
}
},
"arm": {
"env": {
"MAX_CONCURRENCY": "1"
"arm" : {
"env" : {
"MAX_CONCURRENCY" : "1"
}
}
}
},
"ensure-writable": [
"ensure-writable" : [
"/lib/python*/site-packages/easy-install.pth",
"/lib/python*/site-packages/setuptools.pth",
"/app/lib/python*/site-packages/easy-install.pth",
"/app/lib/python*/site-packages/setuptools.pth"
],
"build-commands": [
"build-commands" : [
"python3 setup.py install --prefix=/app"
],
"sources": [{
"type": "archive",
"url": "https://github.com/python-pillow/Pillow/archive/5.0.0.tar.gz",
"sha256": "e85301adaa827b9f29ab518eff99d5719e572ca5f369866ebfe57a92e7135aec"
"sources" : [
{
"type" : "archive",
"url" : "https://github.com/python-pillow/Pillow/archive/5.0.0.tar.gz",
"sha256" : "e85301adaa827b9f29ab518eff99d5719e572ca5f369866ebfe57a92e7135aec"
},
{
"type": "shell",
"commands": [
"type" : "shell",
"commands" : [
"sed -i 's/if not platform_/if not dirs/' setup.py"
]
}
]
},
{
"name": "beautifulsoup4",
"buildsystem": "simple",
"build-commands": [
"name" : "beautifulsoup4",
"buildsystem" : "simple",
"build-commands" : [
"python3 setup.py install --prefix=/app"
],
"ensure-writable": [
"ensure-writable" : [
"/lib/python*/site-packages/easy-install.pth",
"/lib/python*/site-packages/setuptools.pth",
"/app/lib/python*/site-packages/easy-install.pth",
"/app/lib/python*/site-packages/setuptools.pth"
],
"sources": [{
"type": "archive",
"url": "https://www.crummy.com/software/BeautifulSoup/bs4/download/4.7/beautifulsoup4-4.7.0.tar.gz",
"sha256": "e394827904cc4923f443e8dd2e9968343669c8e1ad7a8d62d7541e780884acb8"
}],
"modules": [{
"name": "soupsieve",
"buildsystem": "simple",
"build-commands": [
"python3 setup.py install --prefix=/app"
],
"ensure-writable": [
"/lib/python*/site-packages/easy-install.pth",
"/lib/python*/site-packages/setuptools.pth",
"/app/lib/python*/site-packages/easy-install.pth",
"/app/lib/python*/site-packages/setuptools.pth"
],
"sources": [{
"type": "archive",
"url": "https://files.pythonhosted.org/packages/ad/30/4bed751373bef51a7a1897a31bfbd2df8a7e3a7e81e080aef118fe4fc486/soupsieve-1.6.1.tar.gz",
"sha256": "f7d99b41637be2f249dfcc06ae93c13fcbbdfa7bb68b15308cdd0734e58146f1"
}]
}]
"sources" : [
{
"type" : "archive",
"url" : "https://www.crummy.com/software/BeautifulSoup/bs4/download/4.7/beautifulsoup4-4.7.0.tar.gz",
"sha256" : "e394827904cc4923f443e8dd2e9968343669c8e1ad7a8d62d7541e780884acb8"
}
],
"modules" : [
{
"name" : "soupsieve",
"buildsystem" : "simple",
"build-commands" : [
"python3 setup.py install --prefix=/app"
],
"ensure-writable" : [
"/lib/python*/site-packages/easy-install.pth",
"/lib/python*/site-packages/setuptools.pth",
"/app/lib/python*/site-packages/easy-install.pth",
"/app/lib/python*/site-packages/setuptools.pth"
],
"sources" : [
{
"type" : "archive",
"url" : "https://files.pythonhosted.org/packages/ad/30/4bed751373bef51a7a1897a31bfbd2df8a7e3a7e81e080aef118fe4fc486/soupsieve-1.6.1.tar.gz",
"sha256" : "f7d99b41637be2f249dfcc06ae93c13fcbbdfa7bb68b15308cdd0734e58146f1"
}
]
}
]
},
{
"name": "python3-requests",
"buildsystem": "simple",
"build-commands": [
"name" : "python3-requests",
"buildsystem" : "simple",
"build-commands" : [
"pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} requests"
],
"sources": [
"sources" : [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz",
"sha256": "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407"
"type" : "file",
"url" : "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz",
"sha256" : "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/52/2c/514e4ac25da2b08ca5a464c50463682126385c4272c18193876e91f4bc38/requests-2.21.0.tar.gz",
"sha256": "502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e"
"type" : "file",
"url" : "https://files.pythonhosted.org/packages/52/2c/514e4ac25da2b08ca5a464c50463682126385c4272c18193876e91f4bc38/requests-2.21.0.tar.gz",
"sha256" : "502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/55/54/3ce77783acba5979ce16674fc98b1920d00b01d337cfaaf5db22543505ed/certifi-2018.11.29.tar.gz",
"sha256": "47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7"
"type" : "file",
"url" : "https://files.pythonhosted.org/packages/55/54/3ce77783acba5979ce16674fc98b1920d00b01d337cfaaf5db22543505ed/certifi-2018.11.29.tar.gz",
"sha256" : "47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz",
"sha256": "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22"
"type" : "file",
"url" : "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz",
"sha256" : "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz",
"sha256": "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
"type" : "file",
"url" : "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz",
"sha256" : "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
}
]
},
{
"name": "pyzbar",
"buildsystem": "simple",
"build-commands": [
"name" : "pyzbar",
"buildsystem" : "simple",
"build-commands" : [
"python3 setup.py install --prefix=/app"
],
"ensure-writable": [
"ensure-writable" : [
"/lib/python*/site-packages/easy-install.pth",
"/lib/python*/site-packages/setuptools.pth",
"/app/lib/python*/site-packages/easy-install.pth",
"/app/lib/python*/site-packages/setuptools.pth"
],
"sources": [{
"type": "archive",
"url": "https://github.com/NaturalHistoryMuseum/pyzbar/archive/v0.1.7.tar.gz",
"sha256": "4dbbece533650f2aeb6c8d1f41cf424614d2877d7331c48a9eed35ae9f949626"
},
{
"type": "patch",
"path": "pyzbar.patch"
}]
"sources" : [
{
"type" : "archive",
"url" : "https://github.com/NaturalHistoryMuseum/pyzbar/archive/v0.1.7.tar.gz",
"sha256" : "4dbbece533650f2aeb6c8d1f41cf424614d2877d7331c48a9eed35ae9f949626"
},
{
"type" : "patch",
"path" : "pyzbar.patch"
}
]
},
{
"name": "libhandy",
"buildsystem": "meson",
"config-opts": [
"name" : "libhandy",
"buildsystem" : "meson",
"config-opts" : [
"-Dtests=false",
"-Dexamples=false",
"-Dglade_catalog=disabled",
"-Dvapi=false"
],
"sources": [{
"type": "git",
"url": "https://source.puri.sm/Librem5/libhandy.git"
}]
"sources" : [
{
"type" : "git",
"url" : "https://source.puri.sm/Librem5/libhandy.git"
}
]
},
{
"name": "Authenticator",
"buildsystem": "meson",
"config-opts": [
"name" : "Authenticator",
"buildsystem" : "meson",
"config-opts" : [
"-Dprofile=development"
],
"sources": [{
"type": "git",
"url": "https://gitlab.gnome.org/World/Authenticator.git"
}]
"sources" : [
{
"type" : "git",
"url" : "https://gitlab.gnome.org/World/Authenticator.git"
}
]
}
],
"build-options" : {
"env" : {
}
]
}
}
[Shell Search Provider]
DesktopId=@appid@.desktop
BusName=@appid@.SearchProvider
ObjectPath=/com/github/bilelmoussaoui/Authenticator@profile@/SearchProvider
DesktopId=@APP_ID@.desktop
BusName=@APP_ID@.SearchProvider
ObjectPath=/com/github/bilelmoussaoui/Authenticator@PROFILE_SUFFIX@/SearchProvider
Version=2
[D-BUS Service]
Name=@appid@.SearchProvider
Exec=@libexecdir@/authenticator-search-provider
Name=@APP_ID@.SearchProvider
Exec=@LIBEXECDIR@/authenticator-search-provider
<?xml version="1.0" encoding="UTF-8"?>
<!-- Bilal Elmoussaoui 2019 <bilal.elmoussaoui@gnome.org> -->
<component type="desktop-application">
<id>@appid@</id>
<id>@APP_ID@</id>
<metadata_license>CC0</metadata_license>
<project_license>GPL-3.0+</project_license>
<name>Authenticator</name>
......@@ -146,6 +146,6 @@
</kudos>
<developer_name>Bilal Elmoussaoui</developer_name>
<update_contact>bilal.elmoussaoui@gnome.org</update_contact>
<translation type="gettext">@gettext-package@</translation>
<launchable type="desktop-id">@appid@.desktop</launchable>
<translation type="gettext">@GETTEXT_PACKAGE@</translation>
<launchable type="desktop-id">@APP_ID@.desktop</launchable>
</component>
......@@ -8,6 +8,6 @@ Terminal=false
Categories=GNOME;GTK;Security;Utility;
Keywords=Gnome;GTK;Verification;2FA;Authentication;TwoFactor;
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=@appid@
Icon=@APP_ID@
StartupNotify=true
StartupWMClass=com.github.bilelmoussaoui.Authenticator
StartupWMClass=@APP_ID@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<schema path="@schema-path@" id="@app-id@" gettext-domain="@gettext-package@">
<schema path="@SCHEMA_PATH@" id="@APP_ID@" gettext-domain="@GETTEXT_PACKAGE@">
<key name="window-position" type="ai">
<default>[0,0]</default>
<summary>Default window position</summary>
......
......@@ -20,63 +20,60 @@ gnome.compile_resources(
application_id,
meson.project_name() + '.gresource.xml',
gresource_bundle: true,
install_dir: join_paths(get_option('datadir'), meson.project_name()),
install_dir: pkgdatadir,
install: true,
dependencies: ui_dependencies
)
# Install gschema
gschema_conf = configuration_data()
gschema_conf.set('app-id', application_id)
gschema_conf.set('gettext-package', gettext_package)
if get_option('profile') == 'development'
gschema_conf.set('schema-path', '/com/github/bilelmoussaoui/Authenticator/')
else
gschema_conf.set('schema-path', '/com/github/bilelmoussaoui/AuthenticatorDevel/')
endif
gschema_conf.set('APP_ID', application_id)
gschema_conf.set('GETTEXT_PACKAGE', gettext_package)
gschema_conf.set('SCHEMA_PATH', '/com/github/bilelmoussaoui/Authenticator' + profile_suffix + '/')
configure_file(
configuration: gschema_conf,
input: files(meson.project_name() + '.gschema.xml.in'),
install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas'),
input: meson.project_name() + '.gschema.xml.in',
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas',
output: '@0@.gschema.xml'.format(application_id)
)
# GNOME Shell Search Provider Service
search_service_provider_conf = configuration_data()
search_service_provider_conf.set('appid', application_id)
search_service_provider_conf.set('libexecdir', LIBEXEC_DIR)
search_service_provider_conf.set('APP_ID', application_id)
search_service_provider_conf.set('LIBEXECDIR', libexecdir)
configure_file(
configuration: search_service_provider_conf,
input: files(meson.project_name() + '.SearchProvider.service.in'),
install_dir: join_paths(get_option('datadir'), 'gnome-shell', 'search-providers'),
input: meson.project_name() + '.SearchProvider.service.in',
install_dir: get_option('datadir') / 'gnome-shell' / 'search-providers',
output: '@0@.SearchProvider.service'.format(application_id)
)
# GNOME Shell Search Provider
search_provider_conf = configuration_data()
search_provider_conf.set('appid', application_id)
search_provider_conf.set('profile', profile_suffix)
search_provider_conf.set('APP_ID', application_id)
search_provider_conf.set('PROFILE_SUFFIX', profile_suffix)
configure_file(
configuration: search_provider_conf,
input: files(meson.project_name() + '.SearchProvider.ini.in'),
input: meson.project_name() + '.SearchProvider.ini.in',
install_dir: join_paths(get_option('datadir'), 'gnome-shell', 'search-providers'),
output: '@0@.SearchProvider.ini'.format(application_id)
)
# FreeDesktop Desktop File
desktop_conf = configuration_data()
desktop_conf.set('appid', application_id)
desktop_conf.set('APP_ID', application_id)
desktop_file = i18n.merge_file(
'desktop',
input: configure_file(
input: files(meson.project_name() + '.desktop.in.in'),
output: '@0@.desktop.in'.format(application_id),
input: meson.project_name() + '.desktop.in.in',
output: '@BASENAME@',
configuration: desktop_conf
),
output: '@0@.desktop'.format(application_id),
po_dir: join_paths(meson.source_root(), 'po'),
po_dir: podir,
type: 'desktop',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
install_dir: get_option('datadir') / 'applications'
)
# Validate Desktop File
desktop_file_validate = find_program('desktop-file-validate', required: false)
......@@ -90,19 +87,19 @@ endif
# Freedesktop AppData File
appdata_conf = configuration_data()
appdata_conf.set('appid', application_id)
appdata_conf.set('gettext-package', gettext_package)
appdata_conf.set('APP_ID', application_id)
appdata_conf.set('GETTEXT_PACKAGE', gettext_package)
appdata_file = i18n.merge_file(
'appdata',
input: configure_file(
input: files(meson.project_name() + '.appdata.xml.in.in'),
output: '@0@.appdata.xml.in'.format(application_id),
input: meson.project_name() + '.appdata.xml.in.in',
output: '@BASENAME@',
configuration: appdata_conf
),
output: '@0@.appdata.xml'.format(application_id),
po_dir: join_paths(meson.source_root(), 'po'),
po_dir: podir,
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
install_dir: get_option('datadir') / 'metainfo'
)
# Validate AppData File
appstream_util = find_program('appstream-util', required: false)
......
project('com.github.bilelmoussaoui.Authenticator', 'c',
version: '3.32',
meson_version: '>= 0.48',
meson_version: '>= 0.50',
license: 'GPL+-3.0'
)
python = import('python3')
gnome = import('gnome')
i18n = import('i18n')
gettext_package = 'Authenticator'
profile = get_option('profile')
profile_suffix = ''
name_suffix = ''
if profile != 'default'
gettext_package += profile
if profile == 'beta'
name_suffix = ' (Beta)'
profile_suffix = 'Beta'
else
name_suffix = ' (Development)'
profile_suffix = 'Devel'
endif
# This doesn't work yet. It's doesn't find the python3 from the sandboxed env first
# python = import('python')
# python3 = python.find_installation('python3')
python = import('python3')
python3 = python.find_python()
if not python3.found()
error('No valid python3 binary found')
else
message('Found python3 binary')
endif
application_id = 'com.github.bilelmoussaoui.Authenticator@0@'.format(profile_suffix)
message('Looking for dependencies')
dependency('glib-2.0')
dependency('gobject-2.0')
dependency('gobject-introspection-1.0')
dependency('gtk+-3.0', version: '>=3.16')
dependency('libsecret-1')
dependency('zbar', version: '>= 0.20.1')
find_program('glib-compile-schemas', required: true)
find_program('gtk-update-icon-cache', required: false)
find_program('update-desktop-database', required: false)
python3 = python.find_python()
if not python3.found()
error('No valid python3 binary found')
else
message('Found python3 binary')
gettext_package = 'Authenticator'
profile = get_option('profile')
profile_suffix = ''
name_suffix = ''
if profile != 'default'
gettext_package += profile
if profile == 'beta'
name_suffix = ' (Beta)'
profile_suffix = 'Beta'
else
name_suffix = ' (Development)'
profile_suffix = 'Devel'
endif
endif
LOCALE_DIR = join_paths(get_option('prefix'), get_option('localedir'))
PKGDATA_DIR = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
LIBEXEC_DIR = join_paths(get_option('prefix'), get_option('libexecdir'))
application_id = 'com.github.bilelmoussaoui.Authenticator@0@'.format(profile_suffix)
localedir = get_option('prefix') / get_option('localedir')
pkgdatadir = get_option('prefix') / get_option('datadir') / meson.project_name()
libexecdir = get_option('prefix') / get_option('libexecdir')
pythondir = get_option('prefix') / python.sysconfig_path('purelib')
# Configuration params
conf = configuration_data()
conf.set('APP_ID', application_id)
conf.set('GETTEXT_PACKAGE', gettext_package)
conf.set('PKGDATA_DIR', PKGDATA_DIR)
conf.set('LOCALE_DIR', LOCALE_DIR)
conf.set('PYTHON_DIR', join_paths(get_option('prefix'), python.sysconfig_path('purelib')))
conf.set('PYTHON_EXEC_DIR', join_paths(get_option('prefix'), python.sysconfig_path('stdlib')))
conf.set('VERSION', meson.project_version())
conf.set('PROFILE', profile)
conf.set('PRFOILE_SUFFIX', profile_suffix)
conf.set('NAME_SUFFIX', name_suffix)
conf.set('libexecdir', LIBEXEC_DIR)
conf.set('PYTHON', python3.path())
podir = meson.source_root() / 'po'
subdir('data')
subdir('po')
subdir('src')
meson.add_install_script('build-aux/meson_post_install.py')
......@@ -20,7 +20,6 @@
"""
import sys
sys.path.insert(1, '@PYTHON_EXEC_DIR@')
sys.path.insert(1, '@PYTHON_DIR@')
from gi import require_version
......
......@@ -32,7 +32,6 @@ require_version("Handy", "0.0")
require_version('Secret', '1')
from gi.repository import Gio, Handy
sys.path.insert(1, '@PYTHON_EXEC_DIR@')
sys.path.insert(1, '@PYTHON_DIR@')
def prepare_locale():
......@@ -48,8 +47,6 @@ if __name__ == "__main__":
parser = argparse.ArgumentParser(prog="Authenticator")
parser.add_argument("--debug", "-d", action="store_true",
help=_("Start in debug mode"))
parser.add_argument("--version", "-v", action="store_true",
help=_("Authenticator version number"))
args = parser.parse_args()
resource = Gio.resource_load(path.join('@PKGDATA_DIR@', '@APP_ID@.gresource'))
......@@ -63,15 +60,12 @@ if __name__ == "__main__":
faulthandler.enable()
Logger.set_level(level)
if args.version:
sys.exit("Version : @VERSION@")
else:
try:
Handy.init(None)
from Authenticator.application import Application
app = Application.get_default()
app.props.profile = '@@'
exit_status = app.run(None)
sys.exit(exit_status)
except KeyboardInterrupt:
exit()
try:
Handy.init(None)
from Authenticator.application import Application
app = Application.get_default()
app.props.profile = '@PROFILE@'
exit_status = app.run(None)
sys.exit(exit_status)
except KeyboardInterrupt:
exit()
bin_conf = configuration_data()
bin_conf.set('APP_ID', application_id)
bin_conf.set('GETTEXT_PACKAGE', gettext_package)
bin_conf.set('LOCALE_DIR', localedir)
bin_conf.set('PKGDATA_DIR', pkgdatadir)
bin_conf.set('PROFILE', profile)
bin_conf.set('PYTHON_DIR', pythondir)
bin_conf.set('PYTHON', python3.path())
configure_file(
input: 'authenticator.py.in',
output: 'authenticator',
configuration: conf,
configuration: bin_conf,
install_dir: get_option('bindir')
)
search_provider_bin_conf = configuration_data()
search_provider_bin_conf.set('APP_ID', application_id)
search_provider_bin_conf.set('PRFOILE_SUFFIX', profile_suffix)
search_provider_bin_conf.set('PYTHON_DIR', pythondir)
search_provider_bin_conf.set('PYTHON', python3.path())
configure_file(
input: 'authenticator-search-provider.py.in',
output: 'authenticator-search-provider',
configuration: conf,
install_dir: get_option('libexecdir')
configuration: search_provider_bin_conf,
install_dir: libexecdir