diff options
author | Guido Günther <agx@sigxcpu.org> | 2020-03-31 14:56:41 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2020-03-31 14:56:41 +0200 |
commit | fabe5a19a6068a2d47e11f8316a3a2d30aeff42e (patch) | |
tree | c85168d39d762d1a99c77b807244a5b3c15d0165 /src | |
parent | 5bcfd0ee2bbae2d638fd5abc3796be7d04af3747 (diff) |
Switch to meson
Modernize the files that need updating for that.
Diffstat (limited to 'src')
-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 |
5 files changed, 60 insertions, 8 deletions
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" "$@" |