~ubuntu-branches/ubuntu/oneiric/mozc/oneiric

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Nobuhiro Iwamatsu
  • Date: 2010-07-14 03:26:47 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100714032647-13qjisj6m8cm8jdx
Tags: 0.12.410.102-1
* New upstream release (Closes: #588971).
  - Add mozc-server, mozc-utils-gui and scim-mozc packages.
* Update debian/rules.
  Add --gypdir option to build_mozc.py.
* Update debian/control.
  - Bumped standards-version to 3.9.0.
  - Update description.
* Add mozc icon (Closes: #588972).
* Add patch which revises issue 18.
  ibus_mozc_issue18.patch
* kFreeBSD build support.
  support_kfreebsd.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
# -*- makefile -*-
3
3
#
4
 
BUILD_DIR=./out
5
 
TARGETS=unix/ibus/ibus.gyp:ibus_mozc
 
4
BUILD_DIR=./out_linux
 
5
TARGETS=unix/ibus/ibus.gyp:ibus_mozc unix/scim/scim.gyp:scim_mozc\
 
6
        unix/scim/scim.gyp:scim_mozc_setup server/server.gyp:mozc_server\
 
7
        gui/gui.gyp:mozc_tool
 
8
 
 
9
# for architecture dependent variables and changelog vars
 
10
vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1)))
 
11
CHANGELOG_VARS := $(shell dpkg-parsechangelog | \
 
12
        sed -n 's/ /_/g;/^[^_]/s/^\([^:]*\):_\(.*\)/\1=\2/p')
 
13
 
 
14
SOURCE_VERSION := $(call vafilt,$(CHANGELOG_VARS),Version)
 
15
SCIM_MODDIR=`pkg-config --variable=moduledir scim`
6
16
 
7
17
%:
8
18
        dh --with quilt $@ 
9
19
 
10
20
override_dh_auto_configure:
11
 
        python build_mozc.py gyp
 
21
        python build_mozc.py gyp --gypdir=/usr/bin
12
22
        python build_mozc.py build_tools -c Release
13
23
 
14
24
override_dh_auto_build:
18
28
        python build_mozc.py clean
19
29
        rm -rf build_tools/__init__.pyc 
20
30
        rm -rf build_tools/mozc_version.pyc
 
31
        rm -rf third_party/rx/rx.Makefile
21
32
 
22
33
override_dh_auto_install:
23
 
        mkdir -p $(CURDIR)/debian/ibus-mozc/usr/lib/ibus-mozc/
24
 
        cp -p $(BUILD_DIR)/Release/ibus_mozc $(CURDIR)/debian/ibus-mozc/usr/lib/ibus-mozc/ibus-engine-mozc
25
 
        mkdir -p $(CURDIR)/debian/ibus-mozc/usr/share/ibus/component/
26
 
        sed 's|/usr/libexec/ibus-engine-mozc|/usr/lib/ibus-mozc/ibus-engine-mozc|' < unix/ibus/mozc.xml > $(CURDIR)/debian/ibus-mozc/usr/share/ibus/component/mozc.xml
 
34
 
 
35
        # ibus-mozc
 
36
        install -D -m 0755  $(BUILD_DIR)/Release/ibus_mozc \
 
37
                $(CURDIR)/debian/ibus-mozc/usr/lib/ibus-mozc/ibus-engine-mozc
 
38
        install -d $(CURDIR)/debian/ibus-mozc/usr/share/ibus/component/
 
39
        sed -e 's|/usr/libexec/ibus-engine-mozc|/usr/lib/ibus-mozc/ibus-engine-mozc|' \
 
40
                -e 's|0\.0\.0\.0|$(SOURCE_VERSION)|g' < $(BUILD_DIR)/Release/obj/gen/unix/ibus/mozc.xml > \
 
41
                $(CURDIR)/debian/ibus-mozc/usr/share/ibus/component/mozc.xml
 
42
        install -D -m 0644 $(CURDIR)/debian/product_icon.png \
 
43
                $(CURDIR)/debian/ibus-mozc/usr/share/ibus-mozc/product_icon.png
 
44
        ln -s /usr/share/ibus-mozc/product_icon.png \
 
45
                $(CURDIR)/debian/ibus-mozc/usr/share/ibus-mozc/unknown.ico
 
46
 
 
47
        # scim-mozc
 
48
        install -D -m 0755 $(BUILD_DIR)/Release/lib.target/libscim_mozc.so \
 
49
                $(CURDIR)/debian/scim-mozc/$(SCIM_MODDIR)/IMEngine/mozc.so
 
50
        install -D -m 0755 $(BUILD_DIR)/Release/lib.target/libscim_mozc_setup.so \
 
51
                $(CURDIR)/debian/scim-mozc/$(SCIM_MODDIR)/SetupUI/mozc-setup.so
 
52
        install -D -m 0644 $(CURDIR)/debian/product_icon.png \
 
53
                $(CURDIR)/debian/scim-mozc/usr/share/scim/icons/scim-mozc.png
 
54
        install -D -m 0644 $(CURDIR)/debian/product_icon.png \
 
55
                $(CURDIR)/debian/scim-mozc/usr/share/scim/icons/scim-mozc-tool.png
 
56
 
 
57
        # mozc-server
 
58
        install -D -m 0755 $(BUILD_DIR)/Release/mozc_server \
 
59
                $(CURDIR)/debian/mozc-server/usr/lib/mozc/mozc_server
 
60
 
 
61
        # mozc-tool
 
62
        install -D -m 0755 $(BUILD_DIR)/Release/mozc_tool \
 
63
                $(CURDIR)/debian/mozc-utils-gui/usr/lib/mozc/mozc_tool
 
64