From dc6439b8382e1d67d253709dcae67840b48212a7 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 28 Oct 2018 18:19:11 +0100 Subject: [PATCH] Use version declared in configure.ac --- configure.ac | 11 ++++++++++- src/mpris.c | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index e99004c..38323e9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,11 @@ dnl Process this file with autoconf to produce a configure script. +m4_define([plugin_version_major], [1]) +m4_define([plugin_version_minor], [12]) +m4_define([plugin_version], [plugin_version_major.plugin_version_minor]) + AC_PREREQ([2.69]) -AC_INIT([deadbeef-mpris2-plugin], [1.11], [peterlamby@web.de], [DeaDBeeF MPRIS2 Plugin], [https://github.com/Serranya/deadbeef-mpris2-plugin]) +AC_INIT([deadbeef-mpris2-plugin], [plugin_version], [peterlamby@web.de], [DeaDBeeF MPRIS2 Plugin], [https://github.com/Serranya/deadbeef-mpris2-plugin]) AC_CONFIG_SRCDIR([src/mpris.c]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) @@ -18,6 +22,11 @@ AC_PROG_INSTALL AC_PROG_LIBTOOL PKG_PROG_PKG_CONFIG +AC_DEFINE(PLUGIN_VERSION_MAJOR, [plugin_version_major], + [Define to the plug-in major version]) +AC_DEFINE(PLUGIN_VERSION_MINOR, [plugin_version_minor], + [Define to the plug-in minor version]) + LT_INIT PKG_CHECK_MODULES([GLIB_DEPS], [glib-2.0], , AC_MSG_ERROR([glibc-2 is required for this package])) diff --git a/src/mpris.c b/src/mpris.c index fc9e85d..f250834 100644 --- a/src/mpris.c +++ b/src/mpris.c @@ -115,8 +115,8 @@ DB_misc_t plugin = { .plugin.api_vmajor = DB_API_VERSION_MAJOR,\ .plugin.api_vminor = DB_API_VERSION_MINOR, .plugin.type = DB_PLUGIN_MISC, - .plugin.version_major = 1, - .plugin.version_minor = 8, + .plugin.version_major = PLUGIN_VERSION_MAJOR, + .plugin.version_minor = PLUGIN_VERSION_MINOR, .plugin.id = "mpris", .plugin.name ="MPRISv2 plugin", .plugin.descr = "Communicate with other applications using D-Bus.",