Codebase list mozc / debian/2.17.2116.102+gitfd0f5b34+dfsg-1 debian / rules
debian/2.17.2116.102+gitfd0f5b34+dfsg-1

Tree @debian/2.17.2116.102+gitfd0f5b34+dfsg-1 (Download .tar.gz)

rules @debian/2.17.2116.102+gitfd0f5b34+dfsg-1

1ec0ee0
 
 
07e636f
3e5776c
 
 
 
 
b504398
05700e1
 
 
 
2f063ba
85d981b
 
 
fc5a522
871c6f2
e075c4a
871c6f2
 
fc5a522
 
3fa93fe
 
 
 
 
 
 
1ec0ee0
 
05700e1
1ec0ee0
 
682a06e
9ad9e88
2eb1a75
fc5a522
1ec0ee0
0387de5
682a06e
05700e1
1ec0ee0
 
682a06e
1ec0ee0
682a06e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1ec0ee0
28c6ac4
 
1ec0ee0
07e636f
682a06e
07e636f
b5b947c
 
 
 
 
3fa93fe
682a06e
3fa93fe
 
 
e940509
682a06e
3fa93fe
682a06e
ab4d86a
682a06e
9d172b3
ab4d86a
e940509
682a06e
e940509
2e885e5
682a06e
2e885e5
682a06e
2e885e5
682a06e
2e885e5
 
682a06e
2e885e5
682a06e
2e885e5
e940509
84fe4cf
d8fbbc5
 
 
84fe4cf
 
 
 
161aa48
 
 
#!/usr/bin/make -f
# -*- makefile -*-
#

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed

DEB_BUILD_MULTIARCH :=$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)
NUMJOBS=1
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

# clear XDG_CONFIG_DIRS for qtchooser
unexport XDG_CONFIG_DIRS

BUILD_DIR=./out_linux
TARGETS=unix/ibus/ibus.gyp:ibus_mozc \
	unix/emacs/emacs.gyp:mozc_emacs_helper \
	unix/uim/uim.gyp:uim-mozc \
	unix/fcitx/fcitx.gyp:fcitx-mozc \
	server/server.gyp:mozc_server gui/gui.gyp:mozc_tool \
	renderer/renderer.gyp:mozc_renderer

# for architecture dependent variables and changelog vars
vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1)))
CHANGELOG_VARS := $(shell dpkg-parsechangelog | \
	sed -n 's/ /_/g;/^[^_]/s/^\([^:]*\):_\(.*\)/\1=\2/p')

SOURCE_VERSION := $(call vafilt,$(CHANGELOG_VARS),Version)

%:
	dh $@ --parallel

override_dh_auto_configure:
	cd src ; \
	GYP_DEFINES="use_libprotobuf=1" python build_mozc.py gyp \
		--gypdir=/usr/bin \
		--build_base=$(BUILD_DIR)

override_dh_auto_build:
	cd src ; \
	V=1 python build_mozc.py build $(TARGETS) -c Release --jobs=$(NUMJOBS)

override_dh_auto_clean:
	cd src ; \
	python build_mozc.py clean
	-rm -rf src/build_tools/__init__.pyc
	-rm -rf src/build_tools/mozc_version.pyc
	-rm -rf src/build_tools/test_tools/__init__.pyc
	-rm -rf src/build_tools/test_tools/task_scheduler.pyc
	-rm -rf src/build_tools/util.pyc
	-rm -rf src/build_tools/code_generator_util.pyc
	-rm -rf src/build_tools/android_util.pyc
	-rm -rf src/rewriter/embedded_dictionary_compiler.pyc
	-rm -rf src/rewriter/__init__.pyc
	-rm -rf src/dictionary/pos_util.pyc
	-rm -rf src/dictionary/__init__.pyc
	-rm -rf src/third_party/rx/rx.Makefile
	-rm -rf src/build_tools/test_tools/test_launcher.pyc
	-rm -rf src/chrome/skk/skk_util_all_test.target.mk
	-rm -rf src/chrome/skk/skk_util_test.target.mk

	dh_auto_clean

override_dh_auto_install:
	# mozc-server
	install -D -m 0755 src/$(BUILD_DIR)/Release/mozc_renderer \
		$(CURDIR)/debian/mozc-server/usr/lib/mozc/mozc_renderer

	# mozc-utils-gui
	desktop-file-install --dir=$(CURDIR)/debian/mozc-utils-gui/usr/share/applications \
		$(CURDIR)/debian/setup-mozc.desktop

	# ibus-mozc
	install -D -m 0755 src/$(BUILD_DIR)/Release/ibus_mozc \
		$(CURDIR)/debian/ibus-mozc/usr/lib/ibus-mozc/ibus-engine-mozc
	install -d $(CURDIR)/debian/ibus-mozc/usr/share/ibus/component/
	sed -e 's|/usr/libexec/ibus-engine-mozc|/usr/lib/ibus-mozc/ibus-engine-mozc|' \
		-e 's|0\.0\.0\.0|$(SOURCE_VERSION)|g' < \
		src/$(BUILD_DIR)/Release/gen/unix/ibus/mozc.xml > \
		$(CURDIR)/debian/ibus-mozc/usr/share/ibus/component/mozc.xml

	# uim-mozc
	install -D -m 0755 src/$(BUILD_DIR)/Release/libuim-mozc.so  \
		 $(CURDIR)/debian/uim-mozc/usr/lib/$(DEB_BUILD_MULTIARCH)/uim/plugin/libuim-mozc.so

	# fcitx-mozc
	install -D -m 0755 src/$(BUILD_DIR)/Release/fcitx-mozc.so \
		 $(CURDIR)/debian/fcitx-mozc/usr/lib/$(DEB_BUILD_MULTIARCH)/fcitx/fcitx-mozc.so
	# mo
	install -D -m 0644 src/$(BUILD_DIR)/Release/gen/unix/fcitx/po/ja.mo \
		$(CURDIR)/debian/fcitx-mozc/usr/share/locale/ja/LC_MESSAGES/fcitx-mozc.mo
	install -D -m 0644 src/$(BUILD_DIR)/Release/gen/unix/fcitx/po/zh_TW.mo \
		$(CURDIR)/debian/fcitx-mozc/usr/share/locale/zh_TW/LC_MESSAGES/fcitx-mozc.mo
	install -D -m 0644 src/$(BUILD_DIR)/Release/gen/unix/fcitx/po/zh_CN.mo \
		$(CURDIR)/debian/fcitx-mozc/usr/share/locale/zh_CN/LC_MESSAGES/fcitx-mozc.mo
	# config file
	install -D -m 0644 src/unix/fcitx/fcitx-mozc.conf \
		$(CURDIR)/debian/fcitx-mozc/usr/share/fcitx/addon/fcitx-mozc.conf
	install -D -m 0644 src/unix/fcitx/mozc.conf \
		$(CURDIR)/debian/fcitx-mozc/usr/share/fcitx/inputmethod/mozc.conf

override_dh_fixperms-arch:
	chmod -x debian/emacs-mozc/usr/share/emacs/site-lisp/emacs-mozc/mozc.el
	dh_fixperms

override_dh_fixperms-indep:
	chmod -x debian/mozc-data/usr/share/icons/mozc/*.png
	dh_fixperms

.PHONY: override_dh_installemacsen
override_dh_installemacsen:
	dh_installemacsen --priority=50