rename toolchain/libmissing to libnotimpl (fix dnsiff build)
[openwrt.git] / obsolete-buildroot / make / oidentd.mk
1 ######################################################
2 #
3 # An example makefile to fetch a package from sources
4 # then fetch the ipkg updates required to the base package
5 # extract the archives into the build tree
6 # and then build the source
7 #
8 ######################################################
9
10
11 # For this example we'll use a fairly simple package that compiles easily
12 # and has sources available for download at sourceforge
13 OIDENTD=oidentd-2.0.7
14 OIDENTD_TARGET=oidentd
15 OIDENTD_DIR=$(BUILD_DIR)/oidentd-2.0.7
16 OIDENTD_IPKTARGET=oidentd-2.0.7_mipsel.ipk
17 OIDENTD_SITE=http://easynews.dl.sourceforge.net/sourceforge/ojnk
18 OIDENTD_SOURCE=oidentd-2.0.7.tar.gz
19 OIDENTDIPK_SITE=http://openwrt.rozeware.bc.ca/ipkg-dev
20 OIDENTDIPK_SRC=oidentd-2.0.7-pkg.tgz
21
22
23
24
25 # define a target for the master makefile
26 oidentd: $(OIDENTD_DIR)/$(OIDENTD_TARGET)
27
28 oidentd-ipk: $(BUILD_DIR)/$(OIDENTD_IPKTARGET)
29
30 # We need to download sources if we dont have them
31 $(DL_DIR)/$(OIDENTD_SOURCE) :
32 $(WGET) -P $(DL_DIR) $(OIDENTD_SITE)/$(OIDENTD_SOURCE)
33
34 # As well as the upstream package sources, we need the updates
35 # for ipkg packaging
36 $(DL_DIR)/$(OIDENTDIPK_SRC) :
37 $(WGET) -P $(DL_DIR) $(OIDENTDIPK_SITE)/$(OIDENTDIPK_SRC)
38
39 # if we have the sources, they do no good unless they are unpacked
40 $(OIDENTD_DIR)/.unpacked: $(DL_DIR)/$(OIDENTD_SOURCE)
41 tar -C $(BUILD_DIR) -zxf $(DL_DIR)/$(OIDENTD_SOURCE)
42 touch $(OIDENTD_DIR)/.unpacked
43
44 # if we have the sources unpacked, we need to configure them
45 $(OIDENTD_DIR)/.configured: $(OIDENTD_DIR)/.unpacked
46 (cd $(OIDENTD_DIR); rm -rf config.cache; \
47 $(TARGET_CONFIGURE_OPTS) \
48 ./configure \
49 --target=$(GNU_TARGET_NAME) \
50 --host=$(GNU_TARGET_NAME) \
51 --build=$(GNU_HOST_NAME) \
52 --prefix=/usr \
53 --exec-prefix=/usr \
54 --bindir=/usr/bin \
55 --sbindir=/usr/sbin \
56 );
57 touch $(OIDENTD_DIR)/.configured
58
59
60 # with the upstream sources unpacked, they still dont do much good without
61 # the ipkg control and rule files
62 $(OIDENTD_DIR)/ipkg/rules : $(DL_DIR)/$(OIDENTDIPK_SRC) $(OIDENTD_DIR)/.unpacked
63 tar -C $(OIDENTD_DIR) -zxf $(DL_DIR)/$(OIDENTDIPK_SRC)
64
65 # now that we have it all in place, just build it
66 $(OIDENTD_DIR)/$(OIDENTD_TARGET): $(OIDENTD_DIR)/.configured
67 cd $(OIDENTD_DIR); make
68
69
70 $(BUILD_DIR)/$(OIDENTD_IPKTARGET): $(OIDENTD_DIR)/$(OIDENTD_TARGET) $(OIDENTD_DIR)/ipkg/rules
71 (cd $(OIDENTD_DIR); $(IPKG_BUILDPACKAGE))
72
73
74
This page took 0.045164 seconds and 5 git commands to generate.