Skip to content

Commit

Permalink
bump pkgconfig and typelib version
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Crisci committed Nov 17, 2018
1 parent cb897bc commit 4b9e7a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions fpm-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fpm_deb() {
cd ${PROJECT_ROOT}
meson ${DEB_DIR}/build --prefix=/usr --libdir=/usr/lib
DESTDIR=${DEB_DIR}/install ninja -C ${DEB_DIR}/build install
VERSION=`LD_LIBRARY_PATH=${DEB_DIR}/install/usr/lib ${DEB_DIR}/install/usr/bin/playerctl -v | sed s/^v//`
VERSION=`LD_LIBRARY_PATH=${DEB_DIR}/install/usr/lib ${DEB_DIR}/install/usr/bin/playerctl -v | sed s/^v// | sed s/-.*//`

cd ${DEB_DIR}/install

Expand All @@ -51,7 +51,7 @@ function fpm_rpm() {
cd ${PROJECT_ROOT}
meson ${RPM_DIR}/build --prefix=/usr --libdir=/usr/lib64
DESTDIR=${RPM_DIR}/install ninja -C ${RPM_DIR}/build install
VERSION=`LD_LIBRARY_PATH=${RPM_DIR}/install/usr/lib64 ${RPM_DIR}/install/usr/bin/playerctl -v | sed s/^v//`
VERSION=`LD_LIBRARY_PATH=${RPM_DIR}/install/usr/lib64 ${RPM_DIR}/install/usr/bin/playerctl -v | sed s/^v// | sed s/-.*//`

cd ${RPM_DIR}/install

Expand Down
7 changes: 4 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,25 @@ pkgconfig = import('pkgconfig')

version_conf = configuration_data()

playerctl_version = meson.project_version()
playerctl_version = meson.project_version().split('-')[0]
version_array = playerctl_version.split('.')
playerctl_major_version = version_array[0]

version_conf.set(
'PLAYERCTL_VERSION',
meson.project_version(),
)
version_conf.set(
'PLAYERCTL_MAJOR_VERSION',
version_array[0].to_int(),
playerctl_major_version.to_int(),
)
version_conf.set(
'PLAYERCTL_MINOR_VERSION',
version_array[1].to_int(),
)
version_conf.set(
'PLAYERCTL_MICRO_VERSION',
version_array[2].split('-')[0].to_int(),
version_array[2].to_int(),
)

gobject_dep = dependency('gobject-2.0', version: '>=2.38')
Expand Down
8 changes: 4 additions & 4 deletions playerctl/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ deps = [
]

playerctl_lib = both_libraries(
'playerctl-1.0',
'playerctl',
playerctl_sources, enums,
dependencies: deps,
include_directories: configuration_inc,
version: '0.0.0',
version: playerctl_version,
install: true,
)

Expand Down Expand Up @@ -95,7 +95,7 @@ if get_option('introspection')
'playerctl-player.c',
'playerctl-player.h',
],
nsversion: '1.0',
nsversion: playerctl_major_version + '.0',
namespace: 'Playerctl',
includes: ['GObject-2.0'],
install: true,
Expand All @@ -107,7 +107,7 @@ pkgconfig.generate(
subdirs: 'playerctl',
version: meson.project_version(),
name: 'Playerctl',
filebase: 'playerctl-1.0',
filebase: 'playerctl',
description: 'A C library for MPRIS players',
requires: ['gobject-2.0'],
requires_private: 'gio-2.0',
Expand Down

0 comments on commit 4b9e7a4

Please sign in to comment.