Codebase list mozc / debian/1.5.1053.102-1 debian / rules
debian/1.5.1053.102-1

Tree @debian/1.5.1053.102-1 (Download .tar.gz)

rules @debian/1.5.1053.102-1

1ec0ee0
 
 
2f063ba
b504398
2f063ba
 
 
 
 
 
b504398
2f063ba
737f319
 
e075c4a
737f319
e940509
c65335d
 
3fa93fe
 
 
 
 
 
 
 
1ec0ee0
 
 
 
 
9742087
ba4be97
c65335d
1ec0ee0
 
80560b7
 
1ec0ee0
 
 
 
 
3fa93fe
b504398
ea71978
 
1ec0ee0
 
3fa93fe
 
 
 
 
e940509
 
3fa93fe
b504398
3fa93fe
 
 
 
 
 
e940509
 
 
 
d8fbbc5
 
 
 
 
161aa48
 
 
#!/usr/bin/make -f
# -*- makefile -*-
#
DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
DEB_BUILD_MULTIARCH :=$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)
ifeq ($(DEB_BUILD_ARCH_OS),linux)
  BUILD_OS=linux
endif
ifeq ($(DEB_BUILD_ARCH_OS),kfreebsd)
  BUILD_OS=gnu-kfreebsd
endif
BUILD_DIR=./out_linux

TARGETS=unix/ibus/ibus.gyp:ibus_mozc \
	unix/scim/scim.gyp:scim_mozc unix/scim/scim.gyp:scim_mozc_setup \
	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)
SCIM_MODDIR=`pkg-config --variable=moduledir scim`

%:
	dh --with quilt $@ 

override_dh_auto_configure:
	python build_mozc.py gyp --gypdir=/usr/bin --channel_dev=0 \
		--os=$(BUILD_OS) --build_base=$(BUILD_DIR) \
		--use_libprotobuf --enable_gtk_renderer

override_dh_auto_build:
	python build_mozc.py build_tools -c Release --jobs=1
	python build_mozc.py build $(TARGETS) -c Release --jobs=1

override_dh_auto_clean:
	python build_mozc.py clean
	rm -rf build_tools/__init__.pyc 
	rm -rf build_tools/mozc_version.pyc
	rm -rf third_party/rx/rx.Makefile
	rm -rf build_tools/test_tools/__init__.pyc
	rm -rf build_tools/test_tools/task_scheduler.pyc
	rm -rf build_tools/util.pyc

override_dh_auto_install:
	# ibus-mozc
	install -D -m 0755  $(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' < \
		$(BUILD_DIR)/Release/obj/gen/unix/ibus/mozc.xml > \
		$(CURDIR)/debian/ibus-mozc/usr/share/ibus/component/mozc.xml
	
	# scim-mozc
	install -D -m 0755 $(BUILD_DIR)/Release/lib.target/libscim_mozc.so \
		$(CURDIR)/debian/scim-mozc/$(SCIM_MODDIR)/IMEngine/mozc.so
	install -D -m 0755 $(BUILD_DIR)/Release/lib.target/libscim_mozc_setup.so \
		$(CURDIR)/debian/scim-mozc/$(SCIM_MODDIR)/SetupUI/mozc-setup.so

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

override_dh_fixperms:
	chmod -x debian/mozc-data/usr/share/icons/mozc/*.png
	chmod -x debian/emacs-mozc/usr/share/emacs/site-lisp/emacs-mozc/mozc.el
	dh_fixperms

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