Updated collectd to 4.4.4
[packages.git] / XOrg / font / font-daewoo-misc / Makefile
1
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # blogic@openwrt.org
8 include $(TOPDIR)/rules.mk
9
10 PKG_BASE_NAME:=font
11 PKG_NAME:=font-daewoo-misc
12 PKG_RELEASE:=2
13 PKG_VERSION:=1.0.0
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/
16 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/font-daewoo-misc
21   SECTION:=xorg-font
22   CATEGORY:=Xorg
23   SUBMENU:=font
24   DEPENDS:= +xorg-server +font-util @DISPLAY_SUPPORT
25   TITLE:=font-daewoo-misc
26   URL:=http://xorg.freedesktop.org/
27 endef
28
29 define Build/InstallDev
30         DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install
31 endef
32
33 CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4  --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201
34
35 define Build/Compile
36         UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR)
37         DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install
38         find $(PKG_INSTALL_DIR) -name fonts.dir | \
39                 xargs -i -t \
40                         sed -i '1d' {} 
41         find $(PKG_INSTALL_DIR) -name fonts.dir | \
42                 xargs -i -t \
43                         mv {} {}.font-daewoo-misc
44 endef
45
46 define Package/font-daewoo-misc/install
47         $(INSTALL_DIR) $(1)/usr/lib/
48         $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
49 endef
50
51 define Package/font-daewoo-misc/postinst
52 #!/bin/sh
53
54 FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-daewoo-misc`
55 FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir
56
57 echo found $${FILE}
58
59 if [ ! -z $${FILE_NEW} ]; then
60         if [ -f $${FILE_OLD} ]; then
61                 sed -i "1d" $${FILE_OLD}
62                 cat $${FILE_NEW} >> $${FILE_OLD}
63                 rm -rf $${FILE_NEW}
64                 mv $${FILE_OLD} $${FILE_OLD}.tmp
65         else
66                 mv $${FILE_NEW} $${FILE_OLD}.tmp
67         fi
68         (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD}
69         rm $${FILE_OLD}.tmp
70 fi
71 endef
72
73 ifeq (font-daewoo-misc,font-util)
74 define Build/Compile
75         $(MAKE) -C $(PKG_BUILD_DIR)/ 
76 endef
77 endif
78
79 $(eval $(call BuildPackage,font-daewoo-misc))
80