Commit 2e5bb981 authored by Felipe Borges's avatar Felipe Borges 👣 Committed by Felipe Borges

Port to meson

Fixes #37
parent 90448989
#!/usr/bin/python3
import os
import subprocess
import sys
destdir = os.environ.get('DESTDIR', '')
datadir = sys.argv[1]
bindir = os.path.normpath(destdir + os.sep + sys.argv[2])
if not os.path.exists(bindir):
os.makedirs(bindir)
src = os.path.join(datadir, 'gnome-sound-recorder', 'org.gnome.SoundRecorder')
dest = os.path.join(bindir, 'gnome-sound-recorder')
subprocess.call(['ln', '-s', '-f', src, dest])
if not os.environ.get('DESTDIR'):
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', os.path.join(datadir, 'glib-2.0', 'schemas')])
print('Updating icon cache...')
subprocess.call(['gtk-update-icon-cache', '-qtf', os.path.join(datadir, 'icons', 'hicolor')])
print('Updating desktop database...')
subprocess.call(['update-desktop-database', '-q', os.path.join(datadir, 'applications')])
i18n.merge_file(
'appdata-file',
input: '@0@.appdata.xml.in'.format(application_id),
output: '@0@.appdata.xml'.format(application_id),
po_dir: po_dir,
install: true,
install_dir: join_paths(sound_recorder_datadir, 'metainfo')
)
......@@ -2,23 +2,23 @@
<!-- Copyright 2014 Richard Hughes <richard@hughsie.com> -->
<component type="desktop">
<id>org.gnome.SoundRecorder.desktop</id>
<_name>Sound Recorder</_name>
<_summary>A simple, modern sound recorder for GNOME</_summary>
<name>Sound Recorder</name>
<summary>A simple, modern sound recorder for GNOME</summary>
<project_license>GPL-2.0+</project_license>
<metadata_license>CC0-1.0</metadata_license>
<description>
<_p>
<p>
Sound Recorder provides a simple and modern interface that provides a
straight-forward way to record and play audio.
It allows you to do basic editing, and create voice memos.
</_p>
<_p>
</p>
<p>
Sound Recorder automatically handles the saving process so that you
do not need to worry about accidentally discarding the previous recording.
</_p>
<_p>Supported audio formats:</_p>
</p>
<p>Supported audio formats:</p>
<ul>
<_li>Ogg Vorbis, Opus, FLAC, MP3 and MOV</_li>
<li>Ogg Vorbis, Opus, FLAC, MP3 and MOV</li>
</ul>
</description>
<screenshots>
......
foreach icon_size: ['16x16', '22x22', '24x24', '32x32', '48x48', '256x256']
icon_dir = join_paths('icons', 'hicolor', icon_size, 'apps')
install_data(
join_paths(icon_dir, '@0@.png'.format(application_id)),
install_dir: join_paths(sound_recorder_datadir, icon_dir)
)
endforeach
icon_dir = join_paths('icons', 'hicolor', 'symbolic', 'apps')
install_data(
join_paths(icon_dir, '@0@-symbolic.svg'.format(application_id)),
install_dir: join_paths(sound_recorder_datadir, icon_dir)
)
i18n.merge_file(
'desktop',
input: '@0@.desktop.in'.format(application_id),
output: '.@0@desktop'.format(application_id),
install: true,
install_dir: join_paths(sound_recorder_datadir, 'applications'),
po_dir: po_dir,
type: 'desktop'
)
gsettings_conf = configuration_data()
gsettings_conf.set('GETTEXT_PACKAGE', meson.project_name ())
configure_file(
input: 'org.gnome.gnome-sound-recorder.gschema.xml',
output: 'org.gnome.gnound-sound-recorder.gschema.xml',
configuration: gsettings_conf,
install: true,
install_dir: sound_recorder_schemadir
)
install_data(
'application.css',
install_dir: sound_recoder_pkgdatadir
)
subdir('appdata')
[Desktop Entry]
Please register or sign in to reply
Type=Application
_Name=Sound Recorder
_Comment=Record sound via the microphone and play it back
Name=Sound Recorder
Comment=Record sound via the microphone and play it back
Icon=org.gnome.SoundRecorder
Categories=GNOME;GTK;Audio;AudioVideo;
_Keywords=Audio;Application;Record;
Keywords=Audio;Application;Record;
Exec=gnome-sound-recorder
StartupNotify=true
project(
'gnome-sound-recorder',
version: '3.28.1',
license: 'GPL2+',
meson_version: '>= 0.46.0'
)
application_id = 'org.gnome.SoundRecorder'
sound_recorder_prefix = get_option('prefix')
sound_recorder_bindir = join_paths(sound_recorder_prefix, get_option('bindir'))
sound_recorder_libdir = join_paths(sound_recorder_prefix, get_option('libdir'))
sound_recorder_datadir = join_paths(sound_recorder_prefix, get_option('datadir'))
sound_recoder_pkgdatadir = join_paths(sound_recorder_datadir, meson.project_name())
sound_recorder_schemadir = join_paths(sound_recorder_datadir, 'glib-2.0', 'schemas')
gjs_dep = dependency('gjs-1.0', version: '>= 1.48.0')
gjs_console = gjs_dep.get_pkgconfig_variable('gjs_console')
# Lets check whether the dependencies exist
dependency('gio-2.0', version: '>= 2.43.4')
dependency('glib-2.0', version: '>= 2.39.3')
dependency('gtk+-3.0', version: '>= 3.12.0')
dependency('gobject-introspection-1.0', version: '>= 1.31.6')
gnome = import('gnome')
i18n = import('i18n')
po_dir = join_paths(meson.source_root(), 'po')
subdir('src')
subdir('data')
subdir('po')
meson.add_install_script(
join_paths('build-aux', 'meson_post_install.py'),
sound_recorder_datadir,
sound_recorder_bindir
)
\ No newline at end of file
i18n.gettext(meson.project_name(), preset: 'glib')
\ No newline at end of file
sound_recorder_sources = files(
'application.js',
'audioProfile.js',
'fileUtil.js',
'info.js',
'listview.js',
'main.js',
'mainWindow.js',
'params.js',
'play.js',
'preferences.js',
'record.js',
'util.js',
'waveform.js',
)
app_conf = configuration_data()
app_conf.set('prefix', sound_recorder_prefix)
app_conf.set('libdir', sound_recorder_libdir)
app_conf.set('PACKAGE_VERSION', meson.project_version())
app_conf.set('GJS', gjs_console)
configure_file(
input: 'org.gnome.SoundRecorder.in',
output: application_id,
install: true,
install_dir: sound_recoder_pkgdatadir,
configuration: app_conf
)
gnome.compile_resources(
application_id + '.src',
'org.gnome.SoundRecorder.src.gresource.xml',
source_dir: '.',
dependencies: sound_recorder_sources,
gresource_bundle: true,
install: true,
install_dir: sound_recoder_pkgdatadir
)
\ No newline at end of file
File mode changed from 100644 to 100755
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment