aboutsummaryrefslogtreecommitdiff
path: root/src/ppm
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2020-03-31 14:56:41 +0200
committerGuido Günther <agx@sigxcpu.org>2020-03-31 14:56:41 +0200
commitfabe5a19a6068a2d47e11f8316a3a2d30aeff42e (patch)
treec85168d39d762d1a99c77b807244a5b3c15d0165 /src/ppm
parent5bcfd0ee2bbae2d638fd5abc3796be7d04af3747 (diff)
Switch to meson
Modernize the files that need updating for that.
Diffstat (limited to 'src/ppm')
-rw-r--r--src/ppm/__init__.py.in10
-rw-r--r--src/ppm/meson.build24
2 files changed, 29 insertions, 5 deletions
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,
+)