blob: 6b8b1b75c7f4fb77089e086483375780bc1d1828 [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
Jon Nelsone1be1ea2002-01-06 18:54:35 +000038$(BOA_WORKDIR)/boa $(BOA_WORKDIR)/boa_indexer: $(BOA_WORKDIR)/Makefile
39 rm -f $@
Eric Andersenffde94b2001-12-22 00:56:11 +000040 make VPATH=$(BOA_DIR)/src/ -C $(BOA_WORKDIR)
Eric Andersenffde94b2001-12-22 00:56:11 +000041
Jon Nelson4d1404f2002-01-05 20:06:55 +000042$(BOA_WORKDIR)/.installed: $(BOA_WORKDIR)/boa $(BOA_WORKDIR)/boa_indexer
43 mkdir -p $(TARGET_DIR)/usr/sbin
44 cp -f $(BOA_WORKDIR)/boa $(TARGET_DIR)/usr/sbin/boa
45 mkdir -p $(TARGET_DIR)/usr/lib/boa
46 cp -f $(BOA_WORKDIR)/boa_indexer $(TARGET_DIR)/usr/lib/boa/boa_indexer
47 mkdir -p $(TARGET_DIR)/etc/boa
48 cp -f $(SOURCE_DIR)/boa.conf $(TARGET_DIR)/etc/boa
49 cp -f $(SOURCE_DIR)/mime.types $(TARGET_DIR)/etc/mime.types
50 strip --strip-all $(TARGET_DIR)/usr/sbin/boa $(TARGET_DIR)/usr/lib/boa/boa_indexer
51 touch $(BOA_WORKDIR)/.installed
Eric Andersenffde94b2001-12-22 00:56:11 +000052
Jon Nelson4d1404f2002-01-05 20:06:55 +000053boa: $(BOA_WORKDIR)/.installed
Eric Andersenffde94b2001-12-22 00:56:11 +000054
55boa_clean:
56 @if [ -d $(BOA_WORKDIR)/Makefile ] ; then \
57 make -C $(BOA_WORKDIR) clean ; \
58 fi;
59
60boa_mrproper:
61 rm -rf $(BOA_DIR) $(BOA_WORKDIR)
62
63boa_distclean: boa_mrproper
64 rm -f $(SOURCE_DIR)/$(BOA_SOURCE)