blob: 00d27d61f79c1cb333becaddfdded01ac683a37a [file] [log] [blame]
Eric Andersenffde94b2001-12-22 00:56:11 +00001#
2TARGETS += boa
3TARGETS_CLEAN += boa_clean
4TARGETS_MRPROPER += boa_mrproper
5TARGETS_DISTCLEAN += boa_distclean
6
Jon Nelson4d1404f2002-01-05 20:06:55 +00007BOA_VERSION=0.94.12pre1
8
Eric Andersenffde94b2001-12-22 00:56:11 +00009# Don't alter below this line unless you (think) you know
10# what you are doing! Danger, Danger!
11
Jon Nelson4d1404f2002-01-05 20:06:55 +000012BOA_URI=http://www.boa.org
13BOA_SOURCE=boa-$(BOA_VERSION).tar.gz
Eric Andersenffde94b2001-12-22 00:56:11 +000014BOA_DIR=$(BASE_DIR)/${shell basename $(BOA_SOURCE) .tar.gz}
15BOA_WORKDIR=$(BASE_DIR)/boa_workdir
Eric Andersenffde94b2001-12-22 00:56:11 +000016
17IMAGE_SIZE += +100
18
19$(SOURCE_DIR)/$(BOA_SOURCE):
20 while [ ! -f $(SOURCE_DIR)/$(BOA_SOURCE) ] ; do \
21 wget -P $(SOURCE_DIR) --passive-ftp $(BOA_URI)/$(BOA_SOURCE); \
22 done
23
24$(BOA_DIR)/.unpacked: $(SOURCE_DIR)/$(BOA_SOURCE)
25 tar -xzf $(SOURCE_DIR)/$(BOA_SOURCE)
26 touch $(BOA_DIR)/.unpacked
27
Jon Nelson4d1404f2002-01-05 20:06:55 +000028$(BOA_WORKDIR)/Makefile: $(TARGET_CC) $(BOA_DIR)/.unpacked
Jon Nelsonc79e9982002-01-05 20:26:15 +000029 rm -f $(BOA_WORKDIR)/Makefile
Eric Andersenffde94b2001-12-22 00:56:11 +000030 mkdir -p $(BOA_WORKDIR)
31 if [ -f $(SOURCE_DIR)/boa-config.site-$(ARCH) ]; then \
32 (cd $(BOA_WORKDIR) && CONFIG_SITE=$(SOURCE_DIR)/boa-config.site-$(ARCH) CC=$(TARGET_CC) $(BOA_DIR)/src/configure); \
33 else \
34 (cd $(BOA_WORKDIR) && CC=$(TARGET_CC) $(BOA_DIR)/src/configure); \
35 fi
Eric Andersenffde94b2001-12-22 00:56:11 +000036 touch $(BOA_WORKDIR)/.depend
Jon Nelson4d1404f2002-01-05 20:06:55 +000037 touch $(BOA_WORKDIR)/.unpacked
38
Jon Nelsonc79e9982002-01-05 20:26:15 +000039$(BOA_WORKDIR)/boa: $(BOA_WORKDIR)/Makefile
40 make VPATH=$(BOA_DIR)/src/ -C $(BOA_WORKDIR)
41
42$(BOA_WORKDIR)/boa_indexer: $(BOA_WORKDIR)/Makefile
Eric Andersenffde94b2001-12-22 00:56:11 +000043 make VPATH=$(BOA_DIR)/src/ -C $(BOA_WORKDIR)
Eric Andersenffde94b2001-12-22 00:56:11 +000044
Jon Nelson4d1404f2002-01-05 20:06:55 +000045$(BOA_WORKDIR)/.installed: $(BOA_WORKDIR)/boa $(BOA_WORKDIR)/boa_indexer
46 mkdir -p $(TARGET_DIR)/usr/sbin
47 cp -f $(BOA_WORKDIR)/boa $(TARGET_DIR)/usr/sbin/boa
48 mkdir -p $(TARGET_DIR)/usr/lib/boa
49 cp -f $(BOA_WORKDIR)/boa_indexer $(TARGET_DIR)/usr/lib/boa/boa_indexer
50 mkdir -p $(TARGET_DIR)/etc/boa
51 cp -f $(SOURCE_DIR)/boa.conf $(TARGET_DIR)/etc/boa
52 cp -f $(SOURCE_DIR)/mime.types $(TARGET_DIR)/etc/mime.types
53 strip --strip-all $(TARGET_DIR)/usr/sbin/boa $(TARGET_DIR)/usr/lib/boa/boa_indexer
54 touch $(BOA_WORKDIR)/.installed
Eric Andersenffde94b2001-12-22 00:56:11 +000055
Jon Nelson4d1404f2002-01-05 20:06:55 +000056boa: $(BOA_WORKDIR)/.installed
Eric Andersenffde94b2001-12-22 00:56:11 +000057
58boa_clean:
59 @if [ -d $(BOA_WORKDIR)/Makefile ] ; then \
60 make -C $(BOA_WORKDIR) clean ; \
61 fi;
62
63boa_mrproper:
64 rm -rf $(BOA_DIR) $(BOA_WORKDIR)
65
66boa_distclean: boa_mrproper
67 rm -f $(SOURCE_DIR)/$(BOA_SOURCE)