]>
Commit | Line | Data |
---|---|---|
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 | # # | |
21 | # Modifications by: # | |
22 | # ??-12-2003 Mark Wormgoor < mark@wormgoor.com> # | |
23 | # - Modified Makefile for IPCop build # | |
24 | # # | |
25 | # $Id: newt,v 1.8.2.3 2005/02/05 15:38:15 gespinasse Exp $ | |
26 | # # | |
27 | ############################################################################### | |
28 | ||
29 | ############################################################################### | |
30 | # Definitions | |
31 | ############################################################################### | |
32 | ||
33 | include Config | |
34 | ||
35 | VER = 0.50.17 | |
36 | ||
37 | THISAPP = newt-utf8_$(VER) | |
38 | DL_FILE = $(THISAPP).orig.tar.gz | |
39 | DL_FROM = $(URL_DEBIAN)/n/newt-utf8 | |
40 | DIR_APP = $(DIR_SRC)/newt-0.50.17 | |
41 | ifeq "$(LFS_PASS)" "install" | |
42 | TARGET = $(DIR_INFO)/$(THISAPP)-install | |
43 | else | |
44 | TARGET = $(DIR_INFO)/$(THISAPP) | |
45 | endif | |
46 | ||
47 | ############################################################################### | |
48 | # Top-level Rules | |
49 | ############################################################################### | |
50 | ||
51 | objects = $(DL_FILE) $(THISAPP)-9.6.diff.gz | |
52 | ||
53 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
54 | $(THISAPP)-9.6.diff.gz = $(URL_DEBIAN)/n/newt-utf8/$(THISAPP)-9.6.diff.gz | |
55 | ||
56 | $(DL_FILE)_MD5 = 4079546c307475ef2508dd2e98ed505e | |
57 | $(THISAPP)-9.6.diff.gz_MD5 = 5f1522189bdb16622677ad8e52f93119 | |
58 | ||
59 | install : $(TARGET) | |
60 | ||
61 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
62 | ||
63 | download :$(patsubst %,$(DIR_DL)/%,$(objects)) | |
64 | ||
65 | md5 : $(subst %,%_MD5,$(objects)) | |
66 | ||
67 | ############################################################################### | |
68 | # Downloading, checking, md5sum | |
69 | ############################################################################### | |
70 | ||
71 | $(patsubst %,$(DIR_CHK)/%,$(objects)) : | |
72 | @$(CHECK) | |
73 | ||
74 | $(patsubst %,$(DIR_DL)/%,$(objects)) : | |
75 | @$(LOAD) | |
76 | ||
77 | $(subst %,%_MD5,$(objects)) : | |
78 | @$(MD5) | |
79 | ||
80 | ############################################################################### | |
81 | # Installation Details | |
82 | ############################################################################### | |
83 | ||
84 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
85 | @$(PREBUILD) | |
86 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) | |
87 | cd $(DIR_APP) && zcat $(DIR_DL)/$(THISAPP)-9.6.diff.gz | patch -Np1 | |
88 | cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/newt-0.50.17-colors.patch | |
89 | cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/newt-0.50.17-vaend.patch | |
90 | ifeq "$(LFS_PASS)" "install" | |
91 | cd $(DIR_APP) && ./configure --without-gpm-support --host $(MACHINE)-uclibc | |
92 | cd $(DIR_APP) && sed -i 's%^CFLAGS.*$$%CFLAGS = -Os -fomit-frame-pointer -Wall -D_GNU_SOURCE -DUTF8 -I/install/include/slang%' Makefile | |
93 | cd $(DIR_APP) && make libnewt.a | |
94 | cd $(DIR_APP) && install -m 0644 libnewt.a /install/lib | |
95 | cd $(DIR_APP) && install -m 0644 newt.h /install/include | |
96 | else | |
97 | cd $(DIR_APP) && RPM_OPT_FLAGS="$(CFLAGS) -DUTF8" ./configure --without-gpm-support | |
98 | cd $(DIR_APP) && sed -i \ | |
99 | -e 's/^PYVER.*$$/PYVER = 2.3/' \ | |
100 | -e 's/^all:.*$$/all: _snackmodule.so/' Makefile | |
101 | cd $(DIR_APP) && echo 'install-snack: _snackmodule.so' >> Makefile | |
102 | cd $(DIR_APP) && echo ' install -s -m 644 _snackmodule.so $$(instroot)/$$(pythonbindir)'>> Makefile | |
103 | cd $(DIR_APP) && echo ' install -m 644 snack.py $$(instroot)/$$(pythonbindir)' >> Makefile | |
104 | cd $(DIR_APP) && RPM_OPT_FLAGS="$(CFLAGS)" make install-snack | |
105 | cd $(DIR_APP) && RPM_OPT_FLAGS="$(CFLAGS)" make install-utf8sh | |
106 | cd $(DIR_APP) && install -m 0644 newt.h /usr/include | |
107 | ln -sf libnewt.so.0.50 /usr/lib/libnewt.so | |
108 | endif | |
109 | @rm -rf $(DIR_APP) | |
110 | @$(POSTBUILD) |