]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/newt
Busybox war gegen falsche Libc gelinkt.
[people/pmueller/ipfire-2.x.git] / lfs / newt
CommitLineData
cd1a2927
MT
1###############################################################################
2# This file is part of the IPCop Firewall. #
3# #
4# IPCop is free software; you can redistribute it and/or modify #
5# it under the terms of the GNU General Public License as published by #
6# the Free Software Foundation; either version 2 of the License, or #
7# (at your option) any later version. #
8# #
9# IPCop is distributed in the hope that it will be useful, #
10# but WITHOUT ANY WARRANTY; without even the implied warranty of #
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
12# GNU General Public License for more details. #
13# #
14# You should have received a copy of the GNU General Public License #
15# along with IPCop; if not, write to the Free Software #
16# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
17# #
18# Makefiles are based on LFSMake, which is #
19# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
20# #
cd1a2927
MT
21###############################################################################
22
23###############################################################################
24# Definitions
25###############################################################################
26
27include Config
28
29VER = 0.50.17
30
31THISAPP = newt-utf8_$(VER)
32DL_FILE = $(THISAPP).orig.tar.gz
a6316ce4 33DL_FROM = $(URL_IPFIRE)
cd1a2927
MT
34DIR_APP = $(DIR_SRC)/newt-0.50.17
35ifeq "$(LFS_PASS)" "install"
36 TARGET = $(DIR_INFO)/$(THISAPP)-install
37else
38 TARGET = $(DIR_INFO)/$(THISAPP)
39endif
40
41###############################################################################
42# Top-level Rules
43###############################################################################
44
45objects = $(DL_FILE) $(THISAPP)-9.6.diff.gz
46
47$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
48$(THISAPP)-9.6.diff.gz = $(URL_DEBIAN)/n/newt-utf8/$(THISAPP)-9.6.diff.gz
49
50$(DL_FILE)_MD5 = 4079546c307475ef2508dd2e98ed505e
51$(THISAPP)-9.6.diff.gz_MD5 = 5f1522189bdb16622677ad8e52f93119
52
53install : $(TARGET)
54
55check : $(patsubst %,$(DIR_CHK)/%,$(objects))
56
57download :$(patsubst %,$(DIR_DL)/%,$(objects))
58
59md5 : $(subst %,%_MD5,$(objects))
60
61###############################################################################
62# Downloading, checking, md5sum
63###############################################################################
64
65$(patsubst %,$(DIR_CHK)/%,$(objects)) :
66 @$(CHECK)
67
68$(patsubst %,$(DIR_DL)/%,$(objects)) :
69 @$(LOAD)
70
71$(subst %,%_MD5,$(objects)) :
72 @$(MD5)
73
74###############################################################################
75# Installation Details
76###############################################################################
77
78$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
79 @$(PREBUILD)
80 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
81 cd $(DIR_APP) && zcat $(DIR_DL)/$(THISAPP)-9.6.diff.gz | patch -Np1
82 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/newt-0.50.17-colors.patch
83 cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/newt-0.50.17-vaend.patch
84ifeq "$(LFS_PASS)" "install"
85 cd $(DIR_APP) && ./configure --without-gpm-support --host $(MACHINE)-uclibc
86 cd $(DIR_APP) && sed -i 's%^CFLAGS.*$$%CFLAGS = -Os -fomit-frame-pointer -Wall -D_GNU_SOURCE -DUTF8 -I/install/include/slang%' Makefile
87 cd $(DIR_APP) && make libnewt.a
c81f72a1 88 -mkdir -p /install/$(MACHINE)-uClibc/{include,lib}
d50b88e8 89 cd $(DIR_APP) && install -m 0644 libnewt.a /install/$(MACHINE)-uClibc/lib/libnewt.a
5bd13f01 90 cd $(DIR_APP) && install -m 0644 newt.h /install/$(MACHINE)-uClibc/include/newt.h
cd1a2927
MT
91else
92 cd $(DIR_APP) && RPM_OPT_FLAGS="$(CFLAGS) -DUTF8" ./configure --without-gpm-support
93 cd $(DIR_APP) && sed -i \
411afd1f 94 -e 's/^PYVER.*$$/PYVER = 2.4/' \
cd1a2927 95 -e 's/^all:.*$$/all: _snackmodule.so/' Makefile
0afc6d83
MT
96 cd $(DIR_APP) && echo 'install-snack: _snackmodule.so' >> Makefile
97 cd $(DIR_APP) && echo ' install -s -m 644 _snackmodule.so $$(instroot)/$$(pythonbindir)' >> Makefile
98 cd $(DIR_APP) && echo ' install -m 644 snack.py $$(instroot)/$$(pythonbindir)' >> Makefile
cd1a2927
MT
99 cd $(DIR_APP) && RPM_OPT_FLAGS="$(CFLAGS)" make install-snack
100 cd $(DIR_APP) && RPM_OPT_FLAGS="$(CFLAGS)" make install-utf8sh
101 cd $(DIR_APP) && install -m 0644 newt.h /usr/include
102 ln -sf libnewt.so.0.50 /usr/lib/libnewt.so
103endif
104 @rm -rf $(DIR_APP)
105 @$(POSTBUILD)