source: packages/Xorg/xorg/font/font-misc-misc/Makefile @ 19719

Last change on this file since 19719 was 19719, checked in by lars, 7 years ago

[packages] Add missing md5sums

File size: 3.6 KB
Line 
1#
2# Copyright (C) 2007-2009 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
9include $(TOPDIR)/rules.mk
10
11PKG_BASE_NAME:=font-base
12PKG_NAME:=font-misc-misc
13PKG_RELEASE:=1
14PKG_VERSION:=1.0.0
15PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font
16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17PKG_MD5SUM:=2a57f6188c41d4bc1b88ca3d08ad011d
18
19include $(INCLUDE_DIR)/package.mk
20
21define Package/font-misc-misc/Default
22  SECTION:=xorg-fonts
23  CATEGORY:=Xorg
24  SUBMENU:=font
25endef
26
27define Package/font-base
28  $(call Package/font-misc-misc/Default)
29  DEPENDS:=+xserver +font-util @DISPLAY_SUPPORT
30  TITLE:=font-base
31  URL:=http://xorg.freedesktop.org/
32endef
33
34define Package/font-misc-misc
35  $(call Package/font-misc-misc/Default)
36  DEPENDS:=font-base
37  TITLE:=font-misc-misc
38  URL:=http://xorg.freedesktop.org/
39endef
40
41
42CONFIGURE_ARGS_XTRA+=--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
43
44define Build/Compile
45        UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR)
46        DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install
47        find $(PKG_INSTALL_DIR) -name fonts.dir | \
48                xargs rm
49endef
50
51define Build/Configure
52        (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
53        if [ -x $(CONFIGURE_CMD) ]; then \
54                $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
55                        $(CONFIGURE_VARS) \
56                        $(CONFIGURE_CMD) \
57                        $(CONFIGURE_ARGS_XTRA) \
58                        $(CONFIGURE_ARGS) ;\
59        fi \
60        )
61endef
62
63define Build/InstallDev
64        DESTDIR=$(1) $(MAKE) -C $(PKG_BUILD_DIR)$(MAKE_FLAGS) install
65endef
66
67define Package/font-base/install
68        $(INSTALL_DIR) $(1)/usr/lib/X11/fonts/misc/
69        $(CP) $(PKG_INSTALL_DIR)/usr/lib/X11/fonts/misc/6x13* $(1)/usr/lib/X11/fonts/misc/
70        $(CP) files/fonts.dir.font-base $(1)/usr/lib/X11/fonts/misc/
71endef
72
73define Package/font-misc-misc/install
74        $(INSTALL_DIR) $(1)/usr/lib/X11/fonts/misc/
75        $(CP) $(PKG_INSTALL_DIR)/usr/lib/X11/fonts/misc/* $(1)/usr/lib/X11/fonts/misc/
76        rm $(1)/usr/lib/X11/fonts/misc/6x13*
77        $(CP) files/fonts.dir.font-misc-misc $(1)/usr/lib/X11/fonts/misc/
78endef
79
80define Package/font-base/postinst
81#!/bin/sh
82
83FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-base`
84FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir
85
86echo found $${FILE}
87
88if [ ! -z $${FILE_NEW} ]; then
89        if [ -f $${FILE_OLD} ]; then
90                sed -i "1d" $${FILE_OLD}
91                cat $${FILE_NEW} >> $${FILE_OLD}
92                rm -rf $${FILE_NEW}
93                mv $${FILE_OLD} $${FILE_OLD}.tmp
94        else
95                mv $${FILE_NEW} $${FILE_OLD}.tmp
96        fi
97        (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD}
98        rm $${FILE_OLD}.tmp
99fi
100endef
101
102define Package/font-misc-misc/postinst
103#!/bin/sh
104
105FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-misc-misc`
106FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir
107
108echo found $${FILE}
109
110if [ ! -z $${FILE_NEW} ]; then
111        if [ -f $${FILE_OLD} ]; then
112                sed -i "1d" $${FILE_OLD}
113                cat $${FILE_NEW} >> $${FILE_OLD}
114                rm -rf $${FILE_NEW}
115                mv $${FILE_OLD} $${FILE_OLD}.tmp
116        else
117                mv $${FILE_NEW} $${FILE_OLD}.tmp
118        fi
119        (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD}
120        rm $${FILE_OLD}.tmp
121fi
122endef
123
124# FIXME: replace with native versions
125$(eval $(call RequireCommand,mkfontscale, \
126        Please install mkfontscale (usually in xfonts-utils) \
127))
128$(eval $(call RequireCommand,mkfontdir, \
129        Please install mkfontdir (usually in xfonts-utils) \
130))
131
132$(eval $(call BuildPackage,font-misc-misc))
133$(eval $(call BuildPackage,font-base))
134
135
Note: See TracBrowser for help on using the repository browser.