summaryrefslogtreecommitdiffstats
path: root/rules/locales.make
blob: 5ffb4111d2b1eee571dff67b4de0626c31723d8f (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# -*-makefile-*-
# $Id: template 6655 2007-01-02 12:55:21Z rsc $
#
# Copyright (C) 2007 by Luotao Fu <lfu@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_LOCALES) += locales

#
# Paths and names
#
LOCALES			:= locales
LOCALES_VERSION		:= 1.0
LOCALES_DIR		:= $(BUILDDIR)/$(LOCALES)-temp

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

locales_get: $(STATEDIR)/locales.get

$(STATEDIR)/locales.get: $(locales_get_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

$(LOCALES_SOURCE):
	@$(call targetinfo, $@)

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

locales_extract: $(STATEDIR)/locales.extract

$(STATEDIR)/locales.extract: $(locales_extract_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

locales_prepare: $(STATEDIR)/locales.prepare

#
# autoconf
#
LOCALES_AUTOCONF := $(CROSS_AUTOCONF_USR)

$(STATEDIR)/locales.prepare: $(locales_prepare_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(LOCALES_DIR)/config.cache)
	@mkdir -p $(LOCALES_DIR)/usr/lib/locale
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

locales_compile: $(STATEDIR)/locales.compile

$(STATEDIR)/locales.compile: $(locales_compile_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

locales_install: $(STATEDIR)/locales.install

$(STATEDIR)/locales.install: $(locales_install_deps_default)
	@$(call targetinfo, $@)
ifdef PTXCONF_LOCALES_EN_US
	@$(call add_locale, en_US, en_US, ISO-8859-1, $(LOCALES_DIR))
endif
ifdef PTXCONF_LOCALES_EN_GB
	@$(call add_locale, en_GB, en_GB, ISO-8859-1, $(LOCALES_DIR))
endif
ifdef PTXCONF_LOCALES_DE_DE
	@$(call add_locale, de_DE, de_DE, ISO-8859-1, $(LOCALES_DIR))
endif
ifdef PTXCONF_LOCALES_DE_DE_EURO
	@$(call add_locale, de_DE@euro, de_DE@euro, ISO-8859-15, $(LOCALES_DIR))
endif
ifdef PTXCONF_LOCALES_ZH_CN
	@$(call add_locale, zh_CN, zh_CN, GB2312, $(LOCALES_DIR))
endif
ifdef PTXCONF_LOCALES_ZH_CN_GBK
	@$(call add_locale, zh_CN.GBK, zh_CN, GBK, $(LOCALES_DIR))
endif
ifdef PTXCONF_LOCALES_ZH_CN_GB18030
	@$(call add_locale, zh_CN.GB18030, zh_CN, GB18030, $(LOCALES_DIR))
endif
ifdef PTXCONF_LOCALES_ZH_TW
	@$(call add_locale, zh_TW, zh_TW, BIG5, $(LOCALES_DIR))
endif
ifdef PTXCONF_LOCALES_ZH_HK
	@$(call add_locale, zh_HK, zh_HK, BIG5-HKSCS, $(LOCALES_DIR))
endif

	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

locales_targetinstall: $(STATEDIR)/locales.targetinstall

$(STATEDIR)/locales.targetinstall: $(locales_targetinstall_deps_default)
	@$(call targetinfo, $@)

	@$(call install_init, locales)
	@$(call install_fixup, locales,PACKAGE,locales)
	@$(call install_fixup, locales,PRIORITY,optional)
	@$(call install_fixup, locales,VERSION,$(LOCALES_VERSION))
	@$(call install_fixup, locales,SECTION,base)
	@$(call install_fixup, locales,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>")
	@$(call install_fixup, locales,DEPENDS,)
	@$(call install_fixup, locales,DESCRIPTION,missing)

	@$(call install_copy, locales, 0, 0, 0755, $(LOCALES_DIR)/usr/lib/locale/locale-archive, \
		/usr/lib/locale/locale-archive, n);
	@$(call install_finish, locales)
	
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

locales_clean:
	rm -rf $(STATEDIR)/locales.*
	rm -rf $(IMAGEDIR)/locales_*
	rm -rf $(LOCALES_DIR)

# vim: syntax=make