summaryrefslogtreecommitdiff
path: root/setup/Makefile.am
blob: 4f521789e7befcaa81e9466635c10b4dcf714d61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# vim:set noet ts=4:
#
# ibus-hangul - The Hangul Engine For IBus
#
# Copyright (c) 2009 Choe Hwanjin <choe.hwanjin@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

setup_hangul_PYTHON = \
	config.py \
	main.py \
	keycapturedialog.py \
	setup.ui \
	$(NULL)

nodist_setup_hangul_PYTHON = config.py

setup_hanguldir = $(pkgdatadir)/setup

libexec_SCRIPTS = ibus-setup-hangul

setuplibdir = $(pkglibdir)/setup
setuplib_PROGRAMS = hangul_keyboard_list

hangul_keyboard_list_SOURCES = hangul_keyboard_list.c
hangul_keyboard_list_CFLAGS = $(HANGUL_CFLAGS)
hangul_keyboard_list_LDADD = $(HANGUL_LIBS)

desktop_in_files = ibus-setup-hangul.desktop.in
desktop_DATA = ibus-setup-hangul.desktop
desktopdir = $(datadir)/applications
@INTLTOOL_DESKTOP_RULE@

hicolor_icon_64_DATA = ibus-setup-hangul.png
hicolor_icon_64dir = $(datadir)/icons/hicolor/64x64/apps

hicolor_icon_scalable_DATA = ibus-setup-hangul.svg
hicolor_icon_scalabledir = $(datadir)/icons/hicolor/scalable/apps

CLEANFILES = \
	ibus-setup-hangul \
	config.py \
	*.pyc \
	ibus-setup-hangul.desktop \
	$(NULL)

EXTRA_DIST = \
	config.py.in \
	ibus-setup-hangul.in \
	ibus-setup-hangul.desktop.in \
	$(hicolor_icon_64_DATA) \
	$(hicolor_icon_scalable_DATA) \
	$(NULL)

test:
	$(ENV_PROG) DBUS_DEBUG=true \
	       PYTHONPATH=$(abs_top_srcdir):$(pyexecdir) \
	       $(PYTHON) $(srcdir)/main.py

config.py: config.py.in Makefile
	sed -e 's&@SETUP_GETTEXT_PACKAGE@&$(GETTEXT_PACKAGE)&g' \
	    -e 's&@SETUP_LOCALEDIR@&$(localedir)&g' \
	    -e 's&@SETUP_PKGDATADIR@&$(pkgdatadir)&g' \
	    -e 's&@SETUP_PKGLIBDIR@&$(pkglibdir)&g' $< > $@

ibus-setup-hangul: ibus-setup-hangul.in config.py Makefile
	sed -e 's&@SETUP_PKGDATADIR@&$(pkgdatadir)&g' $< > $@

install-exec-hook:
	$(mkdir_p) $(DESTDIR)$(bindir)
	cd $(DESTDIR)$(bindir) && \
	rm -f ibus-setup-hangul && \
	a="$(bindir)"; b="$(libexecdir)"; updir=""; downdir=""; \
	while test "$$a" != "$$b"; do \
		bbase=`basename $$b`; \
		updir="../$$updir"; \
		downdir="$$bbase/$$downdir"; \
		a=`dirname $$a`; b=`dirname $$b`; \
	done; \
	$(LN_S) $$updir$${downdir}ibus-setup-hangul ibus-setup-hangul

uninstall-hook:
	cd "$(DESTDIR)$(bindir)" && rm -f ibus-setup-hangul