summaryrefslogtreecommitdiffstats
path: root/obsolete-buildroot
diff options
context:
space:
mode:
authorgroz <groz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-06-08 08:38:06 +0000
committergroz <groz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-06-08 08:38:06 +0000
commit2901ca675b2efbd0caaed3ec305fb913fe80dfdf (patch)
tree8cade8d6b5e8250d5e1a212bef319b277b7e2f93 /obsolete-buildroot
parent06716090127eff94b890e22d8677abe0443c107b (diff)
Integrated the -ipk target into the system for building ipkg files
Added wshaper.mk oidentd.mk sched-modules.mk git-svn-id: svn://svn.openwrt.org/openwrt/trunk@67 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'obsolete-buildroot')
-rw-r--r--obsolete-buildroot/make/iproute2.mk19
-rw-r--r--obsolete-buildroot/make/oidentd.mk74
-rw-r--r--obsolete-buildroot/make/sched-mod.mk44
-rw-r--r--obsolete-buildroot/make/wshaper.mk50
4 files changed, 187 insertions, 0 deletions
diff --git a/obsolete-buildroot/make/iproute2.mk b/obsolete-buildroot/make/iproute2.mk
index e7210b6ca..7d58309a2 100644
--- a/obsolete-buildroot/make/iproute2.mk
+++ b/obsolete-buildroot/make/iproute2.mk
@@ -15,12 +15,21 @@ IPROUTE2_SOURCE=iproute_20010824.orig.tar.gz
IPROUTE2_PATCH:=iproute_20010824-8.diff.gz
IPROUTE2_PATCH_2:=iproute2-cross-ar-20010824.patch
+IPROUTE2_IPKTARGET=iproute.ipk
+IPROUTE2_IPKSRC:=iproute-pkg.tgz
+IPROUTE2_IPKSITE:=http://openwrt.rozeware.bc.ca/ipkg-dev
+
+
$(DL_DIR)/$(IPROUTE2_SOURCE):
$(WGET) -P $(DL_DIR) $(IPROUTE2_SOURCE_URL)$(IPROUTE2_SOURCE)
$(DL_DIR)/$(IPROUTE2_PATCH):
$(WGET) -P $(DL_DIR) $(IPROUTE2_SOURCE_URL)/$(IPROUTE2_PATCH)
+$(DL_DIR)/$(IPROUTE2_IPKSRC):
+ $(WGET) -P $(DL_DIR) $(IPROUTE2_IPKSITE)/$(IPROUTE2_IPKSRC)
+
+
iproute2-source: $(DL_DIR)/$(IPROUTE2_SOURCE) #$(DL_DIR)/$(IPROUTE2_PATCH)
$(IPROUTE2_DIR)/.unpacked: $(DL_DIR)/$(IPROUTE2_SOURCE) #$(DL_DIR)/$(IPROUTE2_PATCH)
@@ -49,6 +58,7 @@ $(IPROUTE2_DIR)/.configured: $(IPROUTE2_DIR)/.unpacked
$(IPROUTE2_DIR)/tc/tc: $(IPROUTE2_DIR)/.configured
$(MAKE) -C $(IPROUTE2_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include
+ $(STRIP) $(IPROUTE2_DIR)/tc/tc
$(TARGET_DIR)/usr/sbin/tc: $(IPROUTE2_DIR)/tc/tc
@# Make sure our $(TARGET_DIR)/usr/sbin/ exists.
@@ -65,3 +75,12 @@ iproute2-clean:
iproute2-dirclean:
rm -rf $(IPROUTE2_DIR)
+
+iproute2-ipk: $(IPROUTE2_IPKTARGET)
+
+$(IPROUTE2_IPKTARGET): $(IPROUTE2_DIR)/ipkg/rules
+ (cd $(IPROUTE2_DIR); ipkg-buildpackage )
+
+$(IPROUTE2_DIR)/ipkg/rules: $(IPROUTE2_DIR)/tc/tc $(DL_DIR)/$(IPROUTE2_IPKSRC)
+ tar -C $(IPROUTE2_DIR) -zxf $(DL_DIR)/$(IPROUTE2_IPKSRC)
+
diff --git a/obsolete-buildroot/make/oidentd.mk b/obsolete-buildroot/make/oidentd.mk
new file mode 100644
index 000000000..e833ac0ae
--- /dev/null
+++ b/obsolete-buildroot/make/oidentd.mk
@@ -0,0 +1,74 @@
+######################################################
+#
+# An example makefile to fetch a package from sources
+# then fetch the ipkg updates required to the base package
+# extract the archives into the build tree
+# and then build the source
+#
+######################################################
+
+
+# For this example we'll use a fairly simple package that compiles easily
+# and has sources available for download at sourceforge
+OIDENTD=oidentd-2.0.7
+OIDENTD_TARGET=oidentd
+OIDENTD_DIR=$(BUILD_DIR)/oidentd-2.0.7
+OIDENTD_IPKTARGET=oidentd-2.0.7_mipsel.ipk
+OIDENTD_SITE=http://easynews.dl.sourceforge.net/sourceforge/ojnk
+OIDENTD_SOURCE=oidentd-2.0.7.tar.gz
+OIDENTDIPK_SITE=http://openwrt.rozeware.bc.ca/ipkg-dev
+OIDENTDIPK_SRC=oidentd-2.0.7-pkg.tgz
+
+
+
+
+# define a target for the master makefile
+oidentd: $(OIDENTD_DIR)/$(OIDENTD_TARGET)
+
+oidentd-ipk: $(BUILD_DIR)/$(OIDENTD_IPKTARGET)
+
+# We need to download sources if we dont have them
+$(DL_DIR)/$(OIDENTD_SOURCE) :
+ $(WGET) -P $(DL_DIR) $(OIDENTD_SITE)/$(OIDENTD_SOURCE)
+
+# As well as the upstream package sources, we need the updates
+# for ipkg packaging
+$(DL_DIR)/$(OIDENTDIPK_SRC) :
+ $(WGET) -P $(DL_DIR) $(OIDENTDIPK_SITE)/$(OIDENTDIPK_SRC)
+
+# if we have the sources, they do no good unless they are unpacked
+$(OIDENTD_DIR)/.unpacked: $(DL_DIR)/$(OIDENTD_SOURCE)
+ tar -C $(BUILD_DIR) -zxf $(DL_DIR)/$(OIDENTD_SOURCE)
+ touch $(OIDENTD_DIR)/.unpacked
+
+# if we have the sources unpacked, we need to configure them
+$(OIDENTD_DIR)/.configured: $(OIDENTD_DIR)/.unpacked
+ (cd $(OIDENTD_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_OPTS) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ );
+ touch $(OIDENTD_DIR)/.configured
+
+
+# with the upstream sources unpacked, they still dont do much good without
+# the ipkg control and rule files
+$(OIDENTD_DIR)/ipkg/rules : $(DL_DIR)/$(OIDENTDIPK_SRC) $(OIDENTD_DIR)/.unpacked
+ tar -C $(OIDENTD_DIR) -zxf $(DL_DIR)/$(OIDENTDIPK_SRC)
+
+# now that we have it all in place, just build it
+$(OIDENTD_DIR)/$(OIDENTD_TARGET): $(OIDENTD_DIR)/.configured
+ cd $(OIDENTD_DIR); make
+
+
+$(BUILD_DIR)/$(OIDENTD_IPKTARGET): $(OIDENTD_DIR)/ipkg/rules
+ (cd $(OIDENTD_DIR); ipkg-buildpackage)
+
+
+
diff --git a/obsolete-buildroot/make/sched-mod.mk b/obsolete-buildroot/make/sched-mod.mk
new file mode 100644
index 000000000..0a27d7f27
--- /dev/null
+++ b/obsolete-buildroot/make/sched-mod.mk
@@ -0,0 +1,44 @@
+######################################################
+#
+# A really simple example that doesn't actually build anything
+# It'll fetch a package from another repository for inclusion
+# into our final list
+# Using one from the openwrt home as an example
+#
+######################################################
+
+
+SCHEDM=sched-modules
+
+SCHEDM_TARGET=sched-modules_2.4.20_mipsel.ipk
+SCHEDM_SITE=http://openwrt.rozeware.bc.ca/ipkg-dev
+SCHEDM_SOURCE=openwrt-kmodules.tar.bz2
+SCHEDMIPK_SRC=sched-modules-ipk.tgz
+
+
+sched-modules-ipk: $(BUILD_DIR)/$(SCHEDM_TARGET)
+
+
+# fetch the ipkg rules stuff
+$(DL_DIR)/$(SCHEDMIPK_SRC) :
+ $(WGET) -P $(DL_DIR) $(SCHEDM_SITE)/$(SCHEDMIPK_SRC)
+
+#make sure we have a directory to extract to
+$(BUILD_DIR)/$(SCHEDM) :
+ mkdir $(BUILD_DIR)/$(SCHEDM)
+
+#extract the archive
+$(BUILD_DIR)/$(SCHEDM)/modules/2.4.20/net/sched/cls_fw.o : $(BUILD_DIR)/$(SCHEDM) $(SCHEDM_SOURCE)
+ tar -C $(BUILD_DIR)/$(SCHEDM) -jxf $(SCHEDM_SOURCE)
+
+# extract the ipkg overlay
+$(BUILD_DIR)/$(SCHEDM)/ipkg/control : $(DL_DIR)/$(SCHEDMIPK_SRC) $(BUILD_DIR)/$(SCHEDM)/modules/2.4.20/net/sched/cls_fw.o
+ tar -C $(BUILD_DIR)/$(SCHEDM) -zxf $(DL_DIR)/$(SCHEDMIPK_SRC)
+
+# now that we have it all in place, just build it
+$(BUILD_DIR)/$(SCHEDM_TARGET): $(BUILD_DIR)/$(SCHEDM)/ipkg/control $(BUILD_DIR)/$(SCHEDM)/modules/2.4.20/net/sched/cls_fw.o
+ cd $(BUILD_DIR)/$(SCHEDM); ipkg-buildpackage -c
+
+
+
+
diff --git a/obsolete-buildroot/make/wshaper.mk b/obsolete-buildroot/make/wshaper.mk
new file mode 100644
index 000000000..ff910907e
--- /dev/null
+++ b/obsolete-buildroot/make/wshaper.mk
@@ -0,0 +1,50 @@
+######################################################
+#
+# An example makefile to fetch a package from sources
+# then fetch the ipkg updates required to the base package
+# extract the archives into the build tree
+# and then build the source
+#
+######################################################
+
+
+# For this example we'll use a fairly simple package that compiles easily
+# and has sources available for download at sourceforge
+WSHAPER=wondershaper-1.1a
+WSHAPER_TARGET=wondershaper-1.1a_mipsel.ipk
+WSHAPER_SITE=http://lartc.org/wondershaper
+WSHAPER_SOURCE=wondershaper-1.1a.tar.gz
+WSHAPERIPK_SITE=http://openwrt.rozeware.bc.ca/ipkg-dev
+WSHAPERIPK_SRC=wondershaper-1.1a-pkg.tgz
+
+
+
+# define a target for the master makefile
+wshaper-ipk: $(BUILD_DIR)/$(WSHAPER_TARGET)
+
+# We need to download sources if we dont have them
+$(DL_DIR)/$(WSHAPER_SOURCE) :
+ $(WGET) -P $(DL_DIR) $(WSHAPER_SITE)/$(WSHAPER_SOURCE)
+
+# As well as the upstream package sources, we need the updates
+# for ipkg packaging
+$(DL_DIR)/$(WSHAPERIPK_SRC) :
+ $(WGET) -P $(DL_DIR) $(WSHAPERIPK_SITE)/$(WSHAPERIPK_SRC)
+
+# if we have the sources, they do no good unless they are unpacked
+$(BUILD_DIR)/$(WSHAPER)/.unpacked: $(DL_DIR)/$(WSHAPER_SOURCE)
+ tar -C $(BUILD_DIR) -zxf $(DL_DIR)/$(WSHAPER_SOURCE)
+ touch $(BUILD_DIR)/$(WSHAPER)/.unpacked
+
+# with the upstream sources unpacked, they still dont do much good without
+# the ipkg control and rule files
+$(BUILD_DIR)/$(WSHAPER)/ipkg/control : $(BUILD_DIR)/$(WSHAPER)/.unpacked $(DL_DIR)/$(WSHAPERIPK_SRC)
+ tar -C $(BUILD_DIR)/$(WSHAPER) -zxf $(DL_DIR)/$(WSHAPERIPK_SRC)
+
+# now that we have it all in place, just build it
+$(BUILD_DIR)/$(WSHAPER_TARGET): $(BUILD_DIR)/$(WSHAPER)/ipkg/control
+ cd $(BUILD_DIR)/$(WSHAPER); ipkg-buildpackage -c
+
+
+
+