Commit 7706199e authored by Stefano Facchini's avatar Stefano Facchini

Port to meson

parent 05171673
build
*.swp
The ChangeLog is autogenerated when creating the release.
If you are seeing this, use git log for viewing the list of changes.
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
NULL =
SUBDIRS = src data pixmaps help po
EXTRA_DIST = \
COPYING.docs
MAINTAINERCLEANFILES = \
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
$(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
m4 \
$(NULL)
dist-hook:
@if test -d "$(srcdir)/.git"; \
then \
echo Creating ChangeLog && \
(GIT_DIR=$(top_srcdir)/.git \
./missing --run git log --stat -M -C --name-status --date=short --no-color) | \
fmt --split-only > ChangeLog.tmp \
&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
|| ( rm -f ChangeLog.tmp ; \
echo Failed to generate ChangeLog >&2 ); \
else \
echo A git clone is required to generate a ChangeLog >&2; \
fi
-include $(top_srcdir)/git.mk
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
OLDDIR=`pwd`
cd $srcdir
AUTORECONF=`which autoreconf`
if test -z $AUTORECONF; then
echo "*** No autoreconf found, please install it ***"
exit 1
fi
GNOMEDOC=`which yelp-build`
if test -z $GNOMEDOC; then
echo "*** The tools to build the documentation are not found,"
echo " please install the yelp-tools package ***"
exit 1
fi
autopoint --force || exit $?
autoreconf --force --install --verbose
cd $OLDDIR
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
#!/usr/bin/python3
import os
import pathlib
import subprocess
prefix = pathlib.Path(os.environ.get('MESON_INSTALL_PREFIX', '/usr/local'))
datadir = prefix / 'share'
destdir = os.environ.get('DESTDIR', '')
if not destdir:
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', str(datadir / 'glib-2.0' / 'schemas')])
print('Updating icon cache...')
subprocess.call(['gtk-update-icon-cache', '-qtf', str(datadir / 'icons' / 'hicolor')])
print('Updating desktop database...')
subprocess.call(['update-desktop-database', '-q', str(datadir / 'applications')])
dnl -*- mode: m4 -*-
AC_PREREQ(2.63)
AC_INIT([baobab],
[3.26.0],
[http://bugzilla.gnome.org/enter_bug.cgi?product=baobab],
[baobab])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_SRCDIR(src/main.vala)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip -Wno-portability foreign])
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AM_PROG_VALAC([0.38.0.11])
PKG_PROG_PKG_CONFIG([0.22])
## don't rerun to this point if we abort
AC_CACHE_SAVE
GLIB_GSETTINGS
# Resources
AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
# Mallard help
YELP_HELP_INIT
APPSTREAM_XML
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.8])
AC_SUBST([GETTEXT_PACKAGE], [baobab])
PKG_CHECK_MODULES(BAOBAB, [
gtk+-3.0 >= 3.19.1
glib-2.0 >= 2.39.90
gio-2.0 >= 2.30.0
])
AC_CONFIG_FILES([
Makefile
data/Makefile
data/org.gnome.baobab.gschema.xml
help/Makefile
pixmaps/Makefile
src/Makefile
po/Makefile.in
])
AC_OUTPUT
echo "
Baobab $VERSION
prefix: ${prefix}
Vala compiler: ${VALAC}
C compiler: ${CC}
Now type 'make' to build $PACKAGE
"
NULL =
baobabappdir = $(datadir)/applications
baobabapp_in_files = org.gnome.baobab.desktop.in
baobabapp_DATA = $(baobabapp_in_files:.desktop.in=.desktop)
$(baobabapp_in_files): $(baobabapp_in_files:.desktop.in=.desktop.in.in)
sed -e "s|\@VERSION\@|@VERSION@|" $< > $@
$(baobabapp_DATA): $(baobabapp_in_files)
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
appstream_in_files = org.gnome.baobab.appdata.xml.in
appstream_XML = $(appstream_in_files:.appdata.xml.in=.appdata.xml)
@APPSTREAM_XML_RULES@
$(appstream_XML): $(appstream_in_files)
$(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
dbusservicedir = $(datadir)/dbus-1/services
dbusservice_DATA = org.gnome.baobab.service
org.gnome.baobab.service: Makefile
$(AM_V_GEN) (echo '[D-BUS Service]'; \
echo 'Name=org.gnome.baobab'; \
echo 'Exec=${bindir}/baobab --gapplication-service') > $@.tmp && \
mv $@.tmp $@
gsettingsschema_in_files = org.gnome.baobab.gschema.xml.in
gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
@GSETTINGS_RULES@
man_MANS = baobab.1
EXTRA_DIST = \
org.gnome.baobab.desktop.in.in \
$(gsettingsschema_in_files) \
$(man_MANS) \
$(baobabicon_DATA) \
$(appstream_in_files) \
$(NULL)
CLEANFILES = \
$(baobabapp_in_files) \
$(baobabapp_DATA) \
$(gsettings_SCHEMAS) \
$(appstream_XML) \
org.gnome.baobab.service \
$(NULL)
-include $(top_srcdir)/git.mk
icondir = join_paths(get_option('datadir'), 'icons/hicolor')
foreach size: ['16x16', '22x22', '32x32', '48x48', '256x256', 'symbolic']
install_subdir('icons/hicolor/' + size, install_dir: icondir)
endforeach
install_man ('baobab.1')
desktop_file = i18n.merge_file(
input: 'org.gnome.baobab.desktop.in',
output: 'org.gnome.baobab.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications'),
)
appdata_file = i18n.merge_file(
input: 'org.gnome.baobab.appdata.xml.in',
output: 'org.gnome.baobab.appdata.xml',
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'appdata'),
)
gschema_file = i18n.merge_file(
input: 'org.gnome.baobab.gschema.xml.in',
output: 'org.gnome.baobab.gschema.xml',
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas')
)
service_conf = configuration_data ()
service_conf.set ('bindir', join_paths (get_option('prefix'), get_option('bindir')))
configure_file (
input: 'org.gnome.baobab.service.in',
output: 'org.gnome.baobab.service',
configuration: service_conf,
install_dir: join_paths(get_option('datadir'), 'dbus-1', 'services')
)
......@@ -13,8 +13,4 @@ StartupNotify=true
MimeType=inode/directory;
Categories=GTK;GNOME;System;Filesystem;X-GNOME-Utilities;
NotShowIn=KDE;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-utils
X-GNOME-Bugzilla-Component=baobab
X-GNOME-Bugzilla-Version=@VERSION@
DBusActivatable=true
<schemalist gettext-domain="@GETTEXT_PACKAGE@">
<schemalist gettext-domain="baobab">
<schema id="org.gnome.baobab" path="/org/gnome/baobab/">
<child name="preferences" schema="org.gnome.baobab.preferences"/>
<child name="ui" schema="org.gnome.baobab.ui"/>
......
[D-BUS Service]
Name=org.gnome.baobab
Exec=@bindir@/baobab --gapplication-service
This diff is collapsed.
@YELP_HELP_RULES@
HELP_ID = baobab
# List of pages
HELP_FILES = \
index.page \
introduction.page \
legal.xml \
pref-view-chart.page \
problem-permissions.page \
problem-slow-scan.page \
question-open-folder.page \
question-trash.page \
scan-file-system.page \
scan-folder.page \
scan-home.page \
scan-remote.page
# List of figures to be included
HELP_MEDIA = \
media/hicolor_apps_48x48_baobab.png
# List of translations
HELP_LINGUAS = ca cs da de el es fi fr gl hu id it ko pl pt pt_BR ru sl sv zh_CN
-include $(top_srcdir)/git.mk
help_files = [
'index.page',
'introduction.page',
'pref-view-chart.page',
'problem-permissions.page',
'problem-slow-scan.page',
'question-open-folder.page',
'question-trash.page',
'scan-file-system.page',
'scan-folder.page',
'scan-home.page',
'scan-remote.page',
'legal.xml'
]
help_media = [
'media/hicolor_apps_48x48_baobab.png'
]
help_linguas = [
'ca',
'cs',
'da',
'de',
'el',
'es',
'fi',
'fr',
'gl',
'hu',
'id',
'it',
'ko',
'pl',
'pt',
'pt_BR',
'ru',
'sl',
'sv',
'zh_CN'
]
gnome.yelp(
meson.project_name(),
sources: help_files,
media: help_media,
languages: help_linguas,
)
project(
'baobab', ['vala', 'c'],
version: '3.26.0',
license: 'GPL2+',
meson_version: '>= 0.41.0',
)
gnome = import('gnome')
i18n = import('i18n')
glib = dependency('glib-2.0', version: '>=2.44')
gio = dependency('gio-2.0', version: '>=2.44')
gio_unix = dependency('gio-unix-2.0', version: '>=2.44')
gobject = dependency('gobject-2.0', version: '>=2.44')
gtk = dependency('gtk+-3.0', version: '>=3.20')
cc = meson.get_compiler('c')
math = cc.find_library('m', required: false)
conf = configuration_data()
conf.set_quoted('PACKAGE_NAME', meson.project_name())
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
conf.set_quoted('VERSION', meson.project_version())
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('GNOMELOCALEDIR', join_paths(get_option('prefix'), get_option('datadir'), '/locale'))
configure_file(output: 'config.h', configuration: conf)
config_h_dir = include_directories('.')
meson.add_install_script(join_paths('build-aux', 'post-install.py'))
subdir('data')
subdir('help')
subdir('po')
subdir('src')
i18n.gettext(meson.project_name(), preset: 'glib')
NULL =
AM_CPPFLAGS = \
-DGETTEXT_PACKAGE=\""$(GETTEXT_PACKAGE)"\" \
-DGNOMELOCALEDIR=\""$(localedir)"\" \
$(NULL)
bin_PROGRAMS = baobab
BUILT_SOURCES = baobab-resources.c
baobab_VALAFLAGS = \
--target-glib=2.38 \
--pkg gtk+-3.0 \
--pkg gio-2.0 \
--pkg gio-unix-2.0 \
--gresources=baobab.gresource.xml \
$(NULL)
VALA_SOURCES = \
baobab-application.vala \
baobab-cellrenderers.vala \
baobab-chart.vala \
baobab-treemap.vala \
baobab-ringschart.vala \
baobab-location.vala \
baobab-location-list.vala \
baobab-scanner.vala \
baobab-window.vala \
main.vala \
$(NULL)
baobab_SOURCES = \
$(VALA_SOURCES) \
config.vapi \
$(BUILT_SOURCES) \
$(NULL)
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir=$(srcdir) $(srcdir)/baobab.gresource.xml)
baobab-resources.c: baobab.gresource.xml $(resource_files)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
AM_CFLAGS = \
$(BAOBAB_CFLAGS) \
-Wall \
-Wno-unused-but-set-variable \
-Wno-unused-variable \
$(NULL)
baobab_LDFLAGS = -rdynamic
baobab_LDADD = \
-lm \
$(BAOBAB_LIBS) \
$(NULL)
MAINTAINERCLEANFILES = \
*.stamp \
$(VALA_SOURCES:.vala=.c) \
$(BUILT_SOURCES) \
$(NULL)
EXTRA_DIST = \
baobab.gresource.xml \
$(resource_files) \
$(NULL)
-include $(top_srcdir)/git.mk
resource_files = files('baobab.gresource.xml')
resources = gnome.compile_resources('org.gnome.baobab', resource_files, c_name: 'resources')
vapi_sources = [
'config.vapi',
]
baobab_vala_sources = [
'baobab-application.vala',
'baobab-cellrenderers.vala',
'baobab-chart.vala',
'baobab-location-list.vala',
'baobab-location.vala',
'baobab-ringschart.vala',
'baobab-scanner.vala',
'baobab-treemap.vala',
'baobab-window.vala',
'main.vala'
]
baobab_sources = [
vapi_sources,
baobab_vala_sources,
resources
]
baobab_vala_args = [
'--target-glib', '2.44',
'--vapidir', meson.current_source_dir(),
'--gresources', resource_files,
]
baobab_c_args = [
'-include', 'config.h'
]
baobab_link_args = [
'-rdynamic'
]
baobab_dependencies = [
glib,
gio,
gio_unix,
gobject,
gtk,
math
]
executable('baobab', baobab_sources,
include_directories: config_h_dir,
vala_args: baobab_vala_args,
c_args: baobab_c_args,
dependencies: baobab_dependencies,
link_args: baobab_link_args,
install: true
)
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