]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - lfs/newt
"Update Booster" fertiggestellt und getestet.
[people/pmueller/ipfire-2.x.git] / lfs / newt
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 # #
21 ###############################################################################
22
23 ###############################################################################
24 # Definitions
25 ###############################################################################
26
27 include Config
28
29 VER = 0.50.17
30
31 THISAPP = newt-utf8_$(VER)
32 DL_FILE = $(THISAPP).orig.tar.gz
33 DL_FROM = $(URL_IPFIRE)
34 DIR_APP = $(DIR_SRC)/newt-0.50.17
35 ifeq "$(LFS_PASS)" "install"
36 TARGET = $(DIR_INFO)/$(THISAPP)-install
37 else
38 TARGET = $(DIR_INFO)/$(THISAPP)
39 endif
40
41 ###############################################################################
42 # Top-level Rules
43 ###############################################################################
44
45 objects = $(DL_FILE) $(THISAPP)-9.6.diff.gz
46
47 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
48 $(THISAPP)-9.6.diff.gz = $(DL_FROM)/$(THISAPP)-9.6.diff.gz
49
50 $(DL_FILE)_MD5 = 4079546c307475ef2508dd2e98ed505e
51 $(THISAPP)-9.6.diff.gz_MD5 = 5f1522189bdb16622677ad8e52f93119
52
53 install : $(TARGET)
54
55 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
56
57 download :$(patsubst %,$(DIR_DL)/%,$(objects))
58
59 md5 : $(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
84 ifeq "$(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/opt/i586-uClibc/include%' Makefile
87 cd $(DIR_APP) && make libnewt.a
88 -mkdir -p /opt/$(MACHINE)-uClibc/{include,lib}
89 cd $(DIR_APP) && install -m 0644 libnewt.a /opt/$(MACHINE)-uClibc/lib/libnewt.a
90 cd $(DIR_APP) && install -m 0644 newt.h /opt/$(MACHINE)-uClibc/include/newt.h
91 else
92 cd $(DIR_APP) && RPM_OPT_FLAGS="$(CFLAGS) -DUTF8" ./configure --without-gpm-support
93 cd $(DIR_APP) && sed -i \
94 -e 's/^PYVER.*$$/PYVER = 2.4/' \
95 -e 's/^all:.*$$/all: _snackmodule.so/' Makefile
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
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
103 endif
104 @rm -rf $(DIR_APP)
105 @$(POSTBUILD)