diff options
-rw-r--r-- | .gitignore | 19 | ||||
-rw-r--r-- | data/meson.build | 30 | ||||
-rw-r--r-- | data/org.gnome.PrepaidManager.gschema.xml (renamed from data/org.gnome.PrepaidManager.gschema.xml.in.in) | 34 | ||||
-rw-r--r-- | data/prepaid-manager-applet.appdata.xml.in | 32 | ||||
-rw-r--r-- | meson.build | 21 | ||||
-rw-r--r-- | po/POTFILES.in | 1 | ||||
-rw-r--r-- | po/meson.build | 2 | ||||
-rw-r--r-- | src/meson.build | 28 | ||||
-rw-r--r-- | src/ppm/__init__.py.in | 10 | ||||
-rw-r--r-- | src/ppm/meson.build | 24 | ||||
-rw-r--r-- | src/prepaid-manager-applet.desktop.in | 4 | ||||
-rwxr-xr-x | src/prepaid-manager-applet.in | 2 |
12 files changed, 146 insertions, 61 deletions
@@ -1,18 +1 @@ -config.log -config.status -aclocal.m4 -autom4te.cache/ -configure -COPYING -gnome-doc-utils.make -INSTALL -install-sh -Makefile -Makefile.in -missing -mkinstalldirs -prepaid-manager-applet-*.tar.gz - -data/gschemas.compiled -data/org.gnome.PrepaidManager.gschema.valid -data/org.gnome.PrepaidManager.gschema.xml +_build diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 0000000..3e052ac --- /dev/null +++ b/data/meson.build @@ -0,0 +1,30 @@ +schemas = ['org.gnome.PrepaidManager.gschema.xml'] +compiled = gnome.compile_schemas( + build_by_default: true +) + +install_data( + schemas, + install_dir: 'share/glib-2.0/schemas' +) + +appstream_file = i18n.merge_file( + input: 'prepaid-manager-applet.appdata.xml.in', + output: 'prepaid-manager-applet.appdata.xml', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'appdata') +) + +# Verify the AppStream file with the appropriate tool, if found. +appstream_util = find_program('appstream-util', required: false) +if appstream_util.found() + test('Validate appstream file', appstream_util, + args: ['validate-relax', appstream_file] + ) +endif + +iconsdir = join_paths(get_option('datadir'), 'icons', 'hicolor') +foreach size: ['scalable', '128x128', '64x64', '48x48', '32x32'] + install_subdir('icons/' + size, install_dir: iconsdir) +endforeach diff --git a/data/org.gnome.PrepaidManager.gschema.xml.in.in b/data/org.gnome.PrepaidManager.gschema.xml index 2b75c8e..75609a3 100644 --- a/data/org.gnome.PrepaidManager.gschema.xml.in.in +++ b/data/org.gnome.PrepaidManager.gschema.xml @@ -1,43 +1,43 @@ <schemalist> - <schema id="org.gnome.PrepaidManager" path="/apps/prepaid-manager/" gettext-domain="@GETTEXT_PACKAGE@"> + <schema id="org.gnome.PrepaidManager" path="/apps/prepaid-manager/"> <key name="accounts" type="as"> <default>[]</default> - <_summary>Accounts</_summary> - <_description> + <summary>Accounts</summary> + <description> List of configured accounts. The account at your GSM/UMTS provider is identified by the imsi on your SIM card. - </_description> + </description> </key> </schema> - <schema id="org.gnome.PrepaidManager.account" gettext-domain="@GETTEXT_PACKAGE@"> + <schema id="org.gnome.PrepaidManager.account"> <key name="provider" type="s"> <default>""</default> - <_summary>The providers name</_summary> - <_description> + <summary>The providers name</summary> + <description> The name of the mobile broadband provider. - </_description> + </description> </key> <key name="country" type="s"> <default>""</default> - <_summary>The country the provider operates in</_summary> - <_description> + <summary>The country the provider operates in</summary> + <description> This is the country where you bought the SIM card. - </_description> + </description> </key> <key name="balance" type="s"> <default>"The current balance is unknown."</default> - <_summary>Balance</_summary> - <_description> + <summary>Balance</summary> + <description> The current balance of this account. - </_description> + </description> </key> <key name="timestamp" type="s"> <default>""</default> - <_summary>Update timestamp</_summary> - <_description> + <summary>Update timestamp</summary> + <description> The last time the balance got updated. - </_description> + </description> </key> </schema> </schemalist> diff --git a/data/prepaid-manager-applet.appdata.xml.in b/data/prepaid-manager-applet.appdata.xml.in index a180ca5..e6b5aa2 100644 --- a/data/prepaid-manager-applet.appdata.xml.in +++ b/data/prepaid-manager-applet.appdata.xml.in @@ -1,22 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2014 Guido Günther <agx@sigxcpu.org> --> -<application> - <id type="desktop">prepaid-manager-applet.desktop</id> - <metadata_license>CC-BY-SA-3.0</metadata_license> - <description> - <_p> +<component type="desktop"> + <id>org.gnome.PrepaidManager</id> + <metadata_license>CC-BY-SA-3.0</metadata_license> + <project_license>GPL-3.0-or-later</project_license> + <name>Prepaid manager</name> + <description> GNOME Prepaid-manager-applet is an applet for the GNOME Desktop that allows you to check and top up the balance of GSM mobile prepaid SIM cards. - </_p> - <_p> + It uses ModemManager to talk to the modem and mobile-broadband-provider-info to determine the necessary USSD codes for your provider. - </_p> - </description> - <screenshots> - <screenshot type="default" width="411" height="183">https://honk.sigxcpu.org/piki/projects/ppm/check.png</screenshot> - <screenshot width="411" height="183">https://honk.sigxcpu.org/piki/projects/ppm/topup.png</screenshot> - </screenshots> - <url type="homepage">https://honk.sigxcpu.org/piki/projects/ppm/</url> - <updatecontact>agx_at_sigxcpu.org</updatecontact> -</application> + </description> + <url type="homepage">https://honk.sigxcpu.org/piki/projects/ppm/</url> + <updatecontact>agx@sigxcpu.org</updatecontact> + <screenshots> + <screenshot type="default" width="411" height="183">https://honk.sigxcpu.org/piki/projects/ppm/check.png</screenshot> + <screenshot width="411" height="183">https://honk.sigxcpu.org/piki/projects/ppm/topup.png</screenshot> + </screenshots> +</component> diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..a062639 --- /dev/null +++ b/meson.build @@ -0,0 +1,21 @@ +project('ppm', + version: '0.0.7', + meson_version: '>= 0.49.0', +) + +package = 'prepaid-manager-applet' +prefix = get_option('prefix') +datadir = join_paths(prefix, get_option('datadir')) +pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), package) + +gnome = import('gnome') +i18n = import('i18n') + +gio_dep = dependency('gio-2.0', version: '>=2.25.6') +gtk_dep = dependency('gtk+-3.0', version: '>=3.0.0') +pygobject_dep = dependency('pygobject-3.0', version: '>=3.0') + +subdir('data') +subdir('src') +subdir('po') + diff --git a/po/POTFILES.in b/po/POTFILES.in index 13933ad..04417b7 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,4 +1,3 @@ -data/org.gnome.PrepaidManager.gschema.xml.in.in data/prepaid-manager-applet.appdata.xml.in [type: gettext/glade]src/ppm.ui [type: gettext/glade]src/ppm-provider-assistant.ui diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000..90b98bc --- /dev/null +++ b/po/meson.build @@ -0,0 +1,2 @@ +i18n = import('i18n') +i18n.gettext(package, preset : 'glib') diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..e3d635c --- /dev/null +++ b/src/meson.build @@ -0,0 +1,28 @@ +desktop_file = i18n.merge_file( + input: 'prepaid-manager-applet.desktop.in', + output: 'prepaid-manager-applet.desktop', + type: 'desktop', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications') +) + +conf = configuration_data() +conf.set('PYTHONDIR', pkgdatadir) +conf.set('PACKAGE', package) + +configure_file( + input: 'prepaid-manager-applet.in', + output: 'prepaid-manager-applet', + configuration: conf, + install_dir: get_option('bindir') +) + +sources = [ + package + '.py', + 'ppm.ui', + 'ppm-provider-assistant.ui', +] +install_data(sources, install_dir: pkgdatadir) + +subdir('ppm') diff --git a/src/ppm/__init__.py.in b/src/ppm/__init__.py.in index 36220b2..7b36d80 100644 --- a/src/ppm/__init__.py.in +++ b/src/ppm/__init__.py.in @@ -1,7 +1,7 @@ # Paths for prepaid-manager-applet -gettext_app = '::PACKAGE::' -gettext_dir = '::GETTEXTDIR::' -ui_dir = '::PKGDATADIR::' -version = '::VERSION::' -prgname = '::PACKAGE::' +gettext_app = '@PACKAGE@' +gettext_dir = '@GETTEXTDIR@' +ui_dir = '@PKGDATADIR@' +version = '@VERSION@' +prgname = '@PACKAGE@' diff --git a/src/ppm/meson.build b/src/ppm/meson.build new file mode 100644 index 0000000..bda47c4 --- /dev/null +++ b/src/ppm/meson.build @@ -0,0 +1,24 @@ +pythondir = pkgdatadir / 'ppm' + +sources = [ + 'accountdb.py', + 'modemproxy.py', + 'provider.py', + 'providerdb.py', +] +install_data(sources, install_dir: pythondir) + +conf = configuration_data() +conf.set('VERSION', meson.project_version()) +conf.set('PACKAGE', package) +conf.set('PYLIBDIR', pkgdatadir) +conf.set('GETTEXTDIR', datadir / 'locale') +conf.set('DATADIR', datadir) +conf.set('PKGDATADIR', pkgdatadir) + +configure_file( + input: '__init__.py.in', + output: '__init__.py', + configuration: conf, + install_dir: pythondir, +) diff --git a/src/prepaid-manager-applet.desktop.in b/src/prepaid-manager-applet.desktop.in index a345d49..392c746 100644 --- a/src/prepaid-manager-applet.desktop.in +++ b/src/prepaid-manager-applet.desktop.in @@ -1,6 +1,6 @@ [Desktop Entry] -_Name=Prepaid Manager -_Comment=Manage balance of prepaid GSM SIM cards +Name=Prepaid Manager +Comment=Manage balance of prepaid GSM SIM cards Exec=prepaid-manager-applet Terminal=false Type=Application diff --git a/src/prepaid-manager-applet.in b/src/prepaid-manager-applet.in index 192cc22..561c09c 100755 --- a/src/prepaid-manager-applet.in +++ b/src/prepaid-manager-applet.in @@ -1,3 +1,3 @@ #!/bin/sh -exec python "::PYTHONDIR::/::PACKAGE::.py" "$@" +exec python "@PYTHONDIR@/@PACKAGE@.py" "$@" |