Root/stardict/Makefile

1#
2# Copyright (C) 2009 Qi Hardware Inc.
3# Author: Xiangfu Liu <xiangfu@sharism.cc>
4#
5# This is free software, licensed under the GNU General Public License v2.
6# See /LICENSE for more information.
7#
8
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=stardict
12PKG_VERSION:=3.0.1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=http://downloads.sourceforge.net/stardict/
16PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17
18PKG_INSTALL:=1
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/stardict/Default
23    SECTION:=utils
24    CATEGORY:=Utilities
25    DEPENDS:=stardict
26    TITLE:=International Dictionary Software
27endef
28
29define Package/stardict
30    $(call Package/stardict/Default)
31    DEPENDS:=+libintl +libiconv +libgconf2 +gtk2 +libstdcpp +libsigcxx
32endef
33
34define Package/stardict-dic-en-en
35    $(call Package/stardict/Default)
36    TITLE+=(dictionary: English <-> English)
37endef
38
39define Package/stardict-dic-en-cn
40    $(call Package/stardict/Default)
41    TITLE+=(dictionary: oxfordjm English <-> Chinses)
42endef
43
44define Package/stardict/description
45    StarDict is a Cross-Platform and international dictionary Software.
46endef
47
48TARGET_CFLAGS+= -I$(STAGING_DIR)/usr/lib/libintl/include
49TARGET_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/libintl/lib
50TARGET_LDFLAGS+= -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
51
52CONFIGURE_CMD =./autogen.sh
53
54CONFIGURE_ARGS += \
55    --disable-dependency-tracking \
56    --disable-libtool-lock \
57    --disable-spell \
58    --disable-gucharmap \
59    --disable-festival \
60    --disable-espeak \
61    --disable-dictdotcn \
62    --disable-advertisement \
63    --disable-man \
64    --disable-qqwry \
65    --disable-updateinfo \
66    --disable-htmlparse \
67    --disable-xdxfparse \
68    --disable-wordnet \
69    --disable-powerwordparse \
70    --disable-wikiparse \
71    --disable-schemas-install \
72    --disable-deprecations \
73    --disable-gnome-support \
74    --enable-nanonote-support
75
76define Package/stardict/install
77    $(INSTALL_DIR) \
78        $(1)/usr/bin \
79        $(1)/usr/share \
80        $(1)/usr/share/pixmaps
81
82    $(INSTALL_BIN) \
83        $(PKG_INSTALL_DIR)/usr/bin/stardict \
84        $(1)/usr/bin/
85
86    $(INSTALL_DATA) \
87        $(PKG_INSTALL_DIR)/usr/share/pixmaps/stardict.png \
88        $(1)/usr/share/pixmaps/
89
90    $(CP) \
91        $(PKG_INSTALL_DIR)/usr/share/stardict \
92        $(1)/usr/share/
93endef
94
95define Package/stardict-dic-en-en/install
96    $(INSTALL_DIR) \
97        $(1)/usr/share/stardict/dic
98
99    $(TAR) \
100        -C $(1)/usr/share/stardict/dic/ \
101        -jxf \
102        ./files/stardict-english-2.4.2.tar.bz2
103
104    $(CP) ./files/longman.idx.oft \
105        $(1)/usr/share/stardict/dic/stardict-english-2.4.2/
106endef
107
108define Package/stardict-dic-en-cn/install
109    $(INSTALL_DIR) \
110        $(1)/usr/share/stardict/dic
111
112    $(TAR) \
113        -C $(1)/usr/share/stardict/dic/ \
114        -jxf \
115        ./files/stardict-oxfordjm-ec-2.4.2.tar.bz2
116
117    $(CP) ./files/oxfordjm-ec.idx.oft \
118        $(1)/usr/share/stardict/dic/stardict-oxfordjm-ec-2.4.2/
119endef
120
121$(eval $(call BuildPackage,stardict))
122$(eval $(call BuildPackage,stardict-dic-en-en))
123$(eval $(call BuildPackage,stardict-dic-en-cn))
124

Archive Download this file



interactive