Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 1 | # |
| 2 | TARGETS += boa |
| 3 | TARGETS_CLEAN += boa_clean |
| 4 | TARGETS_MRPROPER += boa_mrproper |
| 5 | TARGETS_DISTCLEAN += boa_distclean |
| 6 | |
Jon Nelson | 4d1404f | 2002-01-05 20:06:55 +0000 | [diff] [blame] | 7 | BOA_VERSION=0.94.12pre1 |
| 8 | |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 9 | # Don't alter below this line unless you (think) you know |
| 10 | # what you are doing! Danger, Danger! |
| 11 | |
Jon Nelson | 4d1404f | 2002-01-05 20:06:55 +0000 | [diff] [blame] | 12 | BOA_URI=http://www.boa.org |
| 13 | BOA_SOURCE=boa-$(BOA_VERSION).tar.gz |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 14 | BOA_DIR=$(BASE_DIR)/${shell basename $(BOA_SOURCE) .tar.gz} |
| 15 | BOA_WORKDIR=$(BASE_DIR)/boa_workdir |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 16 | |
| 17 | IMAGE_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 Nelson | 4d1404f | 2002-01-05 20:06:55 +0000 | [diff] [blame] | 28 | $(BOA_WORKDIR)/Makefile: $(TARGET_CC) $(BOA_DIR)/.unpacked |
Jon Nelson | c79e998 | 2002-01-05 20:26:15 +0000 | [diff] [blame^] | 29 | rm -f $(BOA_WORKDIR)/Makefile |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 30 | 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 Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 36 | touch $(BOA_WORKDIR)/.depend |
Jon Nelson | 4d1404f | 2002-01-05 20:06:55 +0000 | [diff] [blame] | 37 | touch $(BOA_WORKDIR)/.unpacked |
| 38 | |
Jon Nelson | c79e998 | 2002-01-05 20:26:15 +0000 | [diff] [blame^] | 39 | $(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 Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 43 | make VPATH=$(BOA_DIR)/src/ -C $(BOA_WORKDIR) |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 44 | |
Jon Nelson | 4d1404f | 2002-01-05 20:06:55 +0000 | [diff] [blame] | 45 | $(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 Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 55 | |
Jon Nelson | 4d1404f | 2002-01-05 20:06:55 +0000 | [diff] [blame] | 56 | boa: $(BOA_WORKDIR)/.installed |
Eric Andersen | ffde94b | 2001-12-22 00:56:11 +0000 | [diff] [blame] | 57 | |
| 58 | boa_clean: |
| 59 | @if [ -d $(BOA_WORKDIR)/Makefile ] ; then \ |
| 60 | make -C $(BOA_WORKDIR) clean ; \ |
| 61 | fi; |
| 62 | |
| 63 | boa_mrproper: |
| 64 | rm -rf $(BOA_DIR) $(BOA_WORKDIR) |
| 65 | |
| 66 | boa_distclean: boa_mrproper |
| 67 | rm -f $(SOURCE_DIR)/$(BOA_SOURCE) |