1 ###############################################################################
2 # This file is part of the IPCop Firewall. #
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. #
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. #
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 #
18 # Makefiles are based on LFSMake, which is #
19 # Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
21 ###############################################################################
23 ###############################################################################
25 ###############################################################################
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
38 TARGET = $(DIR_INFO)/$(THISAPP)
41 ###############################################################################
43 ###############################################################################
45 objects = $(DL_FILE) $(THISAPP)-9.6.diff.gz
47 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
48 $(THISAPP)-9.6.diff.gz = $(URL_DEBIAN)/n/newt-utf8/$(THISAPP)-9.6.diff.gz
50 $(DL_FILE)_MD5 = 4079546c307475ef2508dd2e98ed505e
51 $(THISAPP)-9.6.diff.gz_MD5 = 5f1522189bdb16622677ad8e52f93119
55 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
57 download :$(patsubst %,$(DIR_DL)/%,$(objects))
59 md5 : $(subst %,%_MD5,$(objects))
61 ###############################################################################
62 # Downloading, checking, md5sum
63 ###############################################################################
65 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
68 $(patsubst %,$(DIR_DL)/%,$(objects)) :
71 $(subst %,%_MD5,$(objects)) :
74 ###############################################################################
75 # Installation Details
76 ###############################################################################
78 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
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/install/include/slang%' Makefile
87 cd $(DIR_APP) && make libnewt.a
88 cd $(DIR_APP) && install -m 0644 libnewt.a /install/$(MACHINE)-uClibc/lib
89 -mkdir -p /install/$(MACHINE)-uClibc/include
90 cd $(DIR_APP) && install -m 0644 newt.h /install/$(MACHINE)-uClibc/include/newt.h
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