2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
11 PKG_NAME:=font-dec-misc
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
18 include $(INCLUDE_DIR)/package.mk
20 define Package/font-dec-misc
24 DEPENDS:= +xserver +font-util @DISPLAY_SUPPORT
26 URL:=http://xorg.freedesktop.org/
29 define Build/InstallDev
30 DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install
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
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 | \
41 find $(PKG_INSTALL_DIR) -name fonts.dir | \
43 mv {} {}.font-dec-misc
46 define Package/font-dec-misc/install
47 $(INSTALL_DIR) $(1)/usr/lib/
48 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
51 define Package/font-dec-misc/postinst
54 FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-dec-misc`
55 FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir
59 if [ ! -z $${FILE_NEW} ]; then
60 if [ -f $${FILE_OLD} ]; then
61 sed -i "1d" $${FILE_OLD}
62 cat $${FILE_NEW} >> $${FILE_OLD}
64 mv $${FILE_OLD} $${FILE_OLD}.tmp
66 mv $${FILE_NEW} $${FILE_OLD}.tmp
68 (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD}
73 ifeq (font-dec-misc,font-util)
75 $(MAKE) -C $(PKG_BUILD_DIR)/
79 $(eval $(call BuildPackage,font-dec-misc))