d/rules: Rebuild emoji data from source files

This provides a straightforward way to check that we have the correct
source files.
This commit is contained in:
Simon McVittie 2021-08-15 16:36:19 +01:00
parent 53547f43d6
commit d01e415e38
5 changed files with 34 additions and 0 deletions

20
debian/.gitignore vendored Normal file
View File

@ -0,0 +1,20 @@
/*.debhelper
/*.debhelper.log
/*.substvars
/.debhelper/
/convert-emoji
/debhelper-build-stamp
/files
/gir1.2-gtk-3.0/
/gtk-3-examples/
/gtk-update-icon-cache/
/libgail-3-0/
/libgail-3-dev/
/libgail-3-doc/
/libgtk-3-0-udeb/
/libgtk-3-0/
/libgtk-3-bin/
/libgtk-3-common/
/libgtk-3-dev/
/libgtk-3-doc/
/tmp/

1
debian/clean vendored Normal file
View File

@ -0,0 +1 @@
debian/convert-emoji

2
debian/control vendored
View File

@ -10,6 +10,7 @@ Build-Depends: adwaita-icon-theme <!nocheck>,
dh-sequence-gir, dh-sequence-gir,
fonts-cantarell <!nocheck>, fonts-cantarell <!nocheck>,
fonts-dejavu-core <!nocheck>, fonts-dejavu-core <!nocheck>,
gcc:native,
gnome-pkg-tools (>= 0.11), gnome-pkg-tools (>= 0.11),
gobject-introspection (>= 1.41.3), gobject-introspection (>= 1.41.3),
gsettings-desktop-schemas <!nocheck>, gsettings-desktop-schemas <!nocheck>,
@ -27,6 +28,7 @@ Build-Depends: adwaita-icon-theme <!nocheck>,
libgirepository1.0-dev (>= 1.39.0), libgirepository1.0-dev (>= 1.39.0),
libglib2.0-dev (>= 2.57.2), libglib2.0-dev (>= 2.57.2),
libharfbuzz-dev (>= 0.9), libharfbuzz-dev (>= 0.9),
libjson-glib-dev:native,
libpango1.0-dev (>= 1.41.0), libpango1.0-dev (>= 1.41.0),
librsvg2-common <!nocheck>, librsvg2-common <!nocheck>,
libwayland-dev (>= 1.14.91) [linux-any], libwayland-dev (>= 1.14.91) [linux-any],

2
debian/control.in vendored
View File

@ -10,6 +10,7 @@ Build-Depends: adwaita-icon-theme <!nocheck>,
dh-sequence-gir, dh-sequence-gir,
fonts-cantarell <!nocheck>, fonts-cantarell <!nocheck>,
fonts-dejavu-core <!nocheck>, fonts-dejavu-core <!nocheck>,
gcc:native,
gnome-pkg-tools (>= 0.11), gnome-pkg-tools (>= 0.11),
gobject-introspection (>= 1.41.3), gobject-introspection (>= 1.41.3),
gsettings-desktop-schemas <!nocheck>, gsettings-desktop-schemas <!nocheck>,
@ -27,6 +28,7 @@ Build-Depends: adwaita-icon-theme <!nocheck>,
libgirepository1.0-dev (>= 1.39.0), libgirepository1.0-dev (>= 1.39.0),
libglib2.0-dev (>= 2.57.2), libglib2.0-dev (>= 2.57.2),
libharfbuzz-dev (>= 0.9), libharfbuzz-dev (>= 0.9),
libjson-glib-dev:native,
libpango1.0-dev (>= 1.41.0), libpango1.0-dev (>= 1.41.0),
librsvg2-common <!nocheck>, librsvg2-common <!nocheck>,
libwayland-dev (>= 1.14.91) [linux-any], libwayland-dev (>= 1.14.91) [linux-any],

9
debian/rules vendored
View File

@ -166,6 +166,15 @@ override_dh_clean: debian/control
# Add dependencies to generate files from the debian/*.in ones # Add dependencies to generate files from the debian/*.in ones
override_dh_auto_build: $(call dh_subst_files,$(all_binaries)) override_dh_auto_build: $(call dh_subst_files,$(all_binaries))
override_dh_auto_build: rebuild-emoji
rebuild-emoji:
gcc -o debian/convert-emoji gtk/emoji/convert-emoji.c `pkg-config --cflags --libs json-glib-1.0`
set -eu; for input in debian/missing-sources/emojibase/packages/data/*/data.raw.json; do \
lang=$$(echo $$input | sed -ne 's,^.*/\([a-z][a-z]\)/data.raw.json$$,\1,p'); \
output=gtk/emoji/$$lang.data; \
debian/convert-emoji $$input $$output; \
done
override_dh_autoreconf: override_dh_autoreconf:
NOCONFIGURE=true dh_autoreconf ./autogen.sh NOCONFIGURE=true dh_autoreconf ./autogen.sh