diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-10-09 01:24:28 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-10-09 01:24:28 +0000 |
commit | 73f7be82904f487d167493e76b415fbe5b5f8c5a (patch) | |
tree | 8d9acaf4414892fad533fd92ebfc7e65a2ad2785 /package | |
parent | 0b5ad783691ef6fa1285c8d7858a51c425a8b38d (diff) | |
download | buildroot-novena-73f7be82904f487d167493e76b415fbe5b5f8c5a.tar.gz buildroot-novena-73f7be82904f487d167493e76b415fbe5b5f8c5a.zip |
Remove the old 'make' directory, and populate the new 'package'
directory.
Diffstat (limited to 'package')
86 files changed, 5503 insertions, 0 deletions
diff --git a/package/autoconf/autoconf.mk b/package/autoconf/autoconf.mk new file mode 100644 index 000000000..4b39ebf9b --- /dev/null +++ b/package/autoconf/autoconf.mk @@ -0,0 +1,72 @@ +############################################################# +# +# autoconf +# +############################################################# +AUTOCONF_SOURCE:=autoconf-2.59.tar.bz2 +AUTOCONF_SITE:=ftp://ftp.gnu.org/gnu/autoconf +AUTOCONF_CAT:=bzcat +AUTOCONF_DIR:=$(BUILD_DIR)/autoconf-2.59 +AUTOCONF_BINARY:=autoconf +AUTOCONF_TARGET_BINARY:=usr/bin/autoconf + +$(DL_DIR)/$(AUTOCONF_SOURCE): + $(WGET) -P $(DL_DIR) $(AUTOCONF_SITE)/$(AUTOCONF_SOURCE) + +autoconf-source: $(DL_DIR)/$(AUTOCONF_SOURCE) + +$(AUTOCONF_DIR)/.unpacked: $(DL_DIR)/$(AUTOCONF_SOURCE) + $(AUTOCONF_CAT) $(DL_DIR)/$(AUTOCONF_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(AUTOCONF_DIR)/.unpacked + +$(AUTOCONF_DIR)/.configured: $(AUTOCONF_DIR)/.unpacked + (cd $(AUTOCONF_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) EMACS="no" \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + ); + touch $(AUTOCONF_DIR)/.configured + +$(AUTOCONF_DIR)/bin/$(AUTOCONF_BINARY): $(AUTOCONF_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(AUTOCONF_DIR) + +$(TARGET_DIR)/$(AUTOCONF_TARGET_BINARY): $(AUTOCONF_DIR)/bin/$(AUTOCONF_BINARY) + $(MAKE) \ + prefix=$(TARGET_DIR)/usr \ + exec_prefix=$(TARGET_DIR)/usr \ + bindir=$(TARGET_DIR)/usr/bin \ + sbindir=$(TARGET_DIR)/usr/sbin \ + libexecdir=$(TARGET_DIR)/usr/lib \ + datadir=$(TARGET_DIR)/usr/share \ + sysconfdir=$(TARGET_DIR)/etc \ + localstatedir=$(TARGET_DIR)/var \ + libdir=$(TARGET_DIR)/usr/lib \ + infodir=$(TARGET_DIR)/usr/info \ + mandir=$(TARGET_DIR)/usr/man \ + includedir=$(TARGET_DIR)/usr/include \ + -C $(AUTOCONF_DIR) install; + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +autoconf: uclibc $(TARGET_DIR)/$(AUTOCONF_TARGET_BINARY) + +autoconf-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(AUTOCONF_DIR) uninstall + -$(MAKE) -C $(AUTOCONF_DIR) clean + +autoconf-dirclean: + rm -rf $(AUTOCONF_DIR) + diff --git a/package/automake/automake.mk b/package/automake/automake.mk new file mode 100644 index 000000000..a9f70fcc7 --- /dev/null +++ b/package/automake/automake.mk @@ -0,0 +1,76 @@ +############################################################# +# +# automake +# +############################################################# +AUTOMAKE_VER:=1.9.1 +AUTOMAKE_SOURCE:=automake-$(AUTOMAKE_VER).tar.bz2 +AUTOMAKE_SITE:=ftp://ftp.gnu.org/gnu/automake +AUTOMAKE_CAT:=bzcat +AUTOMAKE_DIR:=$(BUILD_DIR)/automake-$(AUTOMAKE_VER) +AUTOMAKE_BINARY:=automake +AUTOMAKE_TARGET_BINARY:=usr/bin/automake + +$(DL_DIR)/$(AUTOMAKE_SOURCE): + $(WGET) -P $(DL_DIR) $(AUTOMAKE_SITE)/$(AUTOMAKE_SOURCE) + +automake-source: $(DL_DIR)/$(AUTOMAKE_SOURCE) + +$(AUTOMAKE_DIR)/.unpacked: $(DL_DIR)/$(AUTOMAKE_SOURCE) + $(AUTOMAKE_CAT) $(DL_DIR)/$(AUTOMAKE_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(AUTOMAKE_DIR)/.unpacked + +$(AUTOMAKE_DIR)/.configured: $(AUTOMAKE_DIR)/.unpacked + (cd $(AUTOMAKE_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + WANT_AUTOCONF=2.5 \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + ); + touch $(AUTOMAKE_DIR)/.configured + +$(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY): $(AUTOMAKE_DIR)/.configured + $(MAKE) -C $(AUTOMAKE_DIR) + touch -c $(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY) + +$(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY): $(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY) + $(MAKE) \ + prefix=$(TARGET_DIR)/usr \ + exec_prefix=$(TARGET_DIR)/usr \ + bindir=$(TARGET_DIR)/usr/bin \ + sbindir=$(TARGET_DIR)/usr/sbin \ + libexecdir=$(TARGET_DIR)/usr/lib \ + datadir=$(TARGET_DIR)/usr/share \ + sysconfdir=$(TARGET_DIR)/etc \ + localstatedir=$(TARGET_DIR)/var \ + libdir=$(TARGET_DIR)/usr/lib \ + infodir=$(TARGET_DIR)/usr/info \ + mandir=$(TARGET_DIR)/usr/man \ + includedir=$(TARGET_DIR)/usr/include \ + -C $(AUTOMAKE_DIR) install; + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + touch -c $(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY) + +automake: uclibc $(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY) + +automake-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(AUTOMAKE_DIR) uninstall + -$(MAKE) -C $(AUTOMAKE_DIR) clean + +automake-dirclean: + rm -rf $(AUTOMAKE_DIR) + diff --git a/package/bash/bash.mk b/package/bash/bash.mk new file mode 100644 index 000000000..855c0fbe0 --- /dev/null +++ b/package/bash/bash.mk @@ -0,0 +1,72 @@ +############################################################# +# +# bash +# +############################################################# +BASH_SOURCE:=bash-2.05b.tar.gz +BASH_SITE:=ftp://ftp.gnu.org/gnu/bash +BASH_CAT:=zcat +BASH_DIR:=$(BUILD_DIR)/bash-2.05b +BASH_BINARY:=bash +BASH_TARGET_BINARY:=bin/bash + +$(DL_DIR)/$(BASH_SOURCE): + $(WGET) -P $(DL_DIR) $(BASH_SITE)/$(BASH_SOURCE) + +bash-source: $(DL_DIR)/$(BASH_SOURCE) + +$(BASH_DIR)/.unpacked: $(DL_DIR)/$(BASH_SOURCE) + $(BASH_CAT) $(DL_DIR)/$(BASH_SOURCE) | tar -C $(BUILD_DIR) -xvf - + # This is broken when -lintl is added to LIBS + $(SED) 's,LIBS_FOR_BUILD =.*,LIBS_FOR_BUILD =,g' \ + $(BASH_DIR)/builtins/Makefile.in + touch $(BASH_DIR)/.unpacked + +$(BASH_DIR)/.configured: $(BASH_DIR)/.unpacked + (cd $(BASH_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) CC_FOR_BUILD=$(HOSTCC) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ac_cv_func_setvbuf_reversed=no \ + bash_cv_have_mbstate_t=yes \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + --with-curses \ + --enable-alias \ + --without-bash-malloc \ + ); + touch $(BASH_DIR)/.configured + +$(BASH_DIR)/$(BASH_BINARY): $(BASH_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) CC_FOR_BUILD=$(HOSTCC) -C $(BASH_DIR) + +$(TARGET_DIR)/$(BASH_TARGET_BINARY): $(BASH_DIR)/$(BASH_BINARY) + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BASH_DIR) install + rm -f $(TARGET_DIR)/bin/bash* + mv $(TARGET_DIR)/usr/bin/bash* $(TARGET_DIR)/bin/ + (cd $(TARGET_DIR)/bin; ln -fs bash sh) + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +bash: ncurses uclibc $(TARGET_DIR)/$(BASH_TARGET_BINARY) + +bash-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BASH_DIR) uninstall + -$(MAKE) -C $(BASH_DIR) clean + +bash-dirclean: + rm -rf $(BASH_DIR) + diff --git a/package/berkeleydb/berkeleydb.mk b/package/berkeleydb/berkeleydb.mk new file mode 100644 index 000000000..5b4105a8e --- /dev/null +++ b/package/berkeleydb/berkeleydb.mk @@ -0,0 +1,94 @@ +############################################################# +# +# berkeley db +# +############################################################# +DB_SITE:=http://www.sleepycat.com/update/snapshot +DB_SOURCE:=db-4.1.25.NC.tar.gz +DB_DIR:=$(BUILD_DIR)/db-4.1.25.NC + + +$(DL_DIR)/$(DB_SOURCE): + $(WGET) -P $(DL_DIR) $(DB_SITE)/$(DB_SOURCE) + +berkeleydb-source: $(DL_DIR)/$(DB_SOURCE) + +$(DB_DIR)/.dist: $(DL_DIR)/$(DB_SOURCE) + zcat $(DL_DIR)/$(DB_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(DB_DIR)/.dist + +$(DB_DIR)/.configured: $(DB_DIR)/.dist + (cd $(DB_DIR)/build_unix; rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + ../dist/configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --with-gnu-ld \ + --enable-shared \ + --disable-cxx \ + --disable-java \ + --disable-rpc \ + --disable-tcl \ + --disable-compat185 \ + --with-pic \ + ); + $(SED) 's/\.lo/.o/g' $(DB_DIR)/build_unix/Makefile + touch $(DB_DIR)/.configured + +$(DB_DIR)/build_unix/.libs/libdb-4.1.so: $(DB_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(DB_DIR)/build_unix + +$(STAGING_DIR)/lib/libdb-4.1.so: $(DB_DIR)/build_unix/.libs/libdb-4.1.so + $(MAKE) \ + prefix=$(STAGING_DIR) \ + exec_prefix=$(STAGING_DIR) \ + bindir=$(STAGING_DIR)/bin \ + sbindir=$(STAGING_DIR)/sbin \ + libexecdir=$(STAGING_DIR)/lib \ + datadir=$(STAGING_DIR)/share \ + sysconfdir=$(STAGING_DIR)/etc \ + localstatedir=$(STAGING_DIR)/var \ + libdir=$(STAGING_DIR)/lib \ + infodir=$(STAGING_DIR)/info \ + mandir=$(STAGING_DIR)/man \ + includedir=$(STAGING_DIR)/include \ + -C $(DB_DIR)/build_unix install; + chmod a-x $(STAGING_DIR)/lib/libdb*so* + rm -f $(STAGING_DIR)/bin/db_* + rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/info \ + $(STAGING_DIR)/man $(STAGING_DIR)/share/doc + +$(TARGET_DIR)/lib/libdb-4.1.so: $(STAGING_DIR)/lib/libdb-4.1.so + rm -rf $(TARGET_DIR)/lib/libdb* + cp -a $(STAGING_DIR)/lib/libdb*so* $(TARGET_DIR)/lib/ + rm -f $(TARGET_DIR)/lib/libdb.so $(TARGET_DIR)/lib/libdb.la $(TARGET_DIR)/lib/libdb.a + (cd $(TARGET_DIR)/usr/lib; ln -fs /lib/libdb-4.1.so libdb.so) + -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libdb*so* + +$(TARGET_DIR)/usr/lib/libdb.a: $(STAGING_DIR)/lib/libdb-4.1.a + cp -dpf $(STAGING_DIR)/include/db.h $(TARGET_DIR)/usr/include/ + cp -dpf $(STAGING_DIR)/lib/libdb*.a $(TARGET_DIR)/usr/lib/ + cp -dpf $(STAGING_DIR)/lib/libdb*.la $(TARGET_DIR)/usr/lib/ + touch -c $(TARGET_DIR)/usr/lib/libdb.a + +berkeleydb-headers: $(TARGET_DIR)/usr/lib/libdb.a + +berkeleydb-clean: + $(MAKE) -C $(DB_DIR)/build_unix clean + +berkeleydb-dirclean: + rm -rf $(DB_DIR) + +berkeleydb: uclibc $(TARGET_DIR)/lib/libdb-4.1.so + diff --git a/package/bison/bison.mk b/package/bison/bison.mk new file mode 100644 index 000000000..89c9b916c --- /dev/null +++ b/package/bison/bison.mk @@ -0,0 +1,62 @@ +############################################################# +# +# bison +# +############################################################# +BISON_SOURCE:=bison-1.35.tar.bz2 +BISON_SITE:=ftp://ftp.gnu.org/gnu/bison +BISON_DIR:=$(BUILD_DIR)/bison-1.35 +BISON_CAT:=bzcat +BISON_BINARY:=src/bison +BISON_TARGET_BINARY:=usr/bin/bison + +$(DL_DIR)/$(BISON_SOURCE): + $(WGET) -P $(DL_DIR) $(BISON_SITE)/$(BISON_SOURCE) + +bison-source: $(DL_DIR)/$(BISON_SOURCE) + +$(BISON_DIR)/.unpacked: $(DL_DIR)/$(BISON_SOURCE) + $(BISON_CAT) $(DL_DIR)/$(BISON_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(BISON_DIR)/.unpacked + +$(BISON_DIR)/.configured: $(BISON_DIR)/.unpacked + (cd $(BISON_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + gt_cv_func_gnugettext2_libintl=yes \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + ); + touch $(BISON_DIR)/.configured + +$(BISON_DIR)/$(BISON_BINARY): $(BISON_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(BISON_DIR) + +$(TARGET_DIR)/$(BISON_TARGET_BINARY): $(BISON_DIR)/$(BISON_BINARY) + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BISON_DIR) install + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + cp -a $(SOURCE_DIR)/yacc $(TARGET_DIR)/usr/bin/yacc + +bison: uclibc $(TARGET_DIR)/$(BISON_TARGET_BINARY) + +bison-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BISON_DIR) uninstall + -$(MAKE) -C $(BISON_DIR) clean + +bison-dirclean: + rm -rf $(BISON_DIR) + diff --git a/package/boa/boa.mk b/package/boa/boa.mk new file mode 100644 index 000000000..1eb233fbc --- /dev/null +++ b/package/boa/boa.mk @@ -0,0 +1,57 @@ +############################################################# +# +# boa +# +############################################################# + +BOA_VERSION=0.94.14rc4 + +# Don't alter below this line unless you (think) you know +# what you are doing! Danger, Danger! + +BOA_SOURCE=boa-$(BOA_VERSION).tar.gz +BOA_SITE=http://www.boa.org/ +BOA_DIR=$(BUILD_DIR)/${shell basename $(BOA_SOURCE) .tar.gz} +BOA_WORKDIR=$(BUILD_DIR)/boa_workdir + +$(DL_DIR)/$(BOA_SOURCE): + $(WGET) -P $(DL_DIR) $(BOA_SITE)/$(BOA_SOURCE) + +$(BOA_DIR)/.unpacked: $(DL_DIR)/$(BOA_SOURCE) + gzip -d -c $(DL_DIR)/$(BOA_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(BOA_DIR)/.unpacked + +$(BOA_WORKDIR)/Makefile: $(BOA_DIR)/.unpacked + rm -f $(BOA_WORKDIR)/Makefile + mkdir -p $(BOA_WORKDIR) + (cd $(BOA_WORKDIR) && CONFIG_SITE=$(SOURCE_DIR)/boa-config.site-$(ARCH) \ + CC=$(TARGET_CC) $(BOA_DIR)/configure) + touch $(BOA_WORKDIR)/.depend + +$(BOA_WORKDIR)/boa $(BOA_WORKDIR)/boa_indexer: $(BOA_WORKDIR)/Makefile + rm -f $@ + $(MAKE) VPATH=$(BOA_DIR)/src/ -C $(BOA_WORKDIR) + +$(BOA_WORKDIR)/.installed: $(BOA_WORKDIR)/boa $(BOA_WORKDIR)/boa_indexer + mkdir -p $(TARGET_DIR)/usr/sbin + cp -f $(BOA_WORKDIR)/src/boa $(TARGET_DIR)/usr/sbin/boa + mkdir -p $(TARGET_DIR)/usr/lib/boa + cp -f $(BOA_WORKDIR)/src/boa_indexer $(TARGET_DIR)/usr/lib/boa/boa_indexer + mkdir -p $(TARGET_DIR)/etc/boa + cp -f $(SOURCE_DIR)/boa.conf $(TARGET_DIR)/etc/boa + cp -f $(SOURCE_DIR)/mime.types $(TARGET_DIR)/etc/mime.types + strip --strip-all $(TARGET_DIR)/usr/sbin/boa $(TARGET_DIR)/usr/lib/boa/boa_indexer + touch $(BOA_WORKDIR)/.installed + +boa: uclibc $(BOA_WORKDIR)/.installed + +boa-source: $(DL_DIR)/$(BOA_SOURCE) + +boa-clean: + @if [ -d $(BOA_WORKDIR)/Makefile ] ; then \ + $(MAKE) -C $(BOA_WORKDIR) clean ; \ + fi; + +boa-dirclean: + rm -rf $(BOA_DIR) $(BOA_WORKDIR) + diff --git a/package/bridge/bridge.mk b/package/bridge/bridge.mk new file mode 100644 index 000000000..46b78b0e8 --- /dev/null +++ b/package/bridge/bridge.mk @@ -0,0 +1,61 @@ +############################################################# +# +# bridgeutils - User Space Program For Controling Bridging +# +############################################################# +# +BRIDGE_SOURCE_URL=http://umn.dl.sourceforge.net/sourceforge/bridge/ +BRIDGE_SOURCE=bridge-utils-1.0.4.tar.gz +BRIDGE_BUILD_DIR=$(BUILD_DIR)/bridge-utils-1.0.4 +BRIDGE_TARGET_BINARY:=usr/sbin/brctl + +$(DL_DIR)/$(BRIDGE_SOURCE): + $(WGET) -P $(DL_DIR) $(BRIDGE_SOURCE_URL)/$(BRIDGE_SOURCE) + +$(BRIDGE_BUILD_DIR)/.unpacked: $(DL_DIR)/$(BRIDGE_SOURCE) + zcat $(DL_DIR)/$(BRIDGE_SOURCE) | tar -C $(BUILD_DIR) -xvf - + patch -p1 -d $(BRIDGE_BUILD_DIR) < $(SOURCE_DIR)/bridge.patch + touch $(BRIDGE_BUILD_DIR)/.unpacked + +$(BRIDGE_BUILD_DIR)/.configured: $(BRIDGE_BUILD_DIR)/.unpacked + (cd $(BRIDGE_BUILD_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + --with-linux=$(LINUX_DIR) \ + ); + touch $(BRIDGE_BUILD_DIR)/.configured + +$(BRIDGE_BUILD_DIR)/brctl/brctl: $(BRIDGE_BUILD_DIR)/.configured + $(MAKE) -C $(BRIDGE_BUILD_DIR) + +$(TARGET_DIR)/$(BRIDGE_TARGET_BINARY): $(BRIDGE_BUILD_DIR)/brctl/brctl + cp -af $(BRIDGE_BUILD_DIR)/brctl/brctl $(TARGET_DIR)/$(BRIDGE_TARGET_BINARY) + $(STRIP) $(TARGET_DIR)/$(BRIDGE_TARGET_BINARY) + #cp -af $(BRIDGE_BUILD_DIR)/brctl/brctld $(TARGET_DIR)/usr/sbin/ + #$(STRIP) $(TARGET_DIR)/usr/sbin/brctld + +bridge: linux $(TARGET_DIR)/$(BRIDGE_TARGET_BINARY) + +bridge-source: $(DL_DIR)/$(BRIDGE_SOURCE) + +bridge-clean: + #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BRIDGE_BUILD_DIR) uninstall + -$(MAKE) -C $(BRIDGE_BUILD_DIR) clean + +bridge-dirclean: + rm -rf $(BRIDGE_BUILD_DIR) diff --git a/package/bzip2/bzip2.mk b/package/bzip2/bzip2.mk new file mode 100644 index 000000000..4152102dc --- /dev/null +++ b/package/bzip2/bzip2.mk @@ -0,0 +1,86 @@ +############################################################# +# +# bzip2 +# +############################################################# +BZIP2_SOURCE:=bzip2-1.0.2.tar.gz +BZIP2_SITE:=ftp://sources.redhat.com/pub/bzip2/v102 +BZIP2_DIR:=$(BUILD_DIR)/bzip2-1.0.2 +BZIP2_CAT:=zcat +BZIP2_BINARY:=$(BZIP2_DIR)/bzip2 +BZIP2_TARGET_BINARY:=$(TARGET_DIR)/usr/bin/bzmore + +$(DL_DIR)/$(BZIP2_SOURCE): + $(WGET) -P $(DL_DIR) $(BZIP2_SITE)/$(BZIP2_SOURCE) + +bzip2-source: $(DL_DIR)/$(BZIP2_SOURCE) + +$(BZIP2_DIR)/.unpacked: $(DL_DIR)/$(BZIP2_SOURCE) + $(BZIP2_CAT) $(DL_DIR)/$(BZIP2_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(SED) "s,ln \$$(,ln -sf \$$(,g" $(BZIP2_DIR)/Makefile + $(SED) "s,ln -s (lib.*),ln -sf \$$1 ; ln -sf libbz2.so.1.0.2 libbz2.so,g" \ + $(BZIP2_DIR)/Makefile-libbz2_so +ifeq ($(BR2_LARGEFILE),y) + $(SED) "s,^BIGFILES,#BIGFILES,g" $(BZIP2_DIR)/Makefile + $(SED) "s,^BIGFILES,#BIGFILES,g" $(BZIP2_DIR)/Makefile-libbz2_so +endif + touch $(BZIP2_DIR)/.unpacked + +$(STAGING_DIR)/lib/libbz2.so.1.0.2: $(BZIP2_DIR)/.unpacked + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) CC=$(TARGET_CC) -C $(BZIP2_DIR) -f Makefile-libbz2_so + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) CC=$(TARGET_CC) -C $(BZIP2_DIR) libbz2.a + cp $(BZIP2_DIR)/bzlib.h $(STAGING_DIR)/include/ + cp $(BZIP2_DIR)/libbz2.so.1.0.2 $(STAGING_DIR)/lib/ + cp $(BZIP2_DIR)/libbz2.a $(STAGING_DIR)/lib/ + (cd $(STAGING_DIR)/lib/; ln -sf libbz2.so.1.0.2 libbz2.so) + (cd $(STAGING_DIR)/lib/; ln -sf libbz2.so.1.0.2 libbz2.so.1.0) + +$(BZIP2_BINARY): $(STAGING_DIR)/lib/libbz2.so.1.0.2 + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) CC=$(TARGET_CC) -C $(BZIP2_DIR) bzip2 bzip2recover + +$(BZIP2_TARGET_BINARY): $(BZIP2_BINARY) + (cd $(TARGET_DIR)/usr/bin; \ + rm -f bzip2 bunzip2 bzcat bzip2recover bzgrep bzegrep bzfgrep bzmore bzless bzdiff bzcmp); + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) PREFIX=$(TARGET_DIR)/usr -C $(BZIP2_DIR) install + rm -f $(TARGET_DIR)/usr/lib/libbz2.a + rm -f $(TARGET_DIR)/usr/include/bzlib.h + cp $(BZIP2_DIR)/libbz2.so.1.0.2 $(TARGET_DIR)/usr/lib/ + (cd $(TARGET_DIR)/usr/lib; \ + ln -sf libbz2.so.1.0.2 libbz2.so.1.0; \ + ln -sf libbz2.so.1.0.2 libbz2.so) + (cd $(TARGET_DIR)/usr/bin; \ + ln -sf bzip2 bunzip2; \ + ln -sf bzip2 bzcat; \ + ln -sf bzdiff bzcmp; \ + ln -sf bzmore bzless; \ + ln -sf bzgrep bzegrep; \ + ln -sf bzgrep bzfgrep;) + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +$(TARGET_DIR)/usr/lib/libbz2.a: $(STAGING_DIR)/lib/libbz2.a + mkdir -p $(TARGET_DIR)/usr/include + cp $(STAGING_DIR)/include/bzlib.h $(TARGET_DIR)/usr/include/ + cp $(STAGING_DIR)/lib/libbz2.a $(TARGET_DIR)/usr/lib/ + rm -f $(TARGET_DIR)/lib/libbz2.so + (cd $(TARGET_DIR)/usr/lib; \ + ln -fs /usr/lib/libbz2.so.1.0 libbz2.so; \ + ) + -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libbz2.so.1.0 + touch -c $(TARGET_DIR)/usr/lib/libbz2.a + +bzip2-headers: $(TARGET_DIR)/usr/lib/libbz2.a + +bzip2: uclibc $(BZIP2_TARGET_BINARY) + +bzip2-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BZIP2_DIR) uninstall + -$(MAKE) -C $(BZIP2_DIR) clean + +bzip2-dirclean: + rm -rf $(BZIP2_DIR) + diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk new file mode 100644 index 000000000..bd09e5780 --- /dev/null +++ b/package/coreutils/coreutils.mk @@ -0,0 +1,83 @@ +############################################################# +# +# coreutils +# +############################################################# +COREUTILS_SOURCE:=coreutils-5.0.tar.bz2 +COREUTILS_SITE:=ftp://ftp.gnu.org/gnu/coreutils/ +COREUTILS_CAT:=bzcat +COREUTILS_DIR:=$(BUILD_DIR)/coreutils-5.0 +COREUTILS_BINARY:=src/vdir +COREUTILS_TARGET_BINARY:=bin/vdir +BIN_PROGS:=cat chgrp chmod chown cp date dd df dir echo false hostname \ + ln ls mkdir mknod mv pwd rm rmdir vdir sleep stty sync touch true uname + +$(DL_DIR)/$(COREUTILS_SOURCE): + $(WGET) -P $(DL_DIR) $(COREUTILS_SITE)/$(COREUTILS_SOURCE) + +coreutils-source: $(DL_DIR)/$(COREUTILS_SOURCE) + +$(COREUTILS_DIR)/.unpacked: $(DL_DIR)/$(COREUTILS_SOURCE) + $(COREUTILS_CAT) $(DL_DIR)/$(COREUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(COREUTILS_DIR)/.unpacked + +$(COREUTILS_DIR)/.configured: $(COREUTILS_DIR)/.unpacked + (cd $(COREUTILS_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ac_cv_func_strtod=yes \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + --disable-rpath \ + --disable-dependency-tracking \ + ); + #Fix up the max number of open files per process, which apparently + # is not set when cross compiling + $(SED) 's,.*UTILS_OPEN_MAX.*,#define UTILS_OPEN_MAX 1019,g' \ + $(COREUTILS_DIR)/config.h + # This is undefined when crosscompiling... + $(SED) 's,.*HAVE_PROC_UPTIME.*,#define HAVE_PROC_UPTIME 1,g' \ + $(COREUTILS_DIR)/config.h + touch $(COREUTILS_DIR)/.configured + +$(COREUTILS_DIR)/$(COREUTILS_BINARY): $(COREUTILS_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(COREUTILS_DIR) + rm -f $(TARGET_DIR)/$(COREUTILS_TARGET_BINARY) + +$(TARGET_DIR)/$(COREUTILS_TARGET_BINARY): $(COREUTILS_DIR)/$(COREUTILS_BINARY) + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(COREUTILS_DIR) install + # some things go in root rather than usr + for f in $(BIN_PROGS); do \ + mv $(TARGET_DIR)/usr/bin/$$f $(TARGET_DIR)/bin/$$f; \ + done + # link for archaic shells + ln -fs test $(TARGET_DIR)/usr/bin/[ + # gnu thinks chroot is in bin, debian thinks it's in sbin + mv $(TARGET_DIR)/usr/bin/chroot $(TARGET_DIR)/usr/sbin/chroot + $(STRIP) $(TARGET_DIR)/usr/sbin/chroot > /dev/null 2>&1 + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +coreutils: uclibc $(TARGET_DIR)/$(COREUTILS_TARGET_BINARY) + +coreutils-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(COREUTILS_DIR) uninstall + -$(MAKE) -C $(COREUTILS_DIR) clean + +coreutils-dirclean: + rm -rf $(COREUTILS_DIR) + diff --git a/package/cramfsroot/cramfsroot.mk b/package/cramfsroot/cramfsroot.mk new file mode 100644 index 000000000..0f1204a25 --- /dev/null +++ b/package/cramfsroot/cramfsroot.mk @@ -0,0 +1,52 @@ +############################################################# +# +# mkcramfs to build to target cramfs filesystems +# +############################################################# +CRAMFS_DIR=$(BUILD_DIR)/cramfs-1.1 +CRAMFS_SOURCE=cramfs-1.1.tar.gz +CRAMFS_SITE=http://aleron.dl.sourceforge.net/sourceforge/cramfs +CRAMFS_PATCH=$(SOURCE_DIR)/cramfs.patch + +$(DL_DIR)/$(CRAMFS_SOURCE): + $(WGET) -P $(DL_DIR) $(CRAMFS_SITE)/$(CRAMFS_SOURCE) + +$(CRAMFS_DIR): $(DL_DIR)/$(CRAMFS_SOURCE) $(CRAMFS_PATCH) + zcat $(DL_DIR)/$(CRAMFS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + cat $(CRAMFS_PATCH) | patch -p1 -d $(CRAMFS_DIR) + +$(CRAMFS_DIR)/mkcramfs: $(CRAMFS_DIR) + $(MAKE) CFLAGS="-Wall -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" -C $(CRAMFS_DIR); + touch -c $(CRAMFS_DIR)/mkcramfs + +cramfs: $(CRAMFS_DIR)/mkcramfs + +cramfs-source: $(DL_DIR)/$(CRAMFS_SOURCE) + +cramfs-clean: + -$(MAKE) -C $(CRAMFS_DIR) clean + +cramfs-dirclean: + rm -rf $(CRAMFS_DIR) + +############################################################# +# +# Build the cramfs root filesystem image +# +############################################################# + +cramfsroot: cramfs + #-@find $(TARGET_DIR)/lib -type f -name \*.so\* | xargs $(STRIP) --strip-unneeded 2>/dev/null || true; + -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true; + @rm -rf $(TARGET_DIR)/usr/man + @rm -rf $(TARGET_DIR)/usr/info + $(CRAMFS_DIR)/mkcramfs -q -D $(SOURCE_DIR)/device_table.txt $(TARGET_DIR) $(IMAGE) + +cramfsroot-source: cramfs-source + +cramfsroot-clean: + -$(MAKE) -C $(CRAMFS_DIR) clean + +cramfsroot-dirclean: + rm -rf $(CRAMFS_DIR) + diff --git a/package/customize/customize.mk b/package/customize/customize.mk new file mode 100644 index 000000000..2cfed1834 --- /dev/null +++ b/package/customize/customize.mk @@ -0,0 +1,10 @@ +############################################################# +# +# Any custom stuff you feel like doing.... +# +############################################################# +CUST_DIR:=$(SOURCE_DIR)/customize +ROOT_DIR:=$(BUILD_DIR)/root + +customize: + cp -af $(CUST_DIR)/* $(ROOT_DIR)/ diff --git a/package/dhcp_relay/dhcp_relay.mk b/package/dhcp_relay/dhcp_relay.mk new file mode 100644 index 000000000..8252b4aeb --- /dev/null +++ b/package/dhcp_relay/dhcp_relay.mk @@ -0,0 +1,47 @@ +############################################################# +# +# dhcp_relay +# +############################################################# +DHCP_RELAY_SOURCE:=dhcp-3.0pl2.tar.gz +DHCP_RELAY_SITE:=ftp://ftp.isc.org/isc/dhcp +DHCP_RELAY_CAT:=zcat +DHCP_RELAY_DIR:=$(BUILD_DIR)/dhcp-3.0pl2 +DHCP_RELAY_BINARY:=work.linux-2.2/relay/dhcrelay +DHCP_RELAY_TARGET_BINARY:=usr/sbin/dhcrelay +BVARS=PREDEFINES='-D_PATH_DHCPD_DB=\"/var/lib/dhcp/dhcpd.leases\" \ + -D_PATH_DHCLIENT_DB=\"/var/lib/dhcp/dhclient.leases\"' \ + VARDB=/var/lib/dhcp + +$(DL_DIR)/$(DHCP_RELAY_SOURCE): + $(WGET) -P $(DL_DIR) $(DHCP_RELAY_SITE)/$(DHCP_RELAY_SOURCE) + +dhcp_relay-source: $(DL_DIR)/$(DHCP_RELAY_SOURCE) + +$(DHCP_RELAY_DIR)/.unpacked: $(DL_DIR)/$(DHCP_RELAY_SOURCE) + $(DHCP_RELAY_CAT) $(DL_DIR)/$(DHCP_RELAY_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(DHCP_RELAY_DIR)/.unpacked + +$(DHCP_RELAY_DIR)/.configured: $(DHCP_RELAY_DIR)/.unpacked + (cd $(DHCP_RELAY_DIR); $(TARGET_CONFIGURE_OPTS) ./configure ); + touch $(DHCP_RELAY_DIR)/.configured + +$(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY): $(DHCP_RELAY_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) $(BVARS) -C $(DHCP_RELAY_DIR) + $(STRIP) $(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY) + +$(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY): $(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY) + (cd $(TARGET_DIR)/var/lib; ln -sf /tmp dhcp) + cp -a $(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY) $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY) + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +dhcp_relay: uclibc $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY) + +dhcp_relay-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(DHCP_RELAY_DIR) uninstall + -$(MAKE) -C $(DHCP_RELAY_DIR) clean + +dhcp_relay-dirclean: + rm -rf $(DHCP_RELAY_DIR) + diff --git a/package/diffutils/diffutils.mk b/package/diffutils/diffutils.mk new file mode 100644 index 000000000..0019bd8d4 --- /dev/null +++ b/package/diffutils/diffutils.mk @@ -0,0 +1,61 @@ +############################################################# +# +# diffutils +# +############################################################# +DIFFUTILS_SOURCE:=diffutils-2.8.4.tar.gz +DIFFUTILS_SITE:=ftp://alpha.gnu.org/gnu/diffutils/ +DIFFUTILS_CAT:=zcat +DIFFUTILS_DIR:=$(BUILD_DIR)/diffutils-2.8.4 +DIFFUTILS_BINARY:=src/diff +DIFFUTILS_TARGET_BINARY:=usr/bin/diff + +$(DL_DIR)/$(DIFFUTILS_SOURCE): + $(WGET) -P $(DL_DIR) $(DIFFUTILS_SITE)/$(DIFFUTILS_SOURCE) + +diffutils-source: $(DL_DIR)/$(DIFFUTILS_SOURCE) + +$(DIFFUTILS_DIR)/.unpacked: $(DL_DIR)/$(DIFFUTILS_SOURCE) + $(DIFFUTILS_CAT) $(DL_DIR)/$(DIFFUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(DIFFUTILS_DIR)/.unpacked + +$(DIFFUTILS_DIR)/.configured: $(DIFFUTILS_DIR)/.unpacked + (cd $(DIFFUTILS_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + ); + touch $(DIFFUTILS_DIR)/.configured + +$(DIFFUTILS_DIR)/$(DIFFUTILS_BINARY): $(DIFFUTILS_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(DIFFUTILS_DIR) + +$(TARGET_DIR)/$(DIFFUTILS_TARGET_BINARY): $(DIFFUTILS_DIR)/$(DIFFUTILS_BINARY) + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(DIFFUTILS_DIR) install + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +diffutils: uclibc $(TARGET_DIR)/$(DIFFUTILS_TARGET_BINARY) + +diffutils-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(DIFFUTILS_DIR) uninstall + -$(MAKE) -C $(DIFFUTILS_DIR) clean + +diffutils-dirclean: + rm -rf $(DIFFUTILS_DIR) + diff --git a/package/distcc/distcc.mk b/package/distcc/distcc.mk new file mode 100644 index 000000000..529f37fce --- /dev/null +++ b/package/distcc/distcc.mk @@ -0,0 +1,58 @@ +############################################################# +# +# distcc +# +############################################################# +DISTCC_VER:=2.17 +DISTCC_SOURCE:=distcc-$(DISTCC_VER).tar.bz2 +DISTCC_SITE:=http://distcc.samba.org/ftp/distcc/ +DISTCC_DIR:=$(BUILD_DIR)/distcc-$(DISTCC_VER) +DISTCC_BINARY:=distcc +DISTCC_TARGET_BINARY:=usr/bin/distcc + +$(DL_DIR)/$(DISTCC_SOURCE): + $(WGET) -P $(DL_DIR) $(DISTCC_SITE)/$(DISTCC_SOURCE) + +$(DISTCC_DIR)/.unpacked: $(DL_DIR)/$(DISTCC_SOURCE) + bzcat $(DL_DIR)/$(DISTCC_SOURCE) | tar -C $(BUILD_DIR) -xf - + touch $(DISTCC_DIR)/.unpacked + +$(DISTCC_DIR)/.configured: $(DISTCC_DIR)/.unpacked + (cd $(DISTCC_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) CC_FOR_BUILD=$(HOSTCC) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --with-included-popt \ + --without-gtk \ + --without-gnome \ + ); + touch $(DISTCC_DIR)/.configured + +$(DISTCC_DIR)/$(DISTCC_BINARY): $(DISTCC_DIR)/.configured + $(TARGET_CONFIGURE_OPTS) $(MAKE) CC=$(TARGET_CC) -C $(DISTCC_DIR) + +$(TARGET_DIR)/$(DISTCC_TARGET_BINARY): $(DISTCC_DIR)/$(DISTCC_BINARY) + install -D $(DISTCC_DIR)/$(DISTCC_BINARY)d $(TARGET_DIR)/$(DISTCC_TARGET_BINARY)d + install -D $(DISTCC_DIR)/$(DISTCC_BINARY) $(TARGET_DIR)/$(DISTCC_TARGET_BINARY) + +distcc: uclibc $(TARGET_DIR)/$(DISTCC_TARGET_BINARY) + +distcc-clean: + rm -f $(TARGET_DIR)/$(DISTCC_TARGET_BINARY) + rm -f $(TARGET_DIR)/$(DISTCC_TARGET_BINARY)d + -$(MAKE) -C $(DISTCC_DIR) clean + +distcc-dirclean: + rm -rf $(DISTCC_DIR) diff --git a/package/dnsmasq/dnsmasq.mk b/package/dnsmasq/dnsmasq.mk new file mode 100644 index 000000000..0c9b204b8 --- /dev/null +++ b/package/dnsmasq/dnsmasq.mk @@ -0,0 +1,50 @@ +############################################################# +# +# dnsmasq +# +############################################################# + +DNSMASQ_SITE=http://thekelleys.org.uk/dnsmasq +ifeq ($(filter $(TARGETS),dnsmasq1),) +DNSMASQ_SOURCE=dnsmasq-2.15.tar.gz +DNSMASQ_DIR=$(BUILD_DIR)/dnsmasq-2.15 +DNSMASQ_VER=dnsmasq2 +else +DNSMASQ_SOURCE=dnsmasq-1.18.tar.gz +DNSMASQ_DIR=$(BUILD_DIR)/dnsmasq-1.18 +DNSMASQ_VER=dnsmasq1 +endif +DNSMASQ_BINARY=dnsmasq +DNSMASQ_TARGET_BINARY=usr/sbin/dnsmasq + +$(DL_DIR)/$(DNSMASQ_SOURCE): + $(WGET) -P $(DL_DIR) $(DNSMASQ_SITE)/$(DNSMASQ_SOURCE) + +$(DNSMASQ_DIR)/.source: $(DL_DIR)/$(DNSMASQ_SOURCE) + zcat $(DL_DIR)/$(DNSMASQ_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(SOURCE_DIR)/patch-kernel.sh $(DNSMASQ_DIR) $(SOURCE_DIR) \ + $(DNSMASQ_VER)-\*.patch + touch $(DNSMASQ_DIR)/.source + +$(DNSMASQ_DIR)/src/$(DNSMASQ_BINARY): $(DNSMASQ_DIR)/.source + $(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" \ + BINDIR=/usr/sbin MANDIR=/usr/man -C $(DNSMASQ_DIR) + +$(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY): $(DNSMASQ_DIR)/src/$(DNSMASQ_BINARY) + $(MAKE) BINDIR=/usr/sbin MANDIR=/usr/man \ + DESTDIR=$(TARGET_DIR) -C $(DNSMASQ_DIR) install + $(STRIP) $(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY) + rm -rf $(TARGET_DIR)/usr/man + +dnsmasq: uclibc $(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY) + +dnsmasq1: uclibc $(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY) + +dnsmasq-source: $(DL_DIR)/$(DNSMASQ_SOURCE) + +dnsmasq-clean: + #$(MAKE) prefix=$(TARGET_DIR)/usr -C $(DNSMASQ_DIR) uninstall + -$(MAKE) -C $(DNSMASQ_DIR) clean + +dnsmasq-dirclean: + rm -rf $(DNSMASQ_DIR) diff --git a/package/dropbear_sshd/dropbear_sshd.mk b/package/dropbear_sshd/dropbear_sshd.mk new file mode 100644 index 000000000..407fb5779 --- /dev/null +++ b/package/dropbear_sshd/dropbear_sshd.mk @@ -0,0 +1,76 @@ +############################################################# +# +# dropbear_sshd +# +############################################################# +DROPBEAR_SSHD_SOURCE:=dropbear-0.43.tar.bz2 +DROPBEAR_SSHD_SITE:=http://matt.ucc.asn.au/dropbear/releases/ +DROPBEAR_SSHD_DIR:=$(BUILD_DIR)/dropbear-0.43 +DROPBEAR_SSHD_CAT:=bzcat +DROPBEAR_SSHD_BINARY:=dropbearmulti +DROPBEAR_SSHD_TARGET_BINARY:=usr/sbin/dropbear + + +$(DL_DIR)/$(DROPBEAR_SSHD_SOURCE): + $(WGET) -P $(DL_DIR) $(DROPBEAR_SSHD_SITE)/$(DROPBEAR_SSHD_SOURCE) + +dropbear_sshd-source: $(DL_DIR)/$(DROPBEAR_SSHD_SOURCE) + +$(DROPBEAR_SSHD_DIR)/.unpacked: $(DL_DIR)/$(DROPBEAR_SSHD_SOURCE) + $(DROPBEAR_SSHD_CAT) $(DL_DIR)/$(DROPBEAR_SSHD_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(SOURCE_DIR)/patch-kernel.sh $(DROPBEAR_SSHD_DIR) $(SOURCE_DIR) dropbear-\*.patch + $(SED) 's,^/\* #define DROPBEAR_MULTI.*,#define DROPBEAR_MULTI,g' $(DROPBEAR_SSHD_DIR)/options.h + touch $(DROPBEAR_SSHD_DIR)/.unpacked + +$(DROPBEAR_SSHD_DIR)/.configured: $(DROPBEAR_SSHD_DIR)/.unpacked + (cd $(DROPBEAR_SSHD_DIR); rm -rf config.cache; \ + autoconf; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + --with-shared \ + ); + touch $(DROPBEAR_SSHD_DIR)/.configured + +$(DROPBEAR_SSHD_DIR)/$(DROPBEAR_SSHD_BINARY): $(DROPBEAR_SSHD_DIR)/.configured + $(MAKE) $(TARGET_CONFIGURE_OPTS) LD=$(TARGET_CC) \ + -C $(DROPBEAR_SSHD_DIR) dropbearmulti + +$(TARGET_DIR)/$(DROPBEAR_SSHD_TARGET_BINARY): $(DROPBEAR_SSHD_DIR)/$(DROPBEAR_SSHD_BINARY) + #$(MAKE) DESTDIR=$(TARGET_DIR) $(TARGET_CONFIGURE_OPTS) \ + # LD=$(TARGET_CC) -C $(DROPBEAR_SSHD_DIR) install + #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + install -d -m 755 $(TARGET_DIR)/usr/sbin + install -d -m 755 $(TARGET_DIR)/usr/bin + install -m 755 $(DROPBEAR_SSHD_DIR)/$(DROPBEAR_SSHD_BINARY) \ + $(TARGET_DIR)/$(DROPBEAR_SSHD_TARGET_BINARY) + ln -sf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dropbearkey + ln -sf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dropbearconvert + cp $(DROPBEAR_SSHD_DIR)/S50dropbear $(TARGET_DIR)/etc/init.d/ + chmod a+x $(TARGET_DIR)/etc/init.d/S50dropbear + +dropbear_sshd: uclibc zlib $(TARGET_DIR)/$(DROPBEAR_SSHD_TARGET_BINARY) + +dropbear_sshd-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) $(TARGET_CONFIGURE_OPTS) \ + LD=$(TARGET_CC) -C $(DROPBEAR_SSHD_DIR) uninstall + -$(MAKE) -C $(DROPBEAR_SSHD_DIR) clean + +dropbear_sshd-dirclean: + rm -rf $(DROPBEAR_SSHD_DIR) + diff --git a/package/ed/ed.mk b/package/ed/ed.mk new file mode 100644 index 000000000..de6c3cb25 --- /dev/null +++ b/package/ed/ed.mk @@ -0,0 +1,55 @@ +############################################################# +# +# ed +# +############################################################# +ED_SOURCE:=ed_0.2.orig.tar.gz +ED_PATCH:=ed_0.2-19.diff.gz +ED_SITE:=http://ftp.debian.org/debian/pool/main/e/ed +ED_CAT:=zcat +ED_DIR:=$(BUILD_DIR)/ed-0.2 +ED_BINARY:=ed +ED_TARGET_BINARY:=bin/ed + +$(DL_DIR)/$(ED_SOURCE): + $(WGET) -P $(DL_DIR) $(ED_SITE)/$(ED_SOURCE) + +$(DL_DIR)/$(ED_PATCH): + $(WGET) -P $(DL_DIR) $(ED_SITE)/$(ED_PATCH) + +ed-source: $(DL_DIR)/$(ED_SOURCE) $(DL_DIR)/$(ED_PATCH) + +$(ED_DIR)/.unpacked: $(DL_DIR)/$(ED_SOURCE) $(DL_DIR)/$(ED_PATCH) + $(ED_CAT) $(DL_DIR)/$(ED_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(SOURCE_DIR)/patch-kernel.sh $(ED_DIR) $(DL_DIR) $(ED_PATCH) + touch $(ED_DIR)/.unpacked + +$(ED_DIR)/.configured: $(ED_DIR)/.unpacked + (cd $(ED_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + $(DISABLE_NLS) \ + ); + touch $(ED_DIR)/.configured + +$(ED_DIR)/$(ED_BINARY): $(ED_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(ED_DIR) + +$(TARGET_DIR)/$(ED_TARGET_BINARY): $(ED_DIR)/$(ED_BINARY) + cp -a $(ED_DIR)/$(ED_BINARY) $(TARGET_DIR)/$(ED_TARGET_BINARY) + +ed: uclibc $(TARGET_DIR)/$(ED_TARGET_BINARY) + +ed-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(ED_DIR) uninstall + -$(MAKE) -C $(ED_DIR) clean + +ed-dirclean: + rm -rf $(ED_DIR) + diff --git a/package/ext2root/ext2root.mk b/package/ext2root/ext2root.mk new file mode 100644 index 000000000..ff2877145 --- /dev/null +++ b/package/ext2root/ext2root.mk @@ -0,0 +1,55 @@ +############################################################# +# +# genext2fs to build to target ext2 filesystems +# +############################################################# +GENEXT2_DIR=$(BUILD_DIR)/genext2fs-1.3 +GENEXT2_SOURCE=genext2fs_1.3.orig.tar.gz +GENEXT2_SITE=http://ftp.debian.org/debian/pool/main/g/genext2fs +GENEXT2_PATCH=$(SOURCE_DIR)/genext2fs.patch + +$(DL_DIR)/$(GENEXT2_SOURCE): + $(WGET) -P $(DL_DIR) $(GENEXT2_SITE)/$(GENEXT2_SOURCE) + +$(GENEXT2_DIR): $(DL_DIR)/$(GENEXT2_SOURCE) $(GENEXT2_PATCH) + zcat $(DL_DIR)/$(GENEXT2_SOURCE) | tar -C $(BUILD_DIR) -xvf - + mv $(GENEXT2_DIR).orig $(GENEXT2_DIR) + cat $(GENEXT2_PATCH) | patch -p1 -d $(GENEXT2_DIR) + +$(GENEXT2_DIR)/genext2fs: $(GENEXT2_DIR) + $(MAKE) CFLAGS="-Wall -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \ + -D_FILE_OFFSET_BITS=64" -C $(GENEXT2_DIR); + touch -c $(GENEXT2_DIR)/genext2fs + +genext2fs: $(GENEXT2_DIR)/genext2fs + + + +############################################################# +# +# Build the ext2 root filesystem image +# +############################################################# + +# How much KB we want to add to the calculated size for slack space +GENEXT2_REALSIZE=$(subst total,, $(shell LANG=C du $(TARGET_DIR) -s -c -k | grep total )) +GENEXT2_ADDTOROOTSIZE=$(shell if [ $(GENEXT2_REALSIZE) -ge 20000 ] ; then echo 16384; else echo 16; fi) +GENEXT2_SIZE=$(shell expr $(GENEXT2_REALSIZE) + $(GENEXT2_ADDTOROOTSIZE) + 200) +# We currently add about 400 device nodes, so add that into the total +GENEXT2_INODES=$(shell expr $(shell find $(TARGET_DIR) | wc -l) + 400) +#GENEXT2_SIZE=100000 + +ext2root: genext2fs + #-@find $(TARGET_DIR)/lib -type f -name \*.so\* | xargs $(STRIP) --strip-unneeded 2>/dev/null || true; + -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true; + $(GENEXT2_DIR)/genext2fs -i $(GENEXT2_INODES) -b $(GENEXT2_SIZE) \ + -d $(TARGET_DIR) -q -D $(SOURCE_DIR)/device_table.txt $(IMAGE) + +ext2root-source: $(DL_DIR)/$(GENEXT2_SOURCE) + +ext2root-clean: + -$(MAKE) -C $(GENEXT2_DIR) clean + +ext2root-dirclean: + rm -rf $(GENEXT2_DIR) + diff --git a/package/fakeroot/fakeroot.mk b/package/fakeroot/fakeroot.mk new file mode 100644 index 000000000..f56105f7f --- /dev/null +++ b/package/fakeroot/fakeroot.mk @@ -0,0 +1,63 @@ +############################################################# +# +# fakeroot +# +############################################################# +FAKEROOT_SOURCE:=fakeroot_0.7.5.tar.gz +FAKEROOT_SITE:=http://ftp.debian.org/debian/pool/main/f/fakeroot +FAKEROOT_CAT:=zcat +FAKEROOT_DIR:=$(BUILD_DIR)/fakeroot-0.7.5 + + +$(DL_DIR)/$(FAKEROOT_SOURCE): + $(WGET) -P $(DL_DIR) $(FAKEROOT_SITE)/$(FAKEROOT_SOURCE) + +fakeroot-source: $(DL_DIR)/$(FAKEROOT_SOURCE) + +$(FAKEROOT_DIR)/.unpacked: $(DL_DIR)/$(FAKEROOT_SOURCE) + $(FAKEROOT_CAT) $(DL_DIR)/$(FAKEROOT_SOURCE) | tar -C $(BUILD_DIR) -xvf - + # If using busybox getopt, make it be quiet. + $(SED) "s,getopt --version,getopt --version 2>/dev/null," \ + $(FAKEROOT_DIR)/scripts/fakeroot + touch $(FAKEROOT_DIR)/.unpacked + +$(FAKEROOT_DIR)/.configured: $(FAKEROOT_DIR)/.unpacked + (cd $(FAKEROOT_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 \ + --libdir=/usr/lib/libfakeroot \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + ); + touch $(FAKEROOT_DIR)/.configured + +$(FAKEROOT_DIR)/faked: $(FAKEROOT_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(FAKEROOT_DIR) + +$(TARGET_DIR)/usr/bin/fakeroot: $(FAKEROOT_DIR)/faked + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(FAKEROOT_DIR) install + -mv $(TARGET_DIR)/usr/bin/$(ARCH)-linux-faked $(TARGET_DIR)/usr/bin/faked + -mv $(TARGET_DIR)/usr/bin/$(ARCH)-linux-fakeroot $(TARGET_DIR)/usr/bin/fakeroot + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +fakeroot: uclibc $(TARGET_DIR)/usr/bin/fakeroot + +fakeroot-clean: + $(MAKE) -C $(FAKEROOT_DIR) clean + +fakeroot-dirclean: + rm -rf $(FAKEROOT_DIR) + + diff --git a/package/file/file.mk b/package/file/file.mk new file mode 100644 index 000000000..ad21956c7 --- /dev/null +++ b/package/file/file.mk @@ -0,0 +1,66 @@ +############################################################# +# +# file +# +############################################################# +FILE_VER:=4.10 +FILE_SOURCE:=file-$(FILE_VER).tar.gz +FILE_SITE:=ftp://ftp.astron.com/pub/file +FILE_DIR:=$(BUILD_DIR)/file-$(FILE_VER) +FILE_CAT:=zcat +FILE_BINARY:=src/file +FILE_TARGET_BINARY:=usr/bin/file + +$(DL_DIR)/$(FILE_SOURCE): + $(WGET) -P $(DL_DIR) $(FILE_SITE)/$(FILE_SOURCE) + +file-source: $(DL_DIR)/$(FILE_SOURCE) + +$(FILE_DIR)/.unpacked: $(DL_DIR)/$(FILE_SOURCE) + $(FILE_CAT) $(DL_DIR)/$(FILE_SOURCE) | tar -C $(BUILD_DIR) -xvf - + cat $(SOURCE_DIR)/file.patch | patch -p1 -d $(FILE_DIR) + touch $(FILE_DIR)/.unpacked + +$(FILE_DIR)/.configured: $(FILE_DIR)/.unpacked + (cd $(FILE_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share/misc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + --enable-static \ + --disable-fsect-man5 \ + ); + touch $(FILE_DIR)/.configured + +$(FILE_DIR)/$(FILE_BINARY): $(FILE_DIR)/.configured + $(MAKE) $(TARGET_CONFIGURE_OPTS) LDFLAGS="-static" -C $(FILE_DIR) + +$(TARGET_DIR)/$(FILE_TARGET_BINARY): $(FILE_DIR)/$(FILE_BINARY) + $(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) -C $(FILE_DIR) install + -($(STRIP) $(TARGET_DIR)/usr/lib/libmagic.so.*.* > /dev/null 2>&1) + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +file: zlib uclibc $(TARGET_DIR)/$(FILE_TARGET_BINARY) + +file-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FILE_DIR) uninstall + -$(MAKE) -C $(FILE_DIR) clean + +file-dirclean: + rm -rf $(FILE_DIR) + diff --git a/package/findutils/findutils.mk b/package/findutils/findutils.mk new file mode 100644 index 000000000..0f052eb73 --- /dev/null +++ b/package/findutils/findutils.mk @@ -0,0 +1,70 @@ +############################################################# +# +# findutils +# +############################################################# +FINDUTILS_VER:=4.1.20 +FINDUTILS_SOURCE:=findutils-$(FINDUTILS_VER).tar.gz +FINDUTILS_SITE:=ftp://alpha.gnu.org/gnu/findutils +FINDUTILS_CAT:=zcat +FINDUTILS_DIR:=$(BUILD_DIR)/findutils-$(FINDUTILS_VER) +FINDUTILS_BINARY:=find/find +FINDUTILS_TARGET_BINARY:=usr/bin/find + +$(DL_DIR)/$(FINDUTILS_SOURCE): + $(WGET) -P $(DL_DIR) $(FINDUTILS_SITE)/$(FINDUTILS_SOURCE) + +findutils-source: $(DL_DIR)/$(FINDUTILS_SOURCE) + +$(FINDUTILS_DIR)/.unpacked: $(DL_DIR)/$(FINDUTILS_SOURCE) + $(FINDUTILS_CAT) $(DL_DIR)/$(FINDUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(FINDUTILS_DIR)/.unpacked + +$(FINDUTILS_DIR)/.configured: $(FINDUTILS_DIR)/.unpacked + (cd $(FINDUTILS_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ac_cv_func_setvbuf_reversed=no \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib/locate \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var/lib \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + ); + touch $(FINDUTILS_DIR)/.configured + +$(FINDUTILS_DIR)/$(FINDUTILS_BINARY): $(FINDUTILS_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(FINDUTILS_DIR) + +# This stuff is needed to work around GNU make deficiencies +findutils-target_binary: $(FINDUTILS_DIR)/$(FINDUTILS_BINARY) + @if [ -L $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY) ] ; then \ + rm -f $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY); fi; + @if [ ! -f $(FINDUTILS_DIR)/$(FINDUTILS_BINARY) -o $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY) \ + -ot $(FINDUTILS_DIR)/$(FINDUTILS_BINARY) ] ; then \ + set -x; \ + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FINDUTILS_DIR) install; \ + $(STRIP) $(TARGET_DIR)/usr/lib/locate/* > /dev/null 2>&1; \ + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc; fi; + +findutils: uclibc findutils-target_binary + +findutils-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FINDUTILS_DIR) uninstall + -$(MAKE) -C $(FINDUTILS_DIR) clean + +findutils-dirclean: + rm -rf $(FINDUTILS_DIR) + diff --git a/package/flex/flex.mk b/package/flex/flex.mk new file mode 100644 index 000000000..a29fa5875 --- /dev/null +++ b/package/flex/flex.mk @@ -0,0 +1,81 @@ +############################################################# +# +# flex +# +############################################################# +FLEX_SOURCE:=flex_2.5.4a.orig.tar.gz +FLEX_PATCH:=flex_2.5.4a-24.diff.gz +FLEX_SITE:=http://ftp.debian.org/debian/pool/main/f/flex +FLEX_DIR:=$(BUILD_DIR)/flex-2.5.4 +FLEX_CAT:=zcat +FLEX_BINARY:=flex +FLEX_TARGET_BINARY:=usr/bin/flex + +$(DL_DIR)/$(FLEX_SOURCE): + $(WGET) -P $(DL_DIR) $(FLEX_SITE)/$(FLEX_SOURCE) + +$(DL_DIR)/$(FLEX_PATCH): + $(WGET) -P $(DL_DIR) $(FLEX_SITE)/$(FLEX_PATCH) + +flex-source: $(DL_DIR)/$(FLEX_SOURCE) $(DL_DIR)/$(FLEX_PATCH) + +$(FLEX_DIR)/.unpacked: $(DL_DIR)/$(FLEX_SOURCE) $(DL_DIR)/$(FLEX_PATCH) + $(FLEX_CAT) $(DL_DIR)/$(FLEX_SOURCE) | tar -C $(BUILD_DIR) -xvf - + #$(SOURCE_DIR)/patch-kernel.sh $(FLEX_DIR) $(DL_DIR) $(FLEX_PATCH) + touch $(FLEX_DIR)/.unpacked + +$(FLEX_DIR)/.configured: $(FLEX_DIR)/.unpacked + (cd $(FLEX_DIR); autoconf; rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + ); + touch $(FLEX_DIR)/.configured + +$(FLEX_DIR)/$(FLEX_BINARY): $(FLEX_DIR)/.configured + $(MAKE) -C $(FLEX_DIR) + +$(TARGET_DIR)/$(FLEX_TARGET_BINARY): $(FLEX_DIR)/$(FLEX_BINARY) + $(MAKE) \ + prefix=$(TARGET_DIR)/usr \ + exec_prefix=$(TARGET_DIR)/usr \ + bindir=$(TARGET_DIR)/usr/bin \ + sbindir=$(TARGET_DIR)/usr/sbin \ + libexecdir=$(TARGET_DIR)/usr/lib \ + datadir=$(TARGET_DIR)/usr/share \ + sysconfdir=$(TARGET_DIR)/etc \ + sharedstatedir=$(TARGET_DIR)/usr/com \ + localstatedir=$(TARGET_DIR)/var \ + libdir=$(TARGET_DIR)/usr/lib \ + infodir=$(TARGET_DIR)/usr/info \ + mandir=$(TARGET_DIR)/usr/man \ + includedir=$(TARGET_DIR)/usr/include \ + -C $(FLEX_DIR) install; + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + (cd $(TARGET_DIR)/usr/bin; ln -s flex lex) + +flex: uclibc $(TARGET_DIR)/$(FLEX_TARGET_BINARY) + +flex-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(FLEX_DIR) uninstall + -$(MAKE) -C $(FLEX_DIR) clean + +flex-dirclean: + rm -rf $(FLEX_DIR) + diff --git a/package/gawk/gawk.mk b/package/gawk/gawk.mk new file mode 100644 index 000000000..8c05ab042 --- /dev/null +++ b/package/gawk/gawk.mk @@ -0,0 +1,66 @@ +############################################################# +# +# gawk +# +############################################################# +GAWK_SOURCE:=gawk-3.1.2.tar.gz +GAWK_SITE:=ftp://ftp.gnu.org/gnu/gawk +GAWK_CAT:=zcat +GAWK_DIR:=$(BUILD_DIR)/gawk-3.1.2 +GAWK_BINARY:=gawk +GAWK_TARGET_BINARY:=usr/bin/gawk + +$(DL_DIR)/$(GAWK_SOURCE): + $(WGET) -P $(DL_DIR) $(GAWK_SITE)/$(GAWK_SOURCE) + +gawk-source: $(DL_DIR)/$(GAWK_SOURCE) + +$(GAWK_DIR)/.unpacked: $(DL_DIR)/$(GAWK_SOURCE) + $(GAWK_CAT) $(DL_DIR)/$(GAWK_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(GAWK_DIR)/.unpacked + +$(GAWK_DIR)/.configured: $(GAWK_DIR)/.unpacked + (cd $(GAWK_DIR); rm -rf config.cache; autoconf; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ac_cv_func_getpgrp_void=yes \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + ); + touch $(GAWK_DIR)/.configured + +$(GAWK_DIR)/$(GAWK_BINARY): $(GAWK_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(GAWK_DIR) + +$(TARGET_DIR)/$(GAWK_TARGET_BINARY): $(GAWK_DIR)/$(GAWK_BINARY) + rm -f $(TARGET_DIR)/usr/bin/awk + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GAWK_DIR) install + rm -f $(TARGET_DIR)/usr/bin/gawk-* + (cd $(TARGET_DIR)/usr/bin; ln -sf gawk awk) + $(STRIP) $(TARGET_DIR)/usr/lib/awk/* > /dev/null 2>&1 + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +gawk: uclibc $(TARGET_DIR)/$(GAWK_TARGET_BINARY) + +gawk-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GAWK_DIR) uninstall + -$(MAKE) -C $(GAWK_DIR) clean + +gawk-dirclean: + rm -rf $(GAWK_DIR) + diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk new file mode 100644 index 000000000..84c7a25bc --- /dev/null +++ b/package/gettext/gettext.mk @@ -0,0 +1,60 @@ +############################################################# +# +# gettext +# +############################################################# +GETTEXT_SOURCE:=gettext-0.11.5.tar.gz +GETTEXT_SITE:=ftp://ftp.gnu.org/gnu/gettext +GETTEXT_DIR:=$(BUILD_DIR)/gettext-0.11.5 +GETTEXT_CAT:=zcat +GETTEXT_BINARY:=gettext +GETTEXT_TARGET_BINARY:=usr/bin/gettext + +$(DL_DIR)/$(GETTEXT_SOURCE): + $(WGET) -P $(DL_DIR) $(GETTEXT_SITE)/$(GETTEXT_SOURCE) + +gettext-source: $(DL_DIR)/$(GETTEXT_SOURCE) + +$(GETTEXT_DIR)/.unpacked: $(DL_DIR)/$(GETTEXT_SOURCE) + $(GETTEXT_CAT) $(DL_DIR)/$(GETTEXT_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(GETTEXT_DIR)/.unpacked + +$(GETTEXT_DIR)/.configured: $(GETTEXT_DIR)/.unpacked + (cd $(GETTEXT_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 \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + ); + touch $(GETTEXT_DIR)/.configured + +$(GETTEXT_DIR)/$(GETTEXT_BINARY): $(GETTEXT_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(GETTEXT_DIR) + +$(TARGET_DIR)/$(GETTEXT_TARGET_BINARY): $(GETTEXT_DIR)/$(GETTEXT_BINARY) + $(MAKE) DESTDIR=$(STAGING_DIR) CC=$(TARGET_CC) -C $(GETTEXT_DIR) install + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GETTEXT_DIR) install + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc \ + $(TARGET_DIR)/usr/doc + +gettext: uclibc $(TARGET_DIR)/$(GETTEXT_TARGET_BINARY) + +gettext-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GETTEXT_DIR) uninstall + -$(MAKE) -C $(GETTEXT_DIR) clean + +gettext-dirclean: + rm -rf $(GETTEXT_DIR) + diff --git a/package/grep/grep.mk b/package/grep/grep.mk new file mode 100644 index 000000000..cc7856c08 --- /dev/null +++ b/package/grep/grep.mk @@ -0,0 +1,73 @@ +############################################################# +# +# grep +# +############################################################# +GNUGREP_SOURCE:=grep_2.5.1.ds1.orig.tar.gz +GNUGREP_SITE:=http://ftp.debian.org/debian/pool/main/g/grep/ +GNUGREP_DIR:=$(BUILD_DIR)/grep-2.5.1 +GNUGREP_CAT:=zcat +GNUGREP_BINARY:=src/grep +GNUGREP_TARGET_BINARY:=bin/grep + +$(DL_DIR)/$(GNUGREP_SOURCE): + $(WGET) -P $(DL_DIR) $(GNUGREP_SITE)/$(GNUGREP_SOURCE) + +grep-source: $(DL_DIR)/$(GNUGREP_SOURCE) + +$(GNUGREP_DIR)/.unpacked: $(DL_DIR)/$(GNUGREP_SOURCE) + rm -rf $(GNUGREP_DIR).xxx + $(GNUGREP_CAT) $(DL_DIR)/$(GNUGREP_SOURCE) | tar -C $(BUILD_DIR) -xvf - + mv $(GNUGREP_DIR) $(GNUGREP_DIR).xxx + $(GNUGREP_CAT) $(GNUGREP_DIR).xxx/grep_2.5.1.tar.gz | tar -C $(BUILD_DIR) -xvf - + rm -rf $(GNUGREP_DIR).xxx + touch $(GNUGREP_DIR)/.unpacked + +$(GNUGREP_DIR)/.configured: $(GNUGREP_DIR)/.unpacked + (cd $(GNUGREP_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + --disable-perl-regexp \ + --without-included-regex \ + ); + touch $(GNUGREP_DIR)/.configured + +$(GNUGREP_DIR)/$(GNUGREP_BINARY): $(GNUGREP_DIR)/.configured + $(MAKE) -C $(GNUGREP_DIR) + +# This stuff is needed to work around GNU make deficiencies +grep-target_binary: $(GNUGREP_DIR)/$(GNUGREP_BINARY) + @if [ -L $(TARGET_DIR)/$(GNUGREP_TARGET_BINARY) ] ; then \ + rm -f $(TARGET_DIR)/$(GNUGREP_TARGET_BINARY); fi; + @if [ ! -f $(GNUGREP_DIR)/$(GNUGREP_BINARY) -o $(TARGET_DIR)/$(GNUGREP_TARGET_BINARY) -ot \ + $(GNUGREP_DIR)/$(GNUGREP_BINARY) ] ; then \ + set -x; \ + rm -f $(TARGET_DIR)/bin/grep $(TARGET_DIR)/bin/egrep $(TARGET_DIR)/bin/fgrep; \ + cp -a $(GNUGREP_DIR)/src/grep $(GNUGREP_DIR)/src/egrep \ + $(GNUGREP_DIR)/src/fgrep $(TARGET_DIR)/bin/; fi + +grep: uclibc grep-target_binary + +grep-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUGREP_DIR) uninstall + -$(MAKE) -C $(GNUGREP_DIR) clean + +grep-dirclean: + rm -rf $(GNUGREP_DIR) + diff --git a/package/gzip/gzip.mk b/package/gzip/gzip.mk new file mode 100644 index 000000000..d5ea8dd8a --- /dev/null +++ b/package/gzip/gzip.mk @@ -0,0 +1,70 @@ +############################################################# +# +# gzip +# +############################################################# +GZIP_SOURCE:=gzip-1.3.5.tar.gz +GZIP_SITE:=ftp://alpha.gnu.org/gnu/gzip +GZIP_DIR:=$(BUILD_DIR)/gzip-1.3.5 +GZIP_CAT:=zcat +GZIP_BINARY:=$(GZIP_DIR)/gzip +GZIP_TARGET_BINARY:=$(TARGET_DIR)/bin/zmore + +ifneq ($(BR2_LARGEFILE),y) +GZIP_LARGEFILE="--disable-largefile" +endif + +$(DL_DIR)/$(GZIP_SOURCE): + $(WGET) -P $(DL_DIR) $(GZIP_SITE)/$(GZIP_SOURCE) + +gzip-source: $(DL_DIR)/$(GZIP_SOURCE) + +$(GZIP_DIR)/.unpacked: $(DL_DIR)/$(GZIP_SOURCE) + $(GZIP_CAT) $(DL_DIR)/$(GZIP_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(GZIP_DIR)/.unpacked + +$(GZIP_DIR)/.configured: $(GZIP_DIR)/.unpacked + (cd $(GZIP_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=/ \ + --bindir=/bin \ + --sbindir=/bin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share/misc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(GZIP_LARGEFILE) \ + ); + touch $(GZIP_DIR)/.configured + +$(GZIP_BINARY): $(GZIP_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(GZIP_DIR) + +$(GZIP_TARGET_BINARY): $(GZIP_BINARY) + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GZIP_DIR) install + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + (cd $(TARGET_DIR)/bin; \ + ln -sf gzip gunzip; \ + ln -sf gzip zcat; \ + ln -sf zdiff zcmp; \ + ln -sf zgrep zegrep; \ + ln -sf zgrep zfgrep;) + +gzip: uclibc $(GZIP_TARGET_BINARY) + +gzip-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GZIP_DIR) uninstall + -$(MAKE) -C $(GZIP_DIR) clean + +gzip-dirclean: + rm -rf $(GZIP_DIR) + diff --git a/package/hostap/hostap.mk b/package/hostap/hostap.mk new file mode 100644 index 000000000..b7908fd17 --- /dev/null +++ b/package/hostap/hostap.mk @@ -0,0 +1,53 @@ +############################################################# +# +# hostap +# +############################################################# +HOSTAP_SOURCE_URL=http://hostap.epitest.fi/cgi-bin/viewcvs.cgi/hostap/hostap.tar.gz?tarball=1 +HOSTAP_SOURCE=hostap.tar.gz +HOSTAP_DIR=$(BUILD_DIR)/hostap-snapshot + +$(DL_DIR)/$(HOSTAP_SOURCE): + $(WGET) -P $(DL_DIR) $(HOSTAP_SOURCE_URL) -O $(DL_DIR)/$(HOSTAP_SOURCE) + +hostap-source: $(DL_DIR)/$(HOSTAP_SOURCE) + +$(HOSTAP_DIR)/.unpacked: $(DL_DIR)/$(HOSTAP_SOURCE) + zcat $(DL_DIR)/$(HOSTAP_SOURCE) | tar -C $(BUILD_DIR) -xvf - + mv -f $(BUILD_DIR)/hostap $(HOSTAP_DIR) + touch $(HOSTAP_DIR)/.unpacked + +$(HOSTAP_DIR)/.configured: $(HOSTAP_DIR)/.unpacked + #$(SED) "s,/.*#define PRISM2_DOWNLOAD_SUPPORT.*/,#define PRISM2_DOWNLOAD_SUPPORT,g" \ + # $(HOSTAP_DIR)/driver/modules/hostap_config.h + touch $(HOSTAP_DIR)/.configured + +$(HOSTAP_DIR)/utils/hostap_crypt_conf: $(HOSTAP_DIR)/.configured + $(MAKE) -C $(HOSTAP_DIR)/utils CC=$(TARGET_CC) CFLAGS="-Os -Wall $(TARGET_CFLAGS) -I../driver/modules" + $(MAKE) -C $(HOSTAP_DIR)/hostapd CC=$(TARGET_CC) CFLAGS="-Os -Wall $(TARGET_CFLAGS) -I../driver/modules -I../utils" + touch -c $(HOSTAP_DIR)/driver/modules/hostap.o + +$(TARGET_DIR)//usr/bin/hostap_crypt_conf: $(HOSTAP_DIR)/utils/hostap_crypt_conf + # Make the dir + -rm -rf $(HOSTAP_TARGET_MODULE_DIR) + -mkdir -p $(HOSTAP_TARGET_MODULE_DIR) + # Copy the pcmcia-cs conf file + -mkdir -p $(TARGET_DIR)/etc/pcmcia + cp -af $(HOSTAP_DIR)/driver/etc/hostap_cs.conf $(TARGET_DIR)/etc/pcmcia/ + # Copy The Utils + cp -af $(HOSTAP_DIR)/utils/hostap_crypt_conf $(TARGET_DIR)/usr/bin/ + cp -af $(HOSTAP_DIR)/utils/hostap_diag $(TARGET_DIR)/usr/bin/ + cp -af $(HOSTAP_DIR)/utils/prism2_param $(TARGET_DIR)/usr/bin/ + cp -af $(HOSTAP_DIR)/utils/prism2_srec $(TARGET_DIR)/usr/bin/ + # Copy hostapd + cp -af $(HOSTAP_DIR)/hostapd/hostapd $(TARGET_DIR)/usr/sbin/ + +hostap: pcmcia $(TARGET_DIR)//usr/bin/hostap_crypt_conf + +hostap-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(HOSTAP_DIR) uninstall + -$(MAKE) -C $(HOSTAP_DIR) clean + +hostap-dirclean: + rm -rf $(HOSTAP_DIR) + diff --git a/package/hotplug/hotplug.mk b/package/hotplug/hotplug.mk new file mode 100644 index 000000000..e13a6025d --- /dev/null +++ b/package/hotplug/hotplug.mk @@ -0,0 +1,39 @@ +############################################################# +# +# hotplug support +# +############################################################# +HOTPLUG_SOURCE=diethotplug-0.4.tar.gz +HOTPLUG_SITE=http://aleron.dl.sourceforge.net/sourceforge/linux-hotplug +HOTPLUG_DIR=$(BUILD_DIR)/diethotplug-0.4 +HOTPLUG_PATCH=$(SOURCE_DIR)/hotplug.patch + +$(DL_DIR)/$(HOTPLUG_SOURCE): + $(WGET) -P $(DL_DIR) $(HOTPLUG_SITE)/$(HOTPLUG_SOURCE) + +$(HOTPLUG_DIR): $(DL_DIR)/$(HOTPLUG_SOURCE) $(HOTPLUG_PATCH) + zcat $(DL_DIR)/$(HOTPLUG_SOURCE) | tar -C $(BUILD_DIR) -xvf - + cat $(HOTPLUG_PATCH) | patch -p1 -d $(HOTPLUG_DIR) + +$(HOTPLUG_DIR)/hotplug: $(HOTPLUG_DIR) + $(MAKE) CROSS=$(TARGET_CROSS) DEBUG=false KLIBC=false \ + KERNEL_INCLUDE_DIR=$(STAGING_DIR)/include \ + TARGET_DIR=$(TARGET_DIR) -C $(HOTPLUG_DIR); + $(STRIP) $(HOTPLUG_DIR)/hotplug; + touch -c $(HOTPLUG_DIR)/hotplug + +$(TARGET_DIR)/sbin/hotplug: $(HOTPLUG_DIR)/hotplug + cp $(HOTPLUG_DIR)/hotplug $(TARGET_DIR)/sbin/hotplug; + touch -c $(TARGET_DIR)/sbin/hotplug + +hotplug: uclibc $(TARGET_DIR)/sbin/hotplug + +hotplug-source: $(DL_DIR)/$(HOTPLUG_SOURCE) + +hotplug-clean: + rm -f $(TARGET_DIR)/sbin/hotplug + -$(MAKE) -C $(HOTPLUG_DIR) clean + +hotplug-dirclean: + rm -rf $(HOTPLUG_DIR) + diff --git a/package/iproute2/iproute2.mk b/package/iproute2/iproute2.mk new file mode 100644 index 000000000..4aa840585 --- /dev/null +++ b/package/iproute2/iproute2.mk @@ -0,0 +1,47 @@ +############################################################# +# +# iproute2 +# +############################################################# +IPROUTE2_VER:=2.6.9 +IPROUTE2_STAMP:=ss040831 +IPROUTE2_SOURCE:=iproute2-$(IPROUTE2_VER)-$(IPROUTE2_STAMP).tar.gz +IPROUTE2_SITE:=http://developer.osdl.org/dev/iproute2/download/ +IPROUTE2_DIR:=$(BUILD_DIR)/iproute2-$(IPROUTE2_VER) +IPROUTE2_CAT:=zcat +IPROUTE2_BINARY:=tc/tc +IPROUTE2_TARGET_BINARY:=sbin/tc + +$(DL_DIR)/$(IPROUTE2_SOURCE): + $(WGET) -P $(DL_DIR) $(IPROUTE2_SOURCE_URL)$(IPROUTE2_SOURCE) + +$(IPROUTE2_DIR)/.unpacked: $(DL_DIR)/$(IPROUTE2_SOURCE) + $(IPROUTE2_CAT) $(DL_DIR)/$(IPROUTE2_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(IPROUTE2_DIR)/.unpacked + +$(IPROUTE2_DIR)/.configured: $(IPROUTE2_DIR)/.unpacked + (cd $(IPROUTE2_DIR); \ + ./configure; \ + $(SED) '/TC_CONFIG_ATM/s:=.*:=n:' Config) + touch $(IPROUTE2_DIR)/.configured + +$(IPROUTE2_DIR)/$(IPROUTE2_BINARY): $(IPROUTE2_DIR)/.configured + $(MAKE) \ + -C $(IPROUTE2_DIR) \ + KERNEL_INCLUDE=$(LINUX_SOURCE_DIR)/include \ + CC=$(TARGET_CC) \ + AR=$(TARGET_CROSS)ar \ + NETEM_DIST="" \ + SUBDIRS="lib tc" + +$(TARGET_DIR)/$(IPROUTE2_TARGET_BINARY): $(IPROUTE2_DIR)/$(IPROUTE2_BINARY) + install -Dc $(IPROUTE2_DIR)/$(IPROUTE2_BINARY) $(TARGET_DIR)/$(IPROUTE2_TARGET_BINARY) + +iproute2: $(TARGET_DIR)/$(IPROUTE2_TARGET_BINARY) + +iproute2-clean: + rm -f $(TARGET_DIR)/$(IPROUTE2_TARGET_BINARY) + -$(MAKE) -C $(IPROUTE2_DIR) clean + +iproute2-dirclean: + rm -rf $(IPROUTE2_DIR) diff --git a/package/iptables/iptables.mk b/package/iptables/iptables.mk new file mode 100644 index 000000000..2d4ef43b5 --- /dev/null +++ b/package/iptables/iptables.mk @@ -0,0 +1,51 @@ +############################################################# +# +# iptables +# +############################################################# +IPTABLES_SOURCE_URL=http://www.netfilter.org/files +IPTABLES_SOURCE=iptables-1.2.9.tar.bz2 +IPTABLES_BUILD_DIR=$(BUILD_DIR)/iptables-1.2.9 + +$(DL_DIR)/$(IPTABLES_SOURCE): + $(WGET) -P $(DL_DIR) $(IPTABLES_SOURCE_URL)/$(IPTABLES_SOURCE) + +$(IPTABLES_BUILD_DIR)/.unpacked: $(DL_DIR)/$(IPTABLES_SOURCE) + bzcat $(DL_DIR)/$(IPTABLES_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(IPTABLES_BUILD_DIR)/.unpacked + +$(IPTABLES_BUILD_DIR)/.configured: $(IPTABLES_BUILD_DIR)/.unpacked + # Allow patches. Needed for openwrt for instance. + $(SOURCE_DIR)/patch-kernel.sh $(IPTABLES_BUILD_DIR) $(SOURCE_DIR) iptables-\*.patch + # + $(SED) "s;\[ -f /usr/include/netinet/ip6.h \];grep -q '__UCLIBC_HAS_IPV6__ 1' \ + $(BUILD_DIR)/uClibc/include/bits/uClibc_config.h;" $(IPTABLES_BUILD_DIR)/Makefile + touch $(IPTABLES_BUILD_DIR)/.configured + +$(IPTABLES_BUILD_DIR)/iptables: $(IPTABLES_BUILD_DIR)/.configured + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(IPTABLES_BUILD_DIR) \ + KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \ + CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" + +$(TARGET_DIR)/sbin/iptables: $(IPTABLES_BUILD_DIR)/iptables + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(IPTABLES_BUILD_DIR) \ + KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \ + CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \ + DESTDIR=$(TARGET_DIR) install + $(STRIP) $(TARGET_DIR)/usr/sbin/iptables* + $(STRIP) $(TARGET_DIR)/usr/lib/iptables/*.so + rm -rf $(TARGET_DIR)/usr/man + +iptables: linux $(TARGET_DIR)/sbin/iptables + +iptables-source: $(DL_DIR)/$(IPTABLES_SOURCE) + +iptables-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(IPTABLES_BUILD_DIR) uninstall + -$(MAKE) -C $(IPTABLES_BUILD_DIR) clean + +iptables-dirclean: + rm -rf $(IPTABLES_BUILD_DIR) + diff --git a/package/jffs2root/jffs2root.mk b/package/jffs2root/jffs2root.mk new file mode 100644 index 000000000..a8c6de68c --- /dev/null +++ b/package/jffs2root/jffs2root.mk @@ -0,0 +1,49 @@ +############################################################# +# +# mtd provides us with mkfs.jffs2, to target JFFS2 filesystems +# +############################################################# + +MTD_DIR:=$(BUILD_DIR)/mtd-20011217 +MTD_SOURCE=mtd_20011217.orig.tar.gz +MTD_SITE=http://ftp.debian.org/debian/pool/main/m/mtd +MKFS_JFFS2=$(shell which mkfs.jffs2 2>/dev/null || echo $(MTD_DIR)/util/mkfs.jffs2) + +$(DL_DIR)/$(MTD_SOURCE): + $(WGET) -P $(DL_DIR) $(MTD_SITE)/$(MTD_SOURCE) + +$(MTD_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE) + zcat $(DL_DIR)/$(MTD_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(MTD_DIR)/.unpacked + +$(MTD_DIR)/util/mkfs.jffs2: $(MTD_DIR)/.unpacked + CFLAGS=-I$(LINUX_HEADERS_DIR)/include $(MAKE) LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util + +mtd: $(MKFS_JFFS2) + + +############################################################# +# +# Build the jffs2 root filesystem image +# +############################################################# + +jffs2root: mtd + #-@find $(TARGET_DIR)/lib -type f -name \*.so\* | xargs $(STRIP) --strip-unneeded 2>/dev/null || true; + -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true; + @rm -rf $(TARGET_DIR)/usr/man + @rm -rf $(TARGET_DIR)/usr/info + $(MKFS_JFFS2) --pad --little-endian --squash -e 0x20000 \ + -D $(SOURCE_DIR)/device_table.txt -d $(TARGET_DIR) \ + -o $(IMAGE) + +jffs2root-source: $(DL_DIR)/$(MTD_SOURCE) + +jffs2root-clean: + -$(MAKE) -C $(MTD_DIR) clean + +jffs2root-dirclean: + rm -rf $(MTD_DIR) + + + diff --git a/package/jpeg/jpeg.mk b/package/jpeg/jpeg.mk new file mode 100644 index 000000000..d3f99676d --- /dev/null +++ b/package/jpeg/jpeg.mk @@ -0,0 +1,73 @@ +############################################################# +# +# jpeg (libraries needed by some apps) +# +############################################################# +# Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org> +# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA +JPEG_DIR=$(BUILD_DIR)/jpeg-6b +JPEG_SITE:=ftp://ftp.uu.net/graphics/jpeg/ +JPEG_SOURCE=jpegsrc.v6b.tar.gz +JPEG_CAT:=zcat + +$(DL_DIR)/$(JPEG_SOURCE): + $(WGET) -P $(DL_DIR) $(JPEG_SITE)/$(JPEG_SOURCE) + +jpeg-source: $(DL_DIR)/$(JPEG_SOURCE) + +$(JPEG_DIR)/.unpacked: $(DL_DIR)/$(JPEG_SOURCE) + $(JPEG_CAT) $(DL_DIR)/$(JPEG_SOURCE) | tar -C $(BUILD_DIR) -xvf - + # The config.guess distributed with the package is not able + # to handle cross compilation. Use the one from binutils. + cp $(BINUTILS_DIR)/config.guess $(JPEG_DIR)/ + touch $(JPEG_DIR)/.unpacked + +$(JPEG_DIR)/.configured: $(JPEG_DIR)/.unpacked + (cd $(JPEG_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 \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --enable-shared \ + ); + touch $(JPEG_DIR)/.configured + +$(STAGING_DIR)/lib/libjpeg.so.62.0.0: $(JPEG_DIR)/.configured + $(MAKE) -C $(JPEG_DIR) all + # Note: This does not install the utilities. + $(MAKE) -C $(JPEG_DIR) prefix=$(STAGING_DIR) exec_prefix=$(STAGING_DIR) install-headers install-lib + +$(TARGET_DIR)/lib/libjpeg.so.62.0.0: $(STAGING_DIR)/lib/libjpeg.so.62.0.0 + cp -dpf $(STAGING_DIR)/lib/libjpeg.so* $(TARGET_DIR)/usr/lib/ + -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libjpeg.so.62.0.0 + +jpeg: uclibc $(TARGET_DIR)/lib/libjpeg.so.62.0.0 + +jpeg-clean: + -$(MAKE) -C $(JPEG_DIR) clean diff --git a/package/less/less.mk b/package/less/less.mk new file mode 100644 index 000000000..76e5a0613 --- /dev/null +++ b/package/less/less.mk @@ -0,0 +1,50 @@ +############################################################# +# +# less +# +############################################################# +LESS_VERSION:=382 +LESS_SOURCE:=less-$(LESS_VERSION).tar.gz +LESS_SITE:=http://www.greenwoodsoftware.com/less +LESS_DIR:=$(BUILD_DIR)/less-$(LESS_VERSION) +LESS_BINARY:=less +LESS_TARGET_BINARY:=usr/bin/less + +$(DL_DIR)/$(LESS_SOURCE): + $(WGET) -P $(DL_DIR) $(LESS_SITE)/$(LESS_SOURCE) + +$(LESS_DIR)/.source: $(DL_DIR)/$(LESS_SOURCE) + zcat $(DL_DIR)/$(LESS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(LESS_DIR)/.source + +$(LESS_DIR)/.configured: $(LESS_DIR)/.source + (cd $(LESS_DIR); \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --sysconfdir=/etc \ + ); + touch $(LESS_DIR)/.configured; + +$(LESS_DIR)/$(LESS_BINARY): $(LESS_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(LESS_DIR) + +$(TARGET_DIR)/$(LESS_TARGET_BINARY): $(LESS_DIR)/$(LESS_BINARY) + $(MAKE) prefix=$(TARGET_DIR)/usr -C $(LESS_DIR) install + rm -Rf $(TARGET_DIR)/usr/man + +less: uclibc $(TARGET_DIR)/$(LESS_TARGET_BINARY) + +less-source: $(DL_DIR)/$(LESS_SOURCE) + +less-clean: + $(MAKE) prefix=$(TARGET_DIR)/usr -C $(LESS_DIR) uninstall + -$(MAKE) -C $(LESS_DIR) clean + +less-dirclean: + rm -rf $(LESS_DIR) + diff --git a/package/libfloat/libfloat.mk b/package/libfloat/libfloat.mk new file mode 100644 index 000000000..a7404fcdc --- /dev/null +++ b/package/libfloat/libfloat.mk @@ -0,0 +1,57 @@ +############################################################# +# +# libfloat +# +############################################################# +LIBFLOAT_SOURCE:=libfloat_990616.orig.tar.gz +LIBFLOAT_PATCH:=libfloat_990616-3.diff.gz +LIBFLOAT_SITE:=http://ftp.debian.org/debian/pool/main/libf/libfloat +LIBFLOAT_CAT:=zcat +LIBFLOAT_DIR:=$(BUILD_DIR)/libfloat + +LIBFLOAT_TARGET= +ifeq ($(strip $(SOFT_FLOAT)),true) +ifeq ("$(strip $(ARCH))","arm") +ifeq ($(findstring 3.3.,$(GCC_VERSION)),3.3.) +LIBFLOAT_TARGET+=$(STAGING_DIR)/lib/libfloat.so +endif +endif +endif + +$(DL_DIR)/$(LIBFLOAT_SOURCE): + $(WGET) -P $(DL_DIR) $(LIBFLOAT_SITE)/$(LIBFLOAT_SOURCE) + +$(DL_DIR)/$(LIBFLOAT_PATCH): + $(WGET) -P $(DL_DIR) $(LIBFLOAT_SITE)/$(LIBFLOAT_PATCH) + +libfloat-source: $(DL_DIR)/$(LIBFLOAT_SOURCE) $(DL_DIR)/$(LIBFLOAT_PATCH) + +$(LIBFLOAT_DIR)/.unpacked: $(DL_DIR)/$(LIBFLOAT_SOURCE) $(DL_DIR)/$(LIBFLOAT_PATCH) + $(LIBFLOAT_CAT) $(DL_DIR)/$(LIBFLOAT_SOURCE) | tar -C $(BUILD_DIR) -xvf - + # Remove the binary files distributed with the the package. + make -C $(LIBFLOAT_DIR) clean + $(SOURCE_DIR)/patch-kernel.sh $(LIBFLOAT_DIR) $(DL_DIR) $(LIBFLOAT_PATCH) + $(SOURCE_DIR)/patch-kernel.sh $(LIBFLOAT_DIR) $(SOURCE_DIR) libfloat.patch + touch $(LIBFLOAT_DIR)/.unpacked + +$(LIBFLOAT_DIR)/libfloat.so.1: $(LIBFLOAT_DIR)/.unpacked $(TARGET_CC) + $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld -C $(LIBFLOAT_DIR) + +$(STAGING_DIR)/lib/libfloat.so: $(LIBFLOAT_DIR)/libfloat.so.1 + cp -a $(LIBFLOAT_DIR)/libfloat.a $(STAGING_DIR)/lib/libfloat.a + cp -a $(LIBFLOAT_DIR)/libfloat.so.1 $(STAGING_DIR)/lib/libfloat.so.1 + (cd $(STAGING_DIR)/lib ; ln -sf libfloat.so.1 libfloat.so) + cp -a $(LIBFLOAT_DIR)/libfloat.a $(TARGET_DIR)/usr/lib/libfloat.a + cp -a $(LIBFLOAT_DIR)/libfloat.so.1 $(TARGET_DIR)/lib/libfloat.so.1 + $(STRIP) $(TARGET_DIR)/lib/libfloat.so.1 > /dev/null 2>&1 + (cd $(TARGET_DIR)/lib ; ln -sf libfloat.so.1 libfloat.so) + (cd $(TARGET_DIR)/usr/lib ; ln -sf /lib/libfloat.so libfloat.so) + +libfloat: $(STAGING_DIR)/lib/libfloat.so + +libfloat-clean: + -$(MAKE) -C $(LIBFLOAT_DIR) clean + +libfloat-dirclean: + rm -rf $(LIBFLOAT_DIR) + diff --git a/package/libglib12/libglib12.mk b/package/libglib12/libglib12.mk new file mode 100644 index 000000000..f6211ee10 --- /dev/null +++ b/package/libglib12/libglib12.mk @@ -0,0 +1,79 @@ +############################################################# +# +# libglib1.2 +# +############################################################# +LIBGLIB12_SOURCE:=glib-1.2.10.tar.gz +LIBGLIB12_SITE:=ftp://ftp.gtk.org/pub/gtk/v1.2 +LIBGLIB12_CAT:=zcat +LIBGLIB12_DIR:=$(BUILD_DIR)/glib-1.2.10 +LIBGLIB12_BINARY:=libglib.a +LIBGLIB12_PATCH:=$(SOURCE_DIR)/libglib_configure_1.2.10.bz2 + + +$(DL_DIR)/$(LIBGLIB12_SOURCE): + $(WGET) -P $(DL_DIR) $(LIBGLIB12_SITE)/$(LIBGLIB12_SOURCE) + +libglib12-source: $(DL_DIR)/$(LIBGLIB12_SOURCE) + +$(LIBGLIB12_DIR)/.unpacked: $(DL_DIR)/$(LIBGLIB12_SOURCE) + $(LIBGLIB12_CAT) $(DL_DIR)/$(LIBGLIB12_SOURCE) | tar -C $(BUILD_DIR) -xvf - + bzcat $(LIBGLIB12_PATCH) | patch -p1 -d $(LIBGLIB12_DIR) + touch $(LIBGLIB12_DIR)/.unpacked + +$(LIBGLIB12_DIR)/.configured: $(LIBGLIB12_DIR)/.unpacked + (cd $(LIBGLIB12_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + --enable-shared \ + ); + touch $(LIBGLIB12_DIR)/.configured + +$(LIBGLIB12_DIR)/.libs/$(LIBGLIB12_BINARY): $(LIBGLIB12_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(LIBGLIB12_DIR) + +$(STAGING_DIR)/lib/$(LIBGLIB12_BINARY): $(LIBGLIB12_DIR)/.libs/$(LIBGLIB12_BINARY) + $(MAKE) prefix=$(STAGING_DIR) \ + exec_prefix=$(STAGING_DIR) \ + bindir=$(STAGING_DIR)/bin \ + sbindir=$(STAGING_DIR)/sbin \ + libexecdir=$(STAGING_DIR)/libexec \ + datadir=$(STAGING_DIR)/share \ + sysconfdir=$(STAGING_DIR)/etc \ + sharedstatedir=$(STAGING_DIR)/com \ + localstatedir=$(STAGING_DIR)/var \ + libdir=$(STAGING_DIR)/lib \ + includedir=$(STAGING_DIR)/include \ + oldincludedir=$(STAGING_DIR)/include \ + infodir=$(STAGING_DIR)/info \ + mandir=$(STAGING_DIR)/man \ + -C $(LIBGLIB12_DIR) install; + +$(TARGET_DIR)/lib/$(LIBGLIB12_BINARY): $(STAGING_DIR)/lib/$(LIBGLIB12_BINARY) + cp -a $(STAGING_DIR)/lib/$(LIBGLIB12_BINARY) $(TARGET_DIR)/lib/ + cp -a $(STAGING_DIR)/lib/libglib.so $(TARGET_DIR)/lib/ + cp -a $(STAGING_DIR)/lib/libglib-1.2.so.0 $(TARGET_DIR)/lib/ + $(STRIP) --strip-unneeded $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY) + +libglib12: uclibc $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY) + +libglib12-clean: + rm -f $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY) + -$(MAKE) -C $(LIBGLIB12_DIR) clean + +libglib12-dirclean: + rm -rf $(LIBGLIB12_DIR) + diff --git a/package/libmad/libmad.mk b/package/libmad/libmad.mk new file mode 100644 index 000000000..fc077203c --- /dev/null +++ b/package/libmad/libmad.mk @@ -0,0 +1,56 @@ +############################################################# +# +# libmad +# +############################################################# + +LIBMAD_VERSION=0.15.0b + +# Don't alter below this line unless you (think) you know +# what you are doing! Danger, Danger! + +LIBMAD_SOURCE=libmad-$(LIBMAD_VERSION).tar.gz +LIBMAD_SITE=http://easynews.dl.sourceforge.net/sourceforge/mad/ +LIBMAD_DIR=$(BUILD_DIR)/${shell basename $(LIBMAD_SOURCE) .tar.gz} +LIBMAD_WORKDIR=$(BUILD_DIR)/libmad-$(LIBMAD_VERSION) + +$(DL_DIR)/$(LIBMAD_SOURCE): + $(WGET) -P $(DL_DIR) $(LIBMAD_SITE)/$(LIBMAD_SOURCE) + +$(LIBMAD_DIR)/.unpacked: $(DL_DIR)/$(LIBMAD_SOURCE) + gzip -d -c $(DL_DIR)/$(LIBMAD_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(LIBMAD_DIR)/.unpacked + +$(LIBMAD_DIR)/.configured: $(LIBMAD_DIR)/.unpacked + (cd $(LIBMAD_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --sysconfdir=/etc \ + $(DISABLE_NLS) \ + ); + touch $(LIBMAD_DIR)/.configured + +$(LIBMAD_WORKDIR)/libmad: $(LIBMAD_DIR)/.configured + rm -f $@ + $(MAKE) CC=$(TARGET_CC) -C $(LIBMAD_WORKDIR) + +$(LIBMAD_WORKDIR)/.installed: $(LIBMAD_WORKDIR)/libmad + $(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBMAD_WORKDIR) install + touch $(LIBMAD_WORKDIR)/.installed + +libmad: uclibc $(LIBMAD_WORKDIR)/.installed + +libmad-source: $(DL_DIR)/$(LIBMAD_SOURCE) + +libmad-clean: + @if [ -d $(LIBMAD_WORKDIR)/Makefile ] ; then \ + $(MAKE) -C $(LIBMAD_WORKDIR) clean ; \ + fi; + +libmad-dirclean: + rm -rf $(LIBMAD_DIR) $(LIBMAD_WORKDIR) + diff --git a/package/libtool/libtool.mk b/package/libtool/libtool.mk new file mode 100644 index 000000000..fbee18e74 --- /dev/null +++ b/package/libtool/libtool.mk @@ -0,0 +1,77 @@ +############################################################# +# +# libtool +# +############################################################# +LIBTOOL_SOURCE:=libtool-1.5.8.tar.gz +LIBTOOL_SITE:=ftp://ftp.gnu.org/gnu/libtool +LIBTOOL_CAT:=zcat +LIBTOOL_DIR:=$(BUILD_DIR)/libtool-1.5.8 +LIBTOOL_BINARY:=libtool +LIBTOOL_TARGET_BINARY:=usr/bin/libtool + +$(DL_DIR)/$(LIBTOOL_SOURCE): + $(WGET) -P $(DL_DIR) $(LIBTOOL_SITE)/$(LIBTOOL_SOURCE) + +libtool-source: $(DL_DIR)/$(LIBTOOL_SOURCE) + +$(LIBTOOL_DIR)/.unpacked: $(DL_DIR)/$(LIBTOOL_SOURCE) + $(LIBTOOL_CAT) $(DL_DIR)/$(LIBTOOL_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(LIBTOOL_DIR)/.unpacked + +$(LIBTOOL_DIR)/.configured: $(LIBTOOL_DIR)/.unpacked + (cd $(LIBTOOL_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + ); + touch $(LIBTOOL_DIR)/.configured + +$(LIBTOOL_DIR)/$(LIBTOOL_BINARY): $(LIBTOOL_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(LIBTOOL_DIR) + touch -c $(LIBTOOL_DIR)/$(LIBTOOL_BINARY) + +$(TARGET_DIR)/$(LIBTOOL_TARGET_BINARY): $(LIBTOOL_DIR)/$(LIBTOOL_BINARY) + $(MAKE) \ + prefix=$(TARGET_DIR)/usr \ + exec_prefix=$(TARGET_DIR)/usr \ + bindir=$(TARGET_DIR)/usr/bin \ + sbindir=$(TARGET_DIR)/usr/sbin \ + libexecdir=$(TARGET_DIR)/usr/lib \ + datadir=$(TARGET_DIR)/usr/share \ + sysconfdir=$(TARGET_DIR)/etc \ + localstatedir=$(TARGET_DIR)/var \ + libdir=$(TARGET_DIR)/usr/lib \ + infodir=$(TARGET_DIR)/usr/info \ + mandir=$(TARGET_DIR)/usr/man \ + includedir=$(TARGET_DIR)/usr/include \ + -C $(LIBTOOL_DIR) install; + $(STRIP) $(TARGET_DIR)//usr/lib/libltdl.so.*.*.* > /dev/null 2>&1 + $(SED) "s,^CC.*,CC=\"/usr/bin/gcc\"," $(TARGET_DIR)/usr/bin/libtool + $(SED) "s,^LD.*,LD=\"/usr/bin/ld\"," $(TARGET_DIR)/usr/bin/libtool + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +libtool: uclibc $(TARGET_DIR)/$(LIBTOOL_TARGET_BINARY) + +libtool-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(LIBTOOL_DIR) uninstall + -$(MAKE) -C $(LIBTOOL_DIR) clean + +libtool-dirclean: + rm -rf $(LIBTOOL_DIR) + diff --git a/package/links/links.mk b/package/links/links.mk new file mode 100644 index 000000000..28c5a9cc4 --- /dev/null +++ b/package/links/links.mk @@ -0,0 +1,54 @@ +############################################################# +# +# links (text based web browser) +# +############################################################# +LINKS_SITE:=http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/links/download/no-ssl +LINKS_SOURCE:=links-0.99pre9-no-ssl.tar.gz +LINKS_DIR:=$(BUILD_DIR)/links-0.99pre9-no-ssl + +$(DL_DIR)/$(LINKS_SOURCE): + $(WGET) -P $(DL_DIR) $(LINKS_SITE)/$(LINKS_SOURCE) + +links-source: $(DL_DIR)/$(LINKS_SOURCE) + +$(LINKS_DIR)/.unpacked: $(DL_DIR)/$(LINKS_SOURCE) + zcat $(DL_DIR)/$(LINKS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(LINKS_DIR)/.unpacked + +$(LINKS_DIR)/.configured: $(LINKS_DIR)/.unpacked + (cd $(LINKS_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 \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/tmp \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + ); + touch $(LINKS_DIR)/.configured + +$(LINKS_DIR)/links: $(LINKS_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(LINKS_DIR) + $(STRIP) $(LINKS_DIR)/links + +$(TARGET_DIR)/usr/bin/links: $(LINKS_DIR)/links + install -c $(LINKS_DIR)/links $(TARGET_DIR)/usr/bin/links + +links-clean: + $(MAKE) -C $(LINKS_DIR) clean + +links-dirclean: + rm -rf $(LINKS_DIR) + +links: uclibc $(TARGET_DIR)/usr/bin/links + diff --git a/package/linux/linux.mk b/package/linux/linux.mk new file mode 100644 index 000000000..0d3f8f0f7 --- /dev/null +++ b/package/linux/linux.mk @@ -0,0 +1,115 @@ +############################################################# +# +# Linux kernel targets +# +# Note: If you have any patches to apply, create the directory +# sources/kernel-patches and put your patches in there and number +# them in the order you wish to apply them... i.e. +# +# sources/kernel-patches/001-my-special-stuff.bz2 +# sources/kernel-patches/003-gcc-Os.bz2 +# sources/kernel-patches/004_no-warnings.bz2 +# sources/kernel-patches/030-lowlatency-mini.bz2 +# sources/kernel-patches/031-lowlatency-fixes-5.bz2 +# sources/kernel-patches/099-shutup.bz2 +# etc... +# +# these patches will all be applied by the patch-kernel.sh +# script (which will also abort the build if it finds rejects) +# -Erik +# +############################################################# +ifneq ($(filter $(TARGETS),linux),) + +# Version of Linux to download and then apply patches to +DOWNLOAD_LINUX_VERSION=2.4.26 +# Version of Linux AFTER patches +LINUX_VERSION=2.4.26-erik + +LINUX_FORMAT=bzImage +#LINUX_FORMAT=images/zImage.prep +LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ + -e 's/mipsel/mips/' \ + -e 's/powerpc/ppc/' \ + -e 's/sh[234]/sh/' \ + ) +LINUX_BINLOC=arch/$(LINUX_KARCH)/boot/$(LINUX_FORMAT) + +LINUX_DIR=$(BUILD_DIR)/linux-$(LINUX_VERSION) +LINUX_SOURCE=linux-$(DOWNLOAD_LINUX_VERSION).tar.bz2 +LINUX_SITE=http://www.kernel.org/pub/linux/kernel/v2.4 +LINUX_KCONFIG=$(SOURCE_DIR)/linux.config +LINUX_KERNEL=$(BUILD_DIR)/buildroot-kernel +# Used by pcmcia-cs and others +LINUX_SOURCE_DIR=$(LINUX_DIR) + + +$(DL_DIR)/$(LINUX_SOURCE): + -mkdir $(DL_DIR) + $(WGET) -P $(DL_DIR) $(LINUX_SITE)/$(LINUX_SOURCE) + +$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) + -mkdir $(TOOL_BUILD_DIR) + #mkdir -p $(LINUX_DIR) + #rm -rf $(LINUX_DIR) + bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(BUILD_DIR) -xvf - +ifneq ($(DOWNLOAD_LINUX_VERSION),$(LINUX_VERSION)) + # Rename the dir from the downloaded version to the AFTER patch version + mv -f $(BUILD_DIR)/linux-$(DOWNLOAD_LINUX_VERSION) $(BUILD_DIR)/linux-$(LINUX_VERSION) +endif + mkdir -p $(SOURCE_DIR)/kernel-patches + $(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR) $(SOURCE_DIR)/kernel-patches + -(cd $(TOOL_BUILD_DIR); ln -sf $(LINUX_DIR) linux) + touch $(LINUX_DIR)/.unpacked + +$(LINUX_KCONFIG): + @if [ ! -f "$(LINUX_KCONFIG)" ] ; then \ + echo ""; \ + echo "You should create a .config for your kernel"; \ + echo "and install it as $(LINUX_KCONFIG)"; \ + echo ""; \ + sleep 5; \ + fi; + +$(LINUX_DIR)/.configured $(BUILD_DIR)/linux/.configured: $(LINUX_DIR)/.unpacked $(LINUX_KCONFIG) + $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" $(LINUX_DIR)/Makefile + -cp $(LINUX_KCONFIG) $(LINUX_DIR)/.config + $(MAKE) -C $(LINUX_DIR) oldconfig include/linux/version.h + touch $(LINUX_DIR)/.configured + +$(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured + $(MAKE) -C $(LINUX_DIR) dep + touch $(LINUX_DIR)/.depend_done + +$(LINUX_DIR)/$(LINUX_BINLOC): $(LINUX_DIR)/.depend_done + $(MAKE) -C $(LINUX_DIR) $(LINUX_FORMAT) + $(MAKE) -C $(LINUX_DIR) modules + +$(LINUX_KERNEL): $(LINUX_DIR)/$(LINUX_BINLOC) + cp -fa $(LINUX_DIR)/$(LINUX_BINLOC) $(LINUX_KERNEL) + touch -c $(LINUX_KERNEL) + +$(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/modules.dep: $(LINUX_KERNEL) + rm -rf $(TARGET_DIR)/lib/modules + rm -f $(TARGET_DIR)/sbin/cardmgr + $(MAKE) -C $(LINUX_DIR) INSTALL_MOD_PATH=$(TARGET_DIR) modules_install + (cd $(TARGET_DIR)/lib/modules; ln -s $(LINUX_VERSION)/kernel/drivers .) + +$(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured + mkdir -p $(STAGING_DIR)/include + tar -ch -C $(LINUX_DIR)/include -f - linux | tar -xf - -C $(STAGING_DIR)/include/ + tar -ch -C $(LINUX_DIR)/include -f - asm | tar -xf - -C $(STAGING_DIR)/include/ + +linux: $(STAGING_DIR)/include/linux/version.h $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/modules.dep + +linux-source: $(DL_DIR)/$(LINUX_SOURCE) + +# This has been renamed so we do _NOT_ by default run this on 'make clean' +linuxclean: clean + rm -f $(LINUX_KERNEL) + -$(MAKE) -C $(LINUX_DIR) clean + +linux-dirclean: + rm -rf $(LINUX_DIR) + +endif diff --git a/package/lrzsz/lrzsz.mk b/package/lrzsz/lrzsz.mk new file mode 100644 index 000000000..222d64a71 --- /dev/null +++ b/package/lrzsz/lrzsz.mk @@ -0,0 +1,76 @@ +############################################################# +# +# lrzsz (provides zmodem) +# +############################################################# +# Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org> +# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA + +LRZSZ_SITE:=http://www.ohse.de/uwe/releases +LRZSZ_SOURCE:=lrzsz-0.12.20.tar.gz +LRZSZ_DIR:=$(BUILD_DIR)/lrzsz-0.12.20 + +$(DL_DIR)/$(LRZSZ_SOURCE): + $(WGET) -P $(DL_DIR) $(LRZSZ_SITE)/$(LRZSZ_SOURCE) + +lrzsz-source: $(DL_DIR)/$(LRZSZ_SOURCE) + +$(LRZSZ_DIR)/.unpacked: $(DL_DIR)/$(LRZSZ_SOURCE) + zcat $(DL_DIR)/$(LRZSZ_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(LRZSZ_DIR)/.unpacked + +$(LRZSZ_DIR)/.configured: $(LRZSZ_DIR)/.unpacked + (cd $(LRZSZ_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 \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/tmp \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + --disable-timesync \ + ); + $(SED) "s/-lnsl//;" $(LRZSZ_DIR)/src/Makefile + $(SED) "s~\(#define ENABLE_SYSLOG.*\)~/* \1 */~;" $(LRZSZ_DIR)/config.h + touch $(LRZSZ_DIR)/.configured + +$(LRZSZ_DIR)/src/lrz: $(LRZSZ_DIR)/.configured + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" prefix="$(TARGET_DIR)" -C $(LRZSZ_DIR) + $(STRIP) $(LRZSZ_DIR)/src/lrz $(LRZSZ_DIR)/src/lsz + +$(TARGET_DIR)/usr/bin/rz: $(LRZSZ_DIR)/src/lrz + cp $(LRZSZ_DIR)/src/lrz $(TARGET_DIR)/usr/bin/rz + cp $(LRZSZ_DIR)/src/lsz $(TARGET_DIR)/usr/bin/sz + +lrzsz: uclibc $(TARGET_DIR)/usr/bin/rz + +lrzsz-clean: + rm -f $(TARGET_DIR)/usr/bin/rz + -$(MAKE) -C $(LRZSZ_DIR) clean + +lrzsz-dirclean: + rm -rf $(LRZSZ_DIR) diff --git a/package/ltp-testsuite/ltp-testsuite.mk b/package/ltp-testsuite/ltp-testsuite.mk new file mode 100644 index 000000000..43c897c8a --- /dev/null +++ b/package/ltp-testsuite/ltp-testsuite.mk @@ -0,0 +1,39 @@ +############################################################# +# +# ltp-testsuite +# +############################################################# +LTP_TESTSUITE_SOURCE:=ltp-full-20040506.tgz +LTP_TESTSUITE_SITE:=http://aleron.dl.sourceforge.net/sourceforge/ltp +LTP_TESTSUITE_CAT:=zcat +LTP_TESTSUITE_DIR:=$(BUILD_DIR)/ltp-full-20040506 +LTP_TESTSUITE_PATCH:=$(SOURCE_DIR)/ltp-testsuite.patch + + +$(DL_DIR)/$(LTP_TESTSUITE_SOURCE): + $(WGET) -P $(DL_DIR) $(LTP_TESTSUITE_SITE)/$(LTP_TESTSUITE_SOURCE) + +ltp-testsuite-source: $(DL_DIR)/$(LTP_TESTSUITE_SOURCE) + +$(LTP_TESTSUITE_DIR)/.unpacked: $(DL_DIR)/$(LTP_TESTSUITE_SOURCE) + $(LTP_TESTSUITE_CAT) $(DL_DIR)/$(LTP_TESTSUITE_SOURCE) | tar -C $(BUILD_DIR) -xvf - + cat $(LTP_TESTSUITE_PATCH) | patch -p1 -d $(LTP_TESTSUITE_DIR) + touch $(LTP_TESTSUITE_DIR)/.unpacked + +$(LTP_TESTSUITE_DIR)/ltp-testsuite: $(LTP_TESTSUITE_DIR)/.unpacked + $(MAKE) $(TARGET_CONFIGURE_OPTS) CROSS_COMPILER=$(TARGET_CROSS) \ + -C $(LTP_TESTSUITE_DIR) + +$(TARGET_DIR)/usr/bin/ltp-testsuite: $(LTP_TESTSUITE_DIR)/ltp-testsuite + $(MAKE) $(TARGET_CONFIGURE_OPTS) CROSS_COMPILER=$(TARGET_CROSS) \ + -C $(LTP_TESTSUITE_DIR) install + +ltp-testsuite: uclibc $(TARGET_DIR)/usr/bin/ltp-testsuite + +ltp-testsuite-clean: + $(MAKE) -C $(LTP_TESTSUITE_DIR) clean + +ltp-testsuite-dirclean: + rm -rf $(LTP_TESTSUITE_DIR) + + diff --git a/package/ltrace/ltrace.mk b/package/ltrace/ltrace.mk new file mode 100644 index 000000000..ab32fc7f4 --- /dev/null +++ b/package/ltrace/ltrace.mk @@ -0,0 +1,55 @@ +############################################################# +# +# ltrace +# +############################################################# +LTRACE_SOURCE=ltrace_0.3.35.tar.gz +LTRACE_SITE=http://ftp.debian.org/debian/pool/main/l/ltrace +LTRACE_DIR=$(BUILD_DIR)/ltrace-0.3.35 +LTRACE_BINARY=ltrace +LTRACE_TARGET_BINARY=usr/bin/ltrace + +LTRACE_ARCH:=$(ARCH) +ifeq ("$(strip $(ARCH))","armeb") +LTRACE_ARCH:=arm +endif + +$(DL_DIR)/$(LTRACE_SOURCE): + $(WGET) -P $(DL_DIR) $(LTRACE_SITE)/$(LTRACE_SOURCE) + +$(LTRACE_DIR)/.source: $(DL_DIR)/$(LTRACE_SOURCE) + zcat $(DL_DIR)/$(LTRACE_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(LTRACE_DIR)/.source + +$(LTRACE_DIR)/.configured: $(LTRACE_DIR)/.source + (cd $(LTRACE_DIR); \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --sysconfdir=/etc \ + ); + touch $(LTRACE_DIR)/.configured; + +$(LTRACE_DIR)/$(LTRACE_BINARY): $(LTRACE_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(LTRACE_ARCH) \ + -C $(LTRACE_DIR) + +$(TARGET_DIR)/$(LTRACE_TARGET_BINARY): $(LTRACE_DIR)/$(LTRACE_BINARY) + $(MAKE) DESTDIR=$(TARGET_DIR) ARCH=$(LTRACE_ARCH) \ + -C $(LTRACE_DIR) install + rm -Rf $(TARGET_DIR)/usr/man + +ltrace: uclibc $(TARGET_DIR)/$(LTRACE_TARGET_BINARY) + +ltrace-source: $(DL_DIR)/$(LTRACE_SOURCE) + +ltrace-clean: + $(MAKE) prefix=$(TARGET_DIR)/usr -C $(LTRACE_DIR) uninstall + -$(MAKE) -C $(LTRACE_DIR) clean + +ltrace-dirclean: + rm -rf $(LTRACE_DIR) + diff --git a/package/lzo/lzo.mk b/package/lzo/lzo.mk new file mode 100644 index 000000000..48e9d7b5d --- /dev/null +++ b/package/lzo/lzo.mk @@ -0,0 +1,65 @@ +############################################################# +# +# lzo +# +# Note: this builds only a static library, it does not provide +# anything to be installed into the target system. +# +############################################################# +LZO_SOURCE:=lzo_1.08.orig.tar.gz +LZO_SITE:=http://ftp.debian.org/debian/pool/main/l/lzo +#LZO_SOURCE:=lzo-1.08.tar.bz2 +#LZO_SITE:=http://www.oberhumer.com/opensource/lzo/download +LZO_DIR:=$(BUILD_DIR)/lzo-1.08 +LZO_CAT:=zcat +LZO_PATCH:=$(SOURCE_DIR)/lzo-cross-compile.patch + +$(DL_DIR)/$(LZO_SOURCE): + $(WGET) -P $(DL_DIR) $(LZO_SITE)/$(LZO_SOURCE) + +lzo-source: $(DL_DIR)/$(LZO_SOURCE) + +$(LZO_DIR)/.unpacked: $(DL_DIR)/$(LZO_SOURCE) + $(LZO_CAT) $(DL_DIR)/$(LZO_SOURCE) | tar -C $(BUILD_DIR) -xvf - + cat $(LZO_PATCH) | patch -p1 -d $(LZO_DIR) + touch $(LZO_DIR)/.unpacked + +LZO_CONFIG_SHARED:=--disable-shared +#LZO_CONFIG_SHARED:=--enable-shared + +$(LZO_DIR)/.configured: $(LZO_DIR)/.unpacked + (cd $(LZO_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 \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(LZO_CONFIG_SHARED) \ + ); + touch $(LZO_DIR)/.configured + +$(LZO_DIR)/src/liblzo.la: $(LZO_DIR)/.configured + $(MAKE) -C $(LZO_DIR) + +$(STAGING_DIR)/lib/liblzo.a: $(LZO_DIR)/src/liblzo.la + $(MAKE) CC=$(TARGET_CC) DESTDIR=$(STAGING_DIR) -C $(LZO_DIR) install + +lzo: uclibc $(STAGING_DIR)/lib/liblzo.a + +lzo-clean: + $(MAKE) DESTDIR=$(STAGING_DIR) -C $(LZO_DIR) uninstall + -$(MAKE) -C $(LZO_DIR) clean + +lzo-dirclean: + rm -rf $(LZO_DIR) + diff --git a/package/m4/m4.mk b/package/m4/m4.mk new file mode 100644 index 000000000..5a0988972 --- /dev/null +++ b/package/m4/m4.mk @@ -0,0 +1,65 @@ +############################################################# +# +# m4 +# +############################################################# +M4_SOURCE:=m4-1.4.tar.gz +M4_SITE:=ftp://ftp.gnu.org/gnu/m4 +M4_CAT:=zcat +M4_DIR:=$(BUILD_DIR)/m4-1.4 +M4_BINARY:=m4 +M4_TARGET_BINARY:=usr/bin/m4 + +$(DL_DIR)/$(M4_SOURCE): + $(WGET) -P $(DL_DIR) $(M4_SITE)/$(M4_SOURCE) + +m4-source: $(DL_DIR)/$(M4_SOURCE) + +$(M4_DIR)/.unpacked: $(DL_DIR)/$(M4_SOURCE) + $(M4_CAT) $(DL_DIR)/$(M4_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(M4_DIR)/.unpacked + +$(M4_DIR)/.configured: $(M4_DIR)/.unpacked + (cd $(M4_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + ); + touch $(M4_DIR)/.configured + +$(M4_DIR)/src/$(M4_BINARY): $(M4_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(M4_DIR) + +$(TARGET_DIR)/$(M4_TARGET_BINARY): $(M4_DIR)/src/$(M4_BINARY) + $(MAKE) \ + prefix=$(TARGET_DIR)/usr \ + exec_prefix=$(TARGET_DIR)/usr \ + bindir=$(TARGET_DIR)/usr/bin \ + sbindir=$(TARGET_DIR)/usr/sbin \ + libexecdir=$(TARGET_DIR)/usr/lib \ + datadir=$(TARGET_DIR)/usr/share \ + sysconfdir=$(TARGET_DIR)/etc \ + localstatedir=$(TARGET_DIR)/var \ + libdir=$(TARGET_DIR)/usr/lib \ + infodir=$(TARGET_DIR)/usr/info \ + mandir=$(TARGET_DIR)/usr/man \ + includedir=$(TARGET_DIR)/usr/include \ + -C $(M4_DIR) install; + $(STRIP) $(TARGET_DIR)/$(M4_TARGET_BINARY) > /dev/null 2>&1 + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +m4: uclibc $(TARGET_DIR)/$(M4_TARGET_BINARY) + +m4-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(M4_DIR) uninstall + -$(MAKE) -C $(M4_DIR) clean + +m4-dirclean: + rm -rf $(M4_DIR) + diff --git a/package/make/make.mk b/package/make/make.mk new file mode 100644 index 000000000..ec508fed3 --- /dev/null +++ b/package/make/make.mk @@ -0,0 +1,61 @@ +############################################################# +# +# make +# +############################################################# +GNUMAKE_SOURCE:=make-3.80.tar.bz2 +GNUMAKE_SITE:=ftp://ftp.gnu.org/gnu/make +GNUMAKE_DIR:=$(BUILD_DIR)/make-3.80 +GNUMAKE_CAT:=bzcat +GNUMAKE_BINARY:=make +GNUMAKE_TARGET_BINARY:=usr/bin/make + +$(DL_DIR)/$(GNUMAKE_SOURCE): + $(WGET) -P $(DL_DIR) $(GNUMAKE_SITE)/$(GNUMAKE_SOURCE) + +make-source: $(DL_DIR)/$(GNUMAKE_SOURCE) + +$(GNUMAKE_DIR)/.unpacked: $(DL_DIR)/$(GNUMAKE_SOURCE) + $(GNUMAKE_CAT) $(DL_DIR)/$(GNUMAKE_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(GNUMAKE_DIR)/.unpacked + +$(GNUMAKE_DIR)/.configured: $(GNUMAKE_DIR)/.unpacked + (cd $(GNUMAKE_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + ); + touch $(GNUMAKE_DIR)/.configured + +$(GNUMAKE_DIR)/$(GNUMAKE_BINARY): $(GNUMAKE_DIR)/.configured + $(MAKE) -C $(GNUMAKE_DIR) + +$(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY): $(GNUMAKE_DIR)/$(GNUMAKE_BINARY) + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUMAKE_DIR) install + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +make: uclibc $(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY) + +make-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUMAKE_DIR) uninstall + -$(MAKE) -C $(GNUMAKE_DIR) clean + +make-dirclean: + rm -rf $(GNUMAKE_DIR) + diff --git a/package/microcom/microcom.mk b/package/microcom/microcom.mk new file mode 100644 index 000000000..bf01cf3d7 --- /dev/null +++ b/package/microcom/microcom.mk @@ -0,0 +1,59 @@ +############################################################# +# +# microcom terminal emulator +# +# Maintainer: Tim Riker <Tim@Rikers.org> +# +############################################################# +# Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org> +# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA + +# TARGETS +# http://microcom.port5.com/m102.tar.gz +MICROCOM_SITE:=http://microcom.port5.com/ +MICROCOM_SOURCE:=m102.tar.gz +MICROCOM_DIR:=$(BUILD_DIR)/microcom-1.02 + +$(DL_DIR)/$(MICROCOM_SOURCE): + $(WGET) -P $(DL_DIR) $(MICROCOM_SITE)/$(MICROCOM_SOURCE) + +microcom-source: $(DL_DIR)/$(MICROCOM_SOURCE) + +$(MICROCOM_DIR)/.unpacked: $(DL_DIR)/$(MICROCOM_SOURCE) + mkdir -p $(MICROCOM_DIR) + zcat $(DL_DIR)/$(MICROCOM_SOURCE) | tar -C $(MICROCOM_DIR) -xvf - + touch $(MICROCOM_DIR)/.unpacked + +$(MICROCOM_DIR)/.configured: $(MICROCOM_DIR)/.unpacked + $(SED) 's~gcc~${TARGET_CC}~' $(MICROCOM_DIR)/Makefile + touch $(MICROCOM_DIR)/.configured + +$(MICROCOM_DIR)/microcom: $(MICROCOM_DIR)/.configured + $(MAKE) -C $(MICROCOM_DIR) + +$(TARGET_DIR)/usr/bin/microcom: $(MICROCOM_DIR)/microcom + install -c $(MICROCOM_DIR)/microcom $(TARGET_DIR)/usr/bin/microcom + +microcom-clean: + rm $(MICROCOM_DIR)/*.o + +microcom-dirclean: + rm -rf $(MICROCOM_DIR) + +microcom: uclibc $(TARGET_DIR)/usr/bin/microcom + diff --git a/package/microwin/microwin.mk b/package/microwin/microwin.mk new file mode 100644 index 000000000..e59600f39 --- /dev/null +++ b/package/microwin/microwin.mk @@ -0,0 +1,46 @@ +############################################################# +# +# Microwindows - 2003/11/17 Greg Haerr +# (requires CVS 2003/11/17 or later) +# +############################################################# +MICROWIN_SITE:=ftp://ftp.microwindows.org/pub/microwindows +MICROWIN_SOURCE:=microwindows-src-snapshot.tar.gz +MICROWIN_DIR:=$(BUILD_DIR)/microwin +#MICROWIN_SOURCE:=microwindows-0.91.tar.gz +#MICROWIN_DIR:=$(BUILD_DIR)/microwindows-0.91 + +MICROWIN_CAT:=zcat +MICROWIN_BINARY:=$(MICROWIN_DIR)/src/bin/nano-X +MICROWIN_TARGET_BINARY:=$(TARGET_DIR)/usr/bin/nano-X + +MICROWIN_CONFIG:=$(MICROWIN_DIR)/src/Configs/config.uclibc + +$(DL_DIR)/$(MICROWIN_SOURCE): + $(WGET) -P $(DL_DIR) $(MICROWIN_SITE)/$(MICROWIN_SOURCE) + +microwin-source: $(DL_DIR)/$(MICROWIN_SOURCE) + +$(MICROWIN_DIR)/.unpacked: $(DL_DIR)/$(MICROWIN_SOURCE) + $(MICROWIN_CAT) $(DL_DIR)/$(MICROWIN_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(MICROWIN_DIR)/.unpacked + +$(MICROWIN_DIR)/.configured: $(MICROWIN_DIR)/.unpacked + (cd $(MICROWIN_DIR); \ + ); + touch $(MICROWIN_DIR)/.configured + +$(MICROWIN_BINARY): $(MICROWIN_DIR)/.configured + $(MAKE) ARCH=LINUX-$(shell echo $(ARCH) | tr a-z A-Z) $(shell echo $(ARCH) | tr a-z A-Z)TOOLSPREFIX=$(TARGET_CROSS) CC=$(TARGET_CC) -C $(MICROWIN_DIR)/src CONFIG=$(MICROWIN_CONFIG) + +$(MICROWIN_TARGET_BINARY): $(MICROWIN_BINARY) + $(MAKE) INSTALL_PREFIX=$(TARGET_DIR)/usr INSTALL_OWNER1= INSTALL_OWNER2= CC=$(TARGET_CC) -C $(MICROWIN_DIR)/src CONFIG=$(MICROWIN_CONFIG) install + +microwin: uclibc $(MICROWIN_TARGET_BINARY) + +microwin-clean: + -$(MAKE) -C $(MICROWIN_DIR)/src clean + +microwin-dirclean: + rm -rf $(MICROWIN_DIR) + diff --git a/package/mkdosfs/mkdosfs.mk b/package/mkdosfs/mkdosfs.mk new file mode 100644 index 000000000..71d768bae --- /dev/null +++ b/package/mkdosfs/mkdosfs.mk @@ -0,0 +1,44 @@ +############################################################# +# +# mkdosfs +# +############################################################# +MKDOSFS_SOURCE=dosfstools-2.8.src.tar.gz +MKDOSFS_SITE=http://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools +MKDOSFS_DIR=$(BUILD_DIR)/dosfstools-2.8 +MKDOSFS_CAT:=zcat +MKDOSFS_BINARY:=mkdosfs/mkdosfs +MKDOSFS_TARGET_BINARY:=sbin/mkdosfs +ifeq ($(BR2_LARGEFILE),y) +MKDOSFS_CFLAGS="-Os -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" +else +MKDOSFS_CFLAGS="-Os -g" +endif + +$(DL_DIR)/$(MKDOSFS_SOURCE): + $(WGET) -P $(DL_DIR) $(MKDOSFS_SITE)/$(MKDOSFS_SOURCE) + +mkdosfs-source: $(DL_DIR)/$(MKDOSFS_SOURCE) + +$(MKDOSFS_DIR)/.unpacked: $(DL_DIR)/$(MKDOSFS_SOURCE) + $(MKDOSFS_CAT) $(DL_DIR)/$(MKDOSFS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(MKDOSFS_DIR)/.unpacked + +$(MKDOSFS_DIR)/$(MKDOSFS_BINARY): $(MKDOSFS_DIR)/.unpacked + $(MAKE) CFLAGS=$(MKDOSFS_CFLAGS) CC=$(TARGET_CC) -C $(MKDOSFS_DIR); + $(STRIP) $(MKDOSFS_DIR)/mkdosfs/mkdosfs; + touch -c $(MKDOSFS_DIR)/mkdosfs/mkdosfs + +$(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY): $(MKDOSFS_DIR)/$(MKDOSFS_BINARY) + cp -a $(MKDOSFS_DIR)/$(MKDOSFS_BINARY) $(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY) + touch -c $(TARGET_DIR)/sbin/mkdosfs + +mkdosfs: uclibc $(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY) + +mkdosfs-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(MKDOSFS_DIR) uninstall + -$(MAKE) -C $(MKDOSFS_DIR) clean + +mkdosfs-dirclean: + rm -rf $(MKDOSFS_DIR) + diff --git a/package/mke2fs/mke2fs.mk b/package/mke2fs/mke2fs.mk new file mode 100644 index 000000000..6168cfaed --- /dev/null +++ b/package/mke2fs/mke2fs.mk @@ -0,0 +1,71 @@ +############################################################# +# +# mke2fs +# +############################################################# +MKE2FS_SOURCE=e2fsprogs-1.27.tar.gz +MKE2FS_SITE=http://aleron.dl.sourceforge.net/sourceforge/e2fsprogs +MKE2FS_DIR=$(BUILD_DIR)/e2fsprogs-1.27 +MKE2FS_CAT:=zcat +MKE2FS_BINARY:=misc/mke2fs +MKE2FS_TARGET_BINARY:=sbin/mke2fs + +$(DL_DIR)/$(MKE2FS_SOURCE): + $(WGET) -P $(DL_DIR) $(MKE2FS_SITE)/$(MKE2FS_SOURCE) + +mke2fs-source: $(DL_DIR)/$(MKE2FS_SOURCE) + +$(MKE2FS_DIR)/.unpacked: $(DL_DIR)/$(MKE2FS_SOURCE) + $(MKE2FS_CAT) $(DL_DIR)/$(MKE2FS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(MKE2FS_DIR)/.unpacked + +$(MKE2FS_DIR)/.configured: $(MKE2FS_DIR)/.unpacked + (cd $(MKE2FS_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --with-cc=$(TARGET_CC) \ + --with-linker=$(TARGET_CROSS)ld \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --disable-elf-shlibs --disable-swapfs \ + --disable-debugfs --disable-imager \ + --disable-resizer --disable-fsck \ + --without-catgets $(DISABLE_NLS) \ + ); + touch $(MKE2FS_DIR)/.configured + +$(MKE2FS_DIR)/$(MKE2FS_BINARY): $(MKE2FS_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(MKE2FS_DIR) + $(STRIP) $(MKE2FS_DIR)/misc/mke2fs $(MKE2FS_DIR)/misc/badblocks; + touch -c $(MKE2FS_DIR)/misc/mke2fs + +$(TARGET_DIR)/$(MKE2FS_TARGET_BINARY): $(MKE2FS_DIR)/$(MKE2FS_BINARY) + #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(MKE2FS_DIR) install + #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + # Only install a few selected items... + cp -dpf $(MKE2FS_DIR)/misc/mke2fs $(TARGET_DIR)/sbin/mke2fs; + cp -dpf $(MKE2FS_DIR)/misc/badblocks $(TARGET_DIR)/sbin/badblocks; + touch -c $(TARGET_DIR)/sbin/mke2fs + +mke2fs: uclibc $(TARGET_DIR)/$(MKE2FS_TARGET_BINARY) + +mke2fs-clean: + #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(MKE2FS_DIR) uninstall + rm -f $(TARGET_DIR)/sbin/mke2fs $(TARGET_DIR)/sbin/badblocks; + -$(MAKE) -C $(MKE2FS_DIR) clean + +mke2fs-dirclean: + rm -rf $(MKE2FS_DIR) + diff --git a/package/mpg123/mpg123.mk b/package/mpg123/mpg123.mk new file mode 100644 index 000000000..796db7f79 --- /dev/null +++ b/package/mpg123/mpg123.mk @@ -0,0 +1,45 @@ +############################################################# +# +# mpg123 +# +############################################################# + +MPG123_VERSION=0.59r + +# Don't alter below this line unless you (think) you know +# what you are doing! Danger, Danger! + +MPG123_SOURCE=mpg123-$(MPG123_VERSION).tar.gz +MPG123_SITE=http://www.mpg123.de/mpg123 +MPG123_DIR=$(BUILD_DIR)/${shell basename $(MPG123_SOURCE) .tar.gz} +MPG123_WORKDIR=$(BUILD_DIR)/mpg123-$(MPG123_VERSION) + +$(DL_DIR)/$(MPG123_SOURCE): + $(WGET) -P $(DL_DIR) $(MPG123_SITE)/$(MPG123_SOURCE) + +$(MPG123_DIR)/.unpacked: $(DL_DIR)/$(MPG123_SOURCE) + gzip -d -c $(DL_DIR)/$(MPG123_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(MPG123_DIR)/.unpacked + +$(MPG123_WORKDIR)/mpg123: $(MPG123_DIR)/.unpacked + rm -f $@ + $(MAKE) CC=$(TARGET_CC) -C $(MPG123_WORKDIR) linux + +$(MPG123_WORKDIR)/.installed: $(MPG123_WORKDIR)/mpg123 + mkdir -p $(TARGET_DIR)/usr/bin + cp -f $(MPG123_WORKDIR)/mpg123 $(TARGET_DIR)/usr/bin + $(STRIP) --strip-all $(TARGET_DIR)/usr/bin/mpg123 + touch $(MPG123_WORKDIR)/.installed + +mpg123: uclibc libmad $(MPG123_WORKDIR)/.installed + +mpg123-source: $(DL_DIR)/$(MPG123_SOURCE) + +mpg123-clean: + @if [ -d $(MPG123_WORKDIR)/Makefile ] ; then \ + $(MAKE) -C $(MPG123_WORKDIR) clean ; \ + fi; + +mpg123-dirclean: + rm -rf $(MPG123_DIR) $(MPG123_WORKDIR) + diff --git a/package/mrouted/mrouted.mk b/package/mrouted/mrouted.mk new file mode 100644 index 000000000..c017d910b --- /dev/null +++ b/package/mrouted/mrouted.mk @@ -0,0 +1,45 @@ +############################################################# +# +# mrouted +# +# +############################################################# +MROUTED_SOURCE:=mrouted_3.9-beta3.orig.tar.gz +MROUTED_SITE:=http://ftp.debian.org/debian/pool/non-free/m/mrouted +MROUTED_DIR:=$(BUILD_DIR)/mrouted-3.9-beta3.orig +MROUTED_CAT:=zcat +#MROUTED_PATCH:=$(SOURCE_DIR)/mrouted_3.9-beta3-1.1.diff +MROUTED_PATCH:=mrouted_3.9-beta3-1.1.diff.gz +MROUTED_BINARY:=mrouted +MROUTED_TARGET_BINARY:=usr/sbin/mrouted + +$(DL_DIR)/$(MROUTED_SOURCE): + $(WGET) -P $(DL_DIR) $(MROUTED_SITE)/$(MROUTED_SOURCE) + +$(DL_DIR)/$(MROUTED_PATCH): + $(WGET) -P $(DL_DIR) $(MROUTED_SITE)/$(MROUTED_PATCH) + +mrouted-source: $(DL_DIR)/$(MROUTED_SOURCE) $(DL_DIR)/$(MROUTED_PATCH) + +$(MROUTED_DIR)/.unpacked: mrouted-source + $(MROUTED_CAT) $(DL_DIR)/$(MROUTED_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(MROUTED_CAT) $(DL_DIR)/$(MROUTED_PATCH) | patch -p1 -d $(MROUTED_DIR) + $(SOURCE_DIR)/patch-kernel.sh $(MROUTED_DIR) $(SOURCE_DIR) mrouted-\*.patch + touch $(MROUTED_DIR)/.unpacked + +$(MROUTED_DIR)/$(MROUTED_BINARY): $(MROUTED_DIR)/.unpacked + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) CC=$(TARGET_CC) -C $(MROUTED_DIR) + +$(TARGET_DIR)/$(MROUTED_TARGET_BINARY): $(MROUTED_DIR)/$(MROUTED_BINARY) + cp -a $(MROUTED_DIR)/$(MROUTED_BINARY) $(TARGET_DIR)/$(MROUTED_TARGET_BINARY) + +mrouted: uclibc $(TARGET_DIR)/$(MROUTED_TARGET_BINARY) + +mrouted-clean: + rm -f $(TARGET_DIR)/$(MROUTED_TARGET_BINARY) + -$(MAKE) -C $(MROUTED_DIR) clean + +mrouted-dirclean: + rm -rf $(MROUTED_DIR) + diff --git a/package/nano/nano.mk b/package/nano/nano.mk new file mode 100644 index 000000000..b6565d309 --- /dev/null +++ b/package/nano/nano.mk @@ -0,0 +1,48 @@ +############################################################# +# +# nano +# +############################################################# +NANO_VER:=1.3.4 +NANO_SOURCE:=nano-$(NANO_VER).tar.gz +NANO_SITE:=http://www.nano-editor.org/dist/v1.3/$(NANO_SOURCE) +NANO_DIR:=$(BUILD_DIR)/nano-$(NANO_VER) +NANO_CAT:=zcat +NANO_BINARY:=src/nano +NANO_TARGET_BINARY:=bin/nano + +$(DL_DIR)/$(NANO_SOURCE): + $(WGET) -P $(DL_DIR) $(NANO_SITE)/$(NANO_SOURCE) + +$(NANO_DIR)/.unpacked: $(DL_DIR)/$(NANO_SOURCE) + $(NANO_CAT) $(DL_DIR)/$(NANO_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(NANO_DIR)/.unpacked + +$(NANO_DIR)/.configured: $(NANO_DIR)/.unpacked + (cd $(NANO_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) CC_FOR_BUILD=$(HOSTCC) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ac_cv_header_regex_h=no \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/ \ + --enable-tiny \ + ); + touch $(NANO_DIR)/.configured + +$(NANO_DIR)/$(NANO_BINARY): $(NANO_DIR)/.configured + $(TARGET_CONFIGURE_OPTS) $(MAKE) CC=$(TARGET_CC) -C $(NANO_DIR) + +$(TARGET_DIR)/$(NANO_TARGET_BINARY): $(NANO_DIR)/$(NANO_BINARY) + install -D $(NANO_DIR)/$(NANO_BINARY) $(TARGET_DIR)/$(NANO_TARGET_BINARY) + +nano: uclibc $(TARGET_DIR)/$(NANO_TARGET_BINARY) + +nano-clean: + rm -f $(TARGET_DIR)/$(NANO_TARGET_BINARY) + -$(MAKE) -C $(NANO_DIR) clean + +nano-dirclean: + rm -rf $(NANO_DIR) diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk new file mode 100644 index 000000000..e2b464ae2 --- /dev/null +++ b/package/ncurses/ncurses.mk @@ -0,0 +1,134 @@ +############################################################# +# +# ncurses +# this installs only a few vital termcap entries +# +############################################################# +# Copyright (C) 2002 by Ken Restivo <ken@246gt.com> +# $Id: ncurses.mk,v 1.1 2004/10/09 01:24:04 andersen Exp $ +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA + +# TARGETS +NCURSES_SITE:=ftp://ftp.gnu.org/pub/gnu/ncurses +NCURSES_DIR:=$(BUILD_DIR)/ncurses-5.2 +NCURSES_SOURCE:=ncurses-5.2.tar.gz + +$(DL_DIR)/$(NCURSES_SOURCE): + $(WGET) -P $(DL_DIR) $(NCURSES_SITE)/$(NCURSES_SOURCE) + +$(NCURSES_DIR)/.dist: $(DL_DIR)/$(NCURSES_SOURCE) + gunzip -c $(DL_DIR)/$(NCURSES_SOURCE) | tar -C $(BUILD_DIR) -xvf - + #use the local tic and not whatever the build system was going to find. + $(SED) 's~\$$srcdir/shlib tic\$$suffix~/usr/bin/tic~' \ + $(NCURSES_DIR)/misc/run_tic.in + $(SOURCE_DIR)/patch-kernel.sh $(NCURSES_DIR) $(SOURCE_DIR) ncurses-\*.patch + touch $(NCURSES_DIR)/.dist + +$(NCURSES_DIR)/.configured: $(NCURSES_DIR)/.dist + (cd $(NCURSES_DIR); rm -rf config.cache; \ + BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --with-terminfo-dirs=/usr/share/terminfo \ + --with-default-terminfo-dir=/usr/share/terminfo \ + --libdir=$(STAGING_DIR)/lib \ + --with-shared --without-cxx --without-cxx-binding \ + --without-ada --without-progs $(DISABLE_NLS) \ + --without-profile --without-debug --disable-rpath \ + --enable-echo --enable-const --enable-overwrite \ + ); + touch $(NCURSES_DIR)/.configured + +$(NCURSES_DIR)/lib/libncurses.so.5.2: $(NCURSES_DIR)/.configured + $(MAKE) BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \ + BUILD_CCFLAGS="-I$(NCURSES_DIR) -I$(NCURSES_DIR)/include" \ + BUILD_LDFLAGS="" DESTDIR=$(STAGING_DIR) -C $(NCURSES_DIR) \ + libs panel menu form headers + +$(STAGING_DIR)/lib/libncurses.a: $(NCURSES_DIR)/lib/libncurses.so.5.2 + BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) CC=$(TARGET_CC) \ + $(MAKE) \ + prefix=$(STAGING_DIR) \ + exec_prefix=$(STAGING_DIR) \ + bindir=$(STAGING_DIR)/bin \ + sbindir=$(STAGING_DIR)/sbin \ + libexecdir=$(STAGING_DIR)/lib \ + datadir=$(STAGING_DIR)/usr/share \ + sysconfdir=$(STAGING_DIR)/etc \ + localstatedir=$(STAGING_DIR)/var \ + libdir=$(STAGING_DIR)/lib \ + infodir=$(STAGING_DIR)/info \ + mandir=$(STAGING_DIR)/man \ + includedir=$(STAGING_DIR)/include \ + gxx_include_dir=$(STAGING_DIR)/include/c++ \ + ticdir=$(STAGING_DIR)/usr/share/terminfo \ + -C $(NCURSES_DIR) install; + chmod a-x $(NCURSES_DIR)/lib/libncurses.so* + touch -c $(STAGING_DIR)/lib/libncurses.a + +$(TARGET_DIR)/lib/libncurses.so.5.2: $(STAGING_DIR)/lib/libncurses.a + cp -dpf $(NCURSES_DIR)/lib/libncurses.so* $(TARGET_DIR)/lib/ + -cp -dpf $(STAGING_DIR)/usr/lib/terminfo $(TARGET_DIR)/usr/lib/ + mkdir -p $(TARGET_DIR)/usr/share/terminfo + for i in x/xterm x/xterm-color x/xterm-xfree86 v/vt100 v/vt200 a/ansi l/linux; do \ + cp -dpf $(STAGING_DIR)/usr/share/terminfo/$${i} $(TARGET_DIR)/usr/share/terminfo/; \ + done + +$(TARGET_DIR)/usr/lib/libncurses.a: $(STAGING_DIR)/lib/libncurses.a + cp -dpf $(NCURSES_DIR)/include/curses.h $(TARGET_DIR)/usr/include/ncurses.h + cp -dpf $(NCURSES_DIR)/include/term.h $(TARGET_DIR)/usr/include/ + cp -dpf $(NCURSES_DIR)/include/unctrl.h $(TARGET_DIR)/usr/include/ + cp -dpf $(NCURSES_DIR)/include/termcap.h $(TARGET_DIR)/usr/include/ + cp -dpf $(NCURSES_DIR)/lib/libncurses.a $(TARGET_DIR)/usr/lib/ + rm -f $(TARGET_DIR)/usr/lib/terminfo + (cd $(TARGET_DIR)/usr/lib; ln -fs /usr/share/terminfo) + (cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.a libcurses.a) + (cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.a libtermcap.a) + (cd $(TARGET_DIR)/usr/include; ln -fs ncurses.h curses.h) + rm -f $(TARGET_DIR)/lib/libncurses.so + (cd $(TARGET_DIR)/usr/lib; ln -fs ../../lib/libncurses.so.5.2 libncurses.so) + -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libncurses.so.5.2 + touch -c $(TARGET_DIR)/usr/lib/libncurses.a + +ncurses-headers: $(TARGET_DIR)/usr/lib/libncurses.a + +ncurses-source: $(DL_DIR)/$(NCURSES_SOURCE) + +ncurses-clean: + rm -f $(STAGING_DIR)/lib/libncurses.so* $(TARGET_DIR)/lib/libncurses.so* + rm -f $(STAGING_DIR)/usr/share/tabset $(TARGET_DIR)/usr/share/tabset + rm -rf $(STAGING_DIR)/usr/share/terminfo $(TARGET_DIR)/usr/share/terminfo + -$(MAKE) -C $(NCURSES_DIR) clean + +ncurses-dirclean: + rm -rf $(NCURSES_DIR) + +ncurses: $(TARGET_DIR)/lib/libncurses.so.5.2 + diff --git a/package/netkitbase/netkitbase.mk b/package/netkitbase/netkitbase.mk new file mode 100644 index 000000000..cb2a023e0 --- /dev/null +++ b/package/netkitbase/netkitbase.mk @@ -0,0 +1,57 @@ +############################################################# +# +# netkitbase +# +############################################################# +NETKITBASE_SOURCE:=netkit-base-0.17.tar.gz +NETKITBASE_SITE:=ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ +NETKITBASE_DIR:=$(BUILD_DIR)/netkit-base-0.17 +NETKITBASE_CAT:=zcat +NETKITBASE_BINARY:=inetd/inetd +NETKITBASE_TARGET_BINARY:=usr/sbin/inetd + +$(DL_DIR)/$(NETKITBASE_SOURCE): + $(WGET) -P $(DL_DIR) $(NETKITBASE_SITE)/$(NETKITBASE_SOURCE) + +netkitbase-source: $(DL_DIR)/$(NETKITBASE_SOURCE) + +$(NETKITBASE_DIR)/.unpacked: $(DL_DIR)/$(NETKITBASE_SOURCE) + $(NETKITBASE_CAT) $(DL_DIR)/$(NETKITBASE_SOURCE) | tar -C $(BUILD_DIR) -xvf - + # use ANSI syntax + $(SED) "s/main()/main(void)/;" $(NETKITBASE_DIR)/configure + # don't try to run cross compiled binaries while configuring things + $(SED) "s~./__conftest~#./__conftest~;" $(NETKITBASE_DIR)/configure + touch $(NETKITBASE_DIR)/.unpacked + +$(NETKITBASE_DIR)/.configured: $(NETKITBASE_DIR)/.unpacked + (cd $(NETKITBASE_DIR); PATH=$(TARGET_PATH) CC=$(TARGET_CC) \ + ./configure --installroot=$(TARGET_DIR) --with-c-compiler=$(TARGET_CC) \ + ) + touch $(NETKITBASE_DIR)/.configured + +$(NETKITBASE_DIR)/$(NETKITBASE_BINARY): $(NETKITBASE_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(NETKITBASE_DIR) + $(STRIP) $(NETKITBASE_DIR)/$(NETKITBASE_BINARY) + +$(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY): $(NETKITBASE_DIR)/$(NETKITBASE_BINARY) + # Only install a few selected items... + mkdir -p $(TARGET_DIR)/usr/sbin + cp $(NETKITBASE_DIR)/$(NETKITBASE_BINARY) $(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY) + mkdir -p $(TARGET_DIR)/etc + cp $(NETKITBASE_DIR)/etc.sample/inetd.conf $(TARGET_DIR)/etc/ + $(SED) "s/^\([a-z]\)/#\1/;" $(TARGET_DIR)/etc/inetd.conf + #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETKITBASE_DIR) install + #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +netkitbase: uclibc $(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY) + +netkitbase-clean: + #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETKITBASE_DIR) uninstall + -rm -f $(TARGET_DIR)/usr/sbin/inetd $(TARGET_DIR)/etc/inetd.conf + -rm -f $(TARGET_DIR)/etc/inetd.conf + -$(MAKE) -C $(NETKITBASE_DIR) clean + +netkitbase-dirclean: + rm -rf $(NETKITBASE_DIR) + diff --git a/package/netkittelnet/netkittelnet.mk b/package/netkittelnet/netkittelnet.mk new file mode 100644 index 000000000..401b885ca --- /dev/null +++ b/package/netkittelnet/netkittelnet.mk @@ -0,0 +1,59 @@ +############################################################# +# +# netkittelnet +# +############################################################# +NETKITTELNET_SOURCE:=netkit-telnet-0.17.tar.gz +NETKITTELNET_SITE:=ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ +NETKITTELNET_DIR:=$(BUILD_DIR)/netkit-telnet-0.17 +NETKITTELNET_CAT:=zcat +NETKITTELNET_BINARY:=telnetd/telnetd +NETKITTELNET_TARGET_BINARY:=usr/sbin/telnetd +NETKITTELNET_PATCH:=$(SOURCE_DIR)/netkittelnet.patch + +$(DL_DIR)/$(NETKITTELNET_SOURCE): + $(WGET) -P $(DL_DIR) $(NETKITTELNET_SITE)/$(NETKITTELNET_SOURCE) + +netkittelnet-source: $(DL_DIR)/$(NETKITTELNET_SOURCE) + +$(NETKITTELNET_DIR)/.unpacked: $(DL_DIR)/$(NETKITTELNET_SOURCE) + $(NETKITTELNET_CAT) $(DL_DIR)/$(NETKITTELNET_SOURCE) | tar -C $(BUILD_DIR) -xvf - + # use ANSI syntax + $(SED) "s/main()/main(void)/;" $(NETKITTELNET_DIR)/configure + # Disable termcap support + $(SED) "s~\(.*termcap\.h.*\)~/* \1 */~;" $(NETKITTELNET_DIR)/telnetd/telnetd.c + # don't try to run cross compiled binaries while configuring things + cat $(NETKITTELNET_PATCH) | patch -p1 -d $(NETKITTELNET_DIR) + touch $(NETKITTELNET_DIR)/.unpacked + +$(NETKITTELNET_DIR)/.configured: $(NETKITTELNET_DIR)/.unpacked + (cd $(NETKITTELNET_DIR); PATH=$(TARGET_PATH) CC=$(TARGET_CC) \ + ./configure --installroot=$(TARGET_DIR) --with-c-compiler=$(TARGET_CC) \ + ) + touch $(NETKITTELNET_DIR)/.configured + +$(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY): $(NETKITTELNET_DIR)/.configured + $(MAKE) SUB=telnetd CC=$(TARGET_CC) -C $(NETKITTELNET_DIR) + $(STRIP) $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY) + +$(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY): $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY) + # Only install a few selected items... + mkdir -p $(TARGET_DIR)/usr/sbin + rm -f $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY) + cp $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY) $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY) + # Enable telnet in inetd + $(SED) "s~^#telnet.*~telnet\tstream\ttcp\tnowait\troot\t/usr/sbin/telnetd\t/usr/sbin/telnetd~;" $(TARGET_DIR)/etc/inetd.conf + #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETKITTELNET_DIR) install + #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +netkittelnet: uclibc netkitbase $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY) + +netkittelnet-clean: + #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETKITTELNET_DIR) uninstall + -rm -f $(TARGET_DIR)/usr/sbin/telnetd + -$(MAKE) -C $(NETKITTELNET_DIR) clean + +netkittelnet-dirclean: + rm -rf $(NETKITTELNET_DIR) + diff --git a/package/netsnmp/netsnmp.mk b/package/netsnmp/netsnmp.mk new file mode 100644 index 000000000..eeb244967 --- /dev/null +++ b/package/netsnmp/netsnmp.mk @@ -0,0 +1,105 @@ +############################################################# +# +# netsnmp +# +############################################################# + +NETSNMP_URL:=http://aleron.dl.sourceforge.net/sourceforge/net-snmp/ +NETSNMP_DIR:=$(BUILD_DIR)/net-snmp-5.1 +NETSNMP_SOURCE:=net-snmp-5.1.tar.gz +NETSNMP_PATCH1:=net-snmp_5.1-5.diff.gz +NETSNMP_PATCH1_URL:=http://ftp.debian.org/debian/pool/main/n/net-snmp/ +NETSNMP_PATCH2:=$(SOURCE_DIR)/netsnmp.patch + +$(DL_DIR)/$(NETSNMP_SOURCE): + $(WGET) -P $(DL_DIR) $(NETSNMP_URL)/$(NETSNMP_SOURCE) + +$(DL_DIR)/$(NETSNMP_PATCH1): + $(WGET) -P $(DL_DIR) $(NETSNMP_PATCH1_URL)/$(NETSNMP_PATCH1) + +$(NETSNMP_DIR)/.unpacked: $(DL_DIR)/$(NETSNMP_SOURCE) $(DL_DIR)/$(NETSNMP_PATCH1) + zcat $(DL_DIR)/$(NETSNMP_SOURCE) | tar -C $(BUILD_DIR) -xvf - + zcat $(DL_DIR)/$(NETSNMP_PATCH1) | patch -p1 -d $(NETSNMP_DIR) + cat $(NETSNMP_PATCH2) | patch -p1 -d $(NETSNMP_DIR) + touch $(NETSNMP_DIR)/.unpacked + +# We set CAN_USE_SYSCTL to no and use /proc since the +# sysctl code in this thing is apparently intended for +# freebsd or some such thing... +$(NETSNMP_DIR)/.configured: $(NETSNMP_DIR)/.unpacked + (cd $(NETSNMP_DIR); autoconf; \ + ac_cv_CAN_USE_SYSCTL=no \ + PATH=$(TARGET_PATH) \ + ./configure \ + --with-cc=$(TARGET_CROSS)gcc \ + --with-ar=$(TARGET_CROSS)ar \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --with-endianness=little \ + --with-persistent-directory=/var/lib/snmp \ + --enable-ucd-snmp-compatibility \ + --enable-shared \ + --disable-static \ + --with-logfile=none \ + --without-rpm \ + --with-openssl \ + --without-dmalloc \ + --without-efence \ + --without-rsaref \ + --with-sys-contact="root" \ + --with-sys-location="Unknown" \ + --with-mib-modules="host smux ucd-snmp/dlmod" \ + --with-defaults \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/man \ + --infodir=/usr/info \ + ); + touch $(NETSNMP_DIR)/.configured + +$(NETSNMP_DIR)/agent/snmpd: $(NETSNMP_DIR)/.configured + $(MAKE) -C $(NETSNMP_DIR) + +$(TARGET_DIR)/usr/sbin/snmpd: $(NETSNMP_DIR)/agent/snmpd + #$(MAKE) DESTDIR=$(TARGET_DIR) -C $(NETSNMP_DIR) install + $(MAKE) PREFIX=$(TARGET_DIR)/usr \ + prefix=$(TARGET_DIR)/usr \ + exec_prefix=$(TARGET_DIR)/usr \ + persistentdir=$(TARGET_DIR)/var/lib/snmp \ + infodir=$(TARGET_DIR)/usr/info \ + mandir=$(TARGET_DIR)/usr/man \ + includedir=$(STAGING_DIR)/include/net-snmp \ + ucdincludedir=$(STAGING_DIR)/include/ucd-snmp \ + -C $(NETSNMP_DIR) install; + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + # Copy the .conf files. + mkdir -p $(TARGET_DIR)/etc/snmp + cp $(NETSNMP_DIR)/EXAMPLE.conf $(TARGET_DIR)/etc/snmp/snmpd.conf + cp $(NETSNMP_DIR)/EXAMPLE-trap.conf $(TARGET_DIR)/etc/snmp/snmptrapd.conf + -mv $(TARGET_DIR)/usr/share/snmp/mib2c*.conf $(TARGET_DIR)/etc/snmp + mkdir -p $(TARGET_DIR)/etc/default + cp $(NETSNMP_DIR)/debian/snmpd.default $(TARGET_DIR)/etc/default/snmpd + # Remove the unsupported snmpcheck program + rm $(TARGET_DIR)/usr/bin/snmpcheck + # Install the "broken" headers + cp $(NETSNMP_DIR)/agent/mibgroup/struct.h $(STAGING_DIR)/include/net-snmp/agent + cp $(NETSNMP_DIR)/agent/mibgroup/util_funcs.h $(STAGING_DIR)/include/net-snmp + cp $(NETSNMP_DIR)/agent/mibgroup/mibincl.h $(STAGING_DIR)/include/net-snmp/library + cp $(NETSNMP_DIR)/agent/mibgroup/header_complex.h $(STAGING_DIR)/include/net-snmp/agent + +netsnmp: $(TARGET_DIR)/usr/sbin/snmpd + +netsnmp-headers: $(TARGET_DIR)/usr/include/net-snmp/net-snmp-config.h + cp -a $(STAGING_DIR)/include/net-snmp $(TARGET_DIR)/usr/include/net-snmp + cp -a $(STAGING_DIR)/include/ucd-snmp $(TARGET_DIR)/usr/include/net-snmp + +netsnmp-source: $(DL_DIR)/$(NETSNMP_SOURCE) + +netsnmp-clean: + $(MAKE) -C $(NETSNMP_DIR) clean + +netsnmp-dirclean: + rm -rf $(NETSNMP_DIR) + diff --git a/package/newt/newt.mk b/package/newt/newt.mk new file mode 100644 index 000000000..0f804f1cd --- /dev/null +++ b/package/newt/newt.mk @@ -0,0 +1,72 @@ +############################################################# +# +# newt +# +############################################################# +NEWT_SOURCE=newt-0.51.0.tar.bz2 +NEWT_SITE=http://www.uclibc.org/ +NEWT_DIR=$(BUILD_DIR)/newt-0.51.0 +NEWT_VERSION=0.51.0 +ifeq ($(BR2_LARGEFILE),y) +NEWT_CFLAGS=-Os -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +else +NEWT_CFLAGS=-Os -g +endif +NEWT_CFLAGS+=-fPIC + +$(DL_DIR)/$(NEWT_SOURCE): + $(WGET) -P $(DL_DIR) $(NEWT_SITE)/$(NEWT_SOURCE) + +$(NEWT_DIR)/.source: $(DL_DIR)/$(NEWT_SOURCE) + bzcat $(DL_DIR)/$(NEWT_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(NEWT_DIR)/.source; + +$(NEWT_DIR)/.configured: $(NEWT_DIR)/.source + (cd $(NEWT_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 \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + ); + touch $(NEWT_DIR)/.configured; + +$(NEWT_DIR)/libnewt.so.$(NEWT_VERSION): $(NEWT_DIR)/.configured + $(MAKE) CFLAGS="$(NEWT_CFLAGS)" CC=$(TARGET_CC) -C $(NEWT_DIR) + touch -c $(NEWT_DIR)/libnewt.so.$(NEWT_VERSION) + +$(STAGING_DIR)/lib/libnewt.a: $(NEWT_DIR)/libnewt.so.$(NEWT_VERSION) + cp -a $(NEWT_DIR)/libnewt.a $(STAGING_DIR)/lib; + cp -a $(NEWT_DIR)/newt.h $(STAGING_DIR)/include; + cp -a $(NEWT_DIR)/libnewt.so* $(STAGING_DIR)/lib; + (cd $(STAGING_DIR)/lib; ln -fs libnewt.so.$(NEWT_VERSION) libnewt.so); + (cd $(STAGING_DIR)/lib; ln -fs libnewt.so.$(NEWT_VERSION) libnewt.so.0.51); + touch -c $(STAGING_DIR)/lib/libnewt.a + +$(TARGET_DIR)/lib/libnewt.so.$(NEWT_VERSION): $(STAGING_DIR)/lib/libnewt.a + cp -a $(STAGING_DIR)/lib/libnewt.so* $(TARGET_DIR)/lib; + -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libnewt.so* + touch -c $(TARGET_DIR)/lib/libnewt.so.$(NEWT_VERSION) + +newt: uclibc slang $(TARGET_DIR)/lib/libnewt.so.$(NEWT_VERSION) + +newt-source: $(DL_DIR)/$(NEWT_SOURCE) + +newt-clean: + rm -f $(TARGET_DIR)/lib/libnewt.so* + -$(MAKE) -C $(NEWT_DIR) clean + +newt-dirclean: slang-dirclean + rm -rf $(NEWT_DIR) + diff --git a/package/ntp/ntp.mk b/package/ntp/ntp.mk new file mode 100644 index 000000000..b3f840a3e --- /dev/null +++ b/package/ntp/ntp.mk @@ -0,0 +1,62 @@ +############################################################# +# +# ntp +# +############################################################# +NTP_SOURCE:=ntp-4.1.2.tar.gz +NTP_SITE:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4 +NTP_DIR:=$(BUILD_DIR)/ntp-4.1.2 +NTP_CAT:=zcat +NTP_BINARY:=ntpdate/ntpdate +NTP_TARGET_BINARY:=usr/bin/ntpdate + + +$(DL_DIR)/$(NTP_SOURCE): + $(WGET) -P $(DL_DIR) $(NTP_SITE)/$(NTP_SOURCE) + +ntp-source: $(DL_DIR)/$(NTP_SOURCE) + +$(NTP_DIR)/.unpacked: $(DL_DIR)/$(NTP_SOURCE) + $(NTP_CAT) $(DL_DIR)/$(NTP_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(SED) "s,^#if.*__GLIBC__.*_BSD_SOURCE.*$$,#if 0," \ + $(NTP_DIR)/ntpd/refclock_pcf.c; + touch $(NTP_DIR)/.unpacked + +$(NTP_DIR)/.configured: $(NTP_DIR)/.unpacked + (cd $(NTP_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 \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + --with-shared \ + --program-transform-name=s,,, \ + ); + touch $(NTP_DIR)/.configured + +$(NTP_DIR)/$(NTP_BINARY): $(NTP_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(NTP_DIR) + +$(TARGET_DIR)/$(NTP_TARGET_BINARY): $(NTP_DIR)/$(NTP_BINARY) + install -m 755 $(NTP_DIR)/$(NTP_BINARY) $(TARGET_DIR)/$(NTP_TARGET_BINARY) + +ntp: uclibc $(TARGET_DIR)/$(NTP_TARGET_BINARY) + +ntp-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NTP_DIR) uninstall + -$(MAKE) -C $(NTP_DIR) clean + +ntp-dirclean: + rm -rf $(NTP_DIR) + diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk new file mode 100644 index 000000000..c7feba20c --- /dev/null +++ b/package/openssh/openssh.mk @@ -0,0 +1,78 @@ +############################################################# +# +# openssh +# +############################################################# + +OPENSSH_SITE:=ftp://ftp.tux.org/bsd/openbsd/OpenSSH/portable/ +OPENSSH_DIR:=$(BUILD_DIR)/openssh-3.8p1 +OPENSSH_SOURCE:=openssh-3.8p1.tar.gz +OPENSSH_PATCH:=$(SOURCE_DIR)/openssh.patch + +$(DL_DIR)/$(OPENSSH_SOURCE): + $(WGET) -P $(DL_DIR) $(OPENSSH_SITE)/$(OPENSSH_SOURCE) + +$(OPENSSH_DIR)/.unpacked: $(DL_DIR)/$(OPENSSH_SOURCE) $(OPENSSH_PATCH) + zcat $(DL_DIR)/$(OPENSSH_SOURCE) | tar -C $(BUILD_DIR) -xvf - + cat $(OPENSSH_PATCH) | patch -p1 -d $(OPENSSH_DIR) + touch $(OPENSSH_DIR)/.unpacked + +$(OPENSSH_DIR)/.configured: $(OPENSSH_DIR)/.unpacked + (cd $(OPENSSH_DIR); rm -rf config.cache; autoconf; \ + $(TARGET_CONFIGURE_OPTS) \ + LD=$(TARGET_CROSS)gcc \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/sbin \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --includedir=$(STAGING_DIR)/include \ + --disable-lastlog --disable-utmp \ + --disable-utmpx --disable-wtmp --disable-wtmpx \ + --without-x \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + ); + touch $(OPENSSH_DIR)/.configured + +$(OPENSSH_DIR)/ssh: $(OPENSSH_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(OPENSSH_DIR) + -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/scp + -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/sftp + -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/sftp-server + -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh + -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-add + -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-agent + -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-keygen + -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-keyscan + -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-keysign + -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-rand-helper + -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/sshd + +$(TARGET_DIR)/usr/bin/ssh: $(OPENSSH_DIR)/ssh + $(MAKE) CC=$(TARGET_CC) DESTDIR=$(TARGET_DIR) -C $(OPENSSH_DIR) install + mkdir -p $(TARGET_DIR)/etc/init.d/ + cp $(OPENSSH_DIR)/S50sshd $(TARGET_DIR)/etc/init.d/ + chmod a+x $(TARGET_DIR)/etc/init.d/S50sshd + rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +openssh: $(TARGET_DIR)/usr/bin/ssh + +openssh-source: $(DL_DIR)/$(OPENSSH_SOURCE) + +openssh-clean: + $(MAKE) -C $(OPENSSH_DIR) clean + +openssh-dirclean: + rm -rf $(OPENSSH_DIR) + diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk new file mode 100644 index 000000000..a4003553b --- /dev/null +++ b/package/openssl/openssl.mk @@ -0,0 +1,78 @@ +############################################################# +# +# openssl +# +############################################################# + +# TARGETS +OPENSSL_SITE:=http://www.openssl.org/source +OPENSSL_SOURCE:=openssl-0.9.7d.tar.gz +OPENSSL_DIR:=$(BUILD_DIR)/openssl-0.9.7d +OPENSSL_PATCH=$(SOURCE_DIR)/openssl.patch + +$(DL_DIR)/$(OPENSSL_SOURCE): + $(WGET) -P $(DL_DIR) $(OPENSSL_SITE)/$(OPENSSL_SOURCE) + +$(OPENSSL_DIR)/.unpacked: $(DL_DIR)/$(OPENSSL_SOURCE) $(OPENSSL_PATCH) + gunzip -c $(DL_DIR)/$(OPENSSL_SOURCE) | tar -C $(BUILD_DIR) -xvf - + cat $(OPENSSL_PATCH) | patch -p1 -d $(OPENSSL_DIR) + # sigh... we have to resort to this just to set a gcc flag. + $(SED) 's,/CFLAG=,/CFLAG= $(TARGET_SOFT_FLOAT) ,g' \ + $(OPENSSL_DIR)/Configure + touch $(OPENSSL_DIR)/.unpacked + +$(OPENSSL_DIR)/Makefile: $(OPENSSL_DIR)/.unpacked + (cd $(OPENSSL_DIR); \ + CFLAGS="-DOPENSSL_NO_KRB5 -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5" \ + PATH=$(TARGET_PATH) ./Configure linux-$(ARCH) --prefix=/ \ + --openssldir=/usr/lib/ssl -L$(STAGING_DIR)/lib -ldl \ + -I$(STAGING_DIR)/include $(OPENSSL_OPTS) no-threads \ + shared no-idea no-mdc2 no-rc5) + +$(OPENSSL_DIR)/apps/openssl: $(OPENSSL_DIR)/Makefile + $(MAKE) CC=$(TARGET_CC) -C $(OPENSSL_DIR) all build-shared + # Work around openssl build bug to link libssl.so with libcrypto.so. + -rm $(OPENSSL_DIR)/libssl.so.*.*.* + $(MAKE) CC=$(TARGET_CC) -C $(OPENSSL_DIR) do_linux-shared + +$(STAGING_DIR)/lib/libcrypto.a: $(OPENSSL_DIR)/apps/openssl + $(MAKE) CC=$(TARGET_CC) INSTALL_PREFIX=$(STAGING_DIR) -C $(OPENSSL_DIR) install + cp -fa $(OPENSSL_DIR)/libcrypto.so* $(STAGING_DIR)/lib/ + chmod a-x $(STAGING_DIR)/lib/libcrypto.so.0.9.7 + (cd $(STAGING_DIR)/lib; ln -fs libcrypto.so.0.9.7 libcrypto.so) + (cd $(STAGING_DIR)/lib; ln -fs libcrypto.so.0.9.7 libcrypto.so.0) + cp -fa $(OPENSSL_DIR)/libssl.so* $(STAGING_DIR)/lib/ + chmod a-x $(STAGING_DIR)/lib/libssl.so.0.9.7 + (cd $(STAGING_DIR)/lib; ln -fs libssl.so.0.9.7 libssl.so) + (cd $(STAGING_DIR)/lib; ln -fs libssl.so.0.9.7 libssl.so.0) + +$(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7: $(STAGING_DIR)/lib/libcrypto.a + mkdir -p $(TARGET_DIR)/usr/lib + cp -fa $(STAGING_DIR)/lib/libcrypto.so* $(TARGET_DIR)/usr/lib/ + cp -fa $(STAGING_DIR)/lib/libssl.so* $(TARGET_DIR)/usr/lib/ + #cp -fa $(STAGING_DIR)/bin/openssl $(TARGET_DIR)/bin/ + -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libssl.so.0.9.7 + -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7 + +$(TARGET_DIR)/usr/lib/libssl.a: $(STAGING_DIR)/lib/libcrypto.a + mkdir -p $(TARGET_DIR)/usr/include + cp -a $(STAGING_DIR)/include/openssl $(TARGET_DIR)/usr/include/ + cp -dpf $(STAGING_DIR)/lib/libssl.a $(TARGET_DIR)/usr/lib/ + cp -dpf $(STAGING_DIR)/lib/libcrypto.a $(TARGET_DIR)/usr/lib/ + touch -c $(TARGET_DIR)/usr/lib/libssl.a + +openssl-headers: $(TARGET_DIR)/usr/lib/libssl.a + +openssl: uclibc $(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7 + +openssl-source: $(DL_DIR)/$(OPENSSL_SOURCE) + +openssl-clean: + rm -f $(STAGING_DIR)/bin/openssl $(TARGET_DIR)/bin/openssl + rm -f $(STAGING_DIR)/lib/libcrypto.so* $(TARGET_DIR)/lib/libcrypto.so* + rm -f $(STAGING_DIR)/lib/libssl.so* $(TARGET_DIR)/lib/libssl.so* + $(MAKE) -C $(OPENSSL_DIR) clean + +openssl-dirclean: + rm -rf $(OPENSSL_DIR) + diff --git a/package/openvpn/openvpn.mk b/package/openvpn/openvpn.mk new file mode 100644 index 000000000..0ac627932 --- /dev/null +++ b/package/openvpn/openvpn.mk @@ -0,0 +1,68 @@ +############################################################# +# +# openvpn +# +# NOTE: Uses start-stop-daemon in init script, so be sure +# to enable that within busybox +# +############################################################# +OPENVPN_SOURCE:=openvpn-1.5.0.tar.gz +OPENVPN_SITE:=http://aleron.dl.sourceforge.net/sourceforge/openvpn/ +OPENVPN_DIR:=$(BUILD_DIR)/openvpn-1.5.0 +OPENVPN_CAT:=zcat +OPENVPN_BINARY:=openvpn +OPENVPN_TARGET_BINARY:=usr/sbin/openvpn +#OPENVPN_PATCH:=$(SOURCE_DIR)/openvpn.patch + +$(DL_DIR)/$(OPENVPN_SOURCE): + $(WGET) -P $(DL_DIR) $(OPENVPN_SITE)/$(OPENVPN_SOURCE) + +openvpn-source: $(DL_DIR)/$(OPENVPN_SOURCE) + +$(OPENVPN_DIR)/.unpacked: $(DL_DIR)/$(OPENVPN_SOURCE) + $(OPENVPN_CAT) $(DL_DIR)/$(OPENVPN_SOURCE) | tar -C $(BUILD_DIR) -xvf - + #cat $(OPENVPN_PATCH) | patch -p1 -d $(OPENVPN_DIR) + touch $(OPENVPN_DIR)/.unpacked + +$(OPENVPN_DIR)/.configured: $(OPENVPN_DIR)/.unpacked + (cd $(OPENVPN_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --program-prefix="" \ + --enable-pthread \ + ); + touch $(OPENVPN_DIR)/.configured + +$(OPENVPN_DIR)/$(OPENVPN_BINARY): $(OPENVPN_DIR)/.configured + $(MAKE) -C $(OPENVPN_DIR) + +$(TARGET_DIR)/$(OPENVPN_TARGET_BINARY): $(OPENVPN_DIR)/$(OPENVPN_BINARY) + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(OPENVPN_DIR) install + mkdir -p $(TARGET_DIR)/etc/openvpn + cp $(SOURCE_DIR)/openvpn $(TARGET_DIR)/etc/init.d/openvpn + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +openvpn: uclibc lzo openssl $(TARGET_DIR)/$(OPENVPN_TARGET_BINARY) + +openvpn-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(OPENVPN_DIR) uninstall + -$(MAKE) -C $(OPENVPN_DIR) clean + +openvpn-dirclean: + rm -rf $(OPENVPN_DIR) + diff --git a/package/patch/patch.mk b/package/patch/patch.mk new file mode 100644 index 000000000..d49102c85 --- /dev/null +++ b/package/patch/patch.mk @@ -0,0 +1,60 @@ +############################################################# +# +# patch +# +############################################################# +GNUPATCH_SOURCE:=patch_2.5.9.orig.tar.gz +GNUPATCH_SITE:=http://ftp.debian.org/debian/pool/main/p/patch +GNUPATCH_CAT:=zcat +GNUPATCH_DIR:=$(BUILD_DIR)/patch-2.5.9 +GNUPATCH_BINARY:=patch +GNUPATCH_TARGET_BINARY:=usr/bin/patch + +$(DL_DIR)/$(GNUPATCH_SOURCE): + $(WGET) -P $(DL_DIR) $(GNUPATCH_SITE)/$(GNUPATCH_SOURCE) + +patch-source: $(DL_DIR)/$(GNUPATCH_SOURCE) + +$(GNUPATCH_DIR)/.unpacked: $(DL_DIR)/$(GNUPATCH_SOURCE) + $(GNUPATCH_CAT) $(DL_DIR)/$(GNUPATCH_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(GNUPATCH_DIR)/.unpacked + +$(GNUPATCH_DIR)/.configured: $(GNUPATCH_DIR)/.unpacked + (cd $(GNUPATCH_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + ); + touch $(GNUPATCH_DIR)/.configured + +$(GNUPATCH_DIR)/$(GNUPATCH_BINARY): $(GNUPATCH_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(GNUPATCH_DIR) + +$(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY): $(GNUPATCH_DIR)/$(GNUPATCH_BINARY) + rm -f $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY) + cp -a $(GNUPATCH_DIR)/$(GNUPATCH_BINARY) $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY) + +patch: uclibc $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY) + +patch-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GNUPATCH_DIR) uninstall + -$(MAKE) -C $(GNUPATCH_DIR) clean + +patch-dirclean: + rm -rf $(GNUPATCH_DIR) + diff --git a/package/pciutils/pciutils.mk b/package/pciutils/pciutils.mk new file mode 100644 index 000000000..219864f74 --- /dev/null +++ b/package/pciutils/pciutils.mk @@ -0,0 +1,52 @@ +############################################################# +# +# pciutils +# +############################################################# +PCIUTILS_VER:=2.1.11 +PCIUTILS_SOURCE:=pciutils-$(PCIUTILS_VER).tar.gz +PCIUTILS_SITE:=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci +PCIUTILS_DIR:=$(BUILD_DIR)/pciutils-$(PCIUTILS_VER) +PCIUTILS_CAT:=zcat + +# Yet more targets... +PCIIDS_SITE:=http://pciids.sourceforge.net/ +PCIIDS_SOURCE:=pci.ids.bz2 +PCIIDS_CAT:=bzcat + +$(DL_DIR)/$(PCIUTILS_SOURCE): + $(WGET) -P $(DL_DIR) $(PCIUTILS_SITE)/$(PCIUTILS_SOURCE) + +$(DL_DIR)/$(PCIIDS_SOURCE): + $(WGET) -P $(DL_DIR) $(PCIIDS_SITE)/$(PCIIDS_SOURCE) + +pciutils-source: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURCE) + +$(PCIUTILS_DIR)/.unpacked: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURCE) + $(PCIUTILS_CAT) $(DL_DIR)/$(PCIUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(PCIIDS_CAT) $(DL_DIR)/$(PCIIDS_SOURCE) > $(PCIUTILS_DIR)/pci.id + $(SOURCE_DIR)/patch-kernel.sh $(PCIUTILS_DIR) $(SOURCE_DIR) pciutils*.patch + touch $(PCIUTILS_DIR)/.unpacked + +$(PCIUTILS_DIR)/.compiled: $(PCIUTILS_DIR)/.unpacked + $(MAKE) CC=$(TARGET_CC) OPT="$(TARGET_CFLAGS)" -C $(PCIUTILS_DIR) + touch $(PCIUTILS_DIR)/.compiled + +$(TARGET_DIR)/sbin/lspci: $(PCIUTILS_DIR)/.compiled + install -c $(PCIUTILS_DIR)/lspci $(TARGET_DIR)/sbin/lspci + +$(TARGET_DIR)/sbin/setpci: $(PCIUTILS_DIR)/.compiled + install -c $(PCIUTILS_DIR)/setpci $(TARGET_DIR)/sbin/setpci + +$(TARGET_DIR)/usr/share/misc/pci.ids: $(PCIUTILS_DIR)/.compiled + install -Dc $(PCIUTILS_DIR)/pci.ids $(TARGET_DIR)/usr/share/misc/pci.ids + +pciutils: uclibc $(TARGET_DIR)/sbin/setpci $(TARGET_DIR)/sbin/lspci $(TARGET_DIR)/usr/share/misc/pci.ids + +pciutils-clean: + rm $(TARGET_DIR)/sbin/lspci $(TARGET_DIR)/sbin/setpci $(TARGET_DIR)/usr/share/misc/pci.ids + -$(MAKE) -C $(PCIUTILS_DIR) clean + +pciutils-dirclean: + rm -rf $(PCIUTILS_DIR) + diff --git a/package/pcmcia/pcmcia.mk b/package/pcmcia/pcmcia.mk new file mode 100644 index 000000000..eded294b8 --- /dev/null +++ b/package/pcmcia/pcmcia.mk @@ -0,0 +1,108 @@ +############################################################# +# +# pcmcia card services +# +############################################################# +# Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org> +# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA + +PCMCIA_SOURCE:=pcmcia-cs-3.2.7.tar.gz +PCMCIA_SITE:=http://aleron.dl.sourceforge.net/sourceforge/pcmcia-cs +PCMCIA_DIR:=$(BUILD_DIR)/pcmcia-cs-3.2.7 +PCMCIA_PATCH:=$(SOURCE_DIR)/pcmcia.patch +PCMCIA_CAT:=zcat + +$(DL_DIR)/$(PCMCIA_SOURCE): + $(WGET) -P $(DL_DIR) $(PCMCIA_SITE)/$(PCMCIA_SOURCE) + +pcmcia-source: $(DL_DIR)/$(PCMCIA_SOURCE) + +$(PCMCIA_DIR)/.unpacked: $(DL_DIR)/$(PCMCIA_SOURCE) + $(PCMCIA_CAT) $(DL_DIR)/$(PCMCIA_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(PCMCIA_DIR)/.unpacked + +$(PCMCIA_DIR)/.patched: $(PCMCIA_DIR)/.unpacked + cat $(PCMCIA_PATCH) | patch -d $(PCMCIA_DIR) -p1 + touch $(PCMCIA_DIR)/.patched + +$(PCMCIA_DIR)/.configured: $(PCMCIA_DIR)/.patched + ( cd $(PCMCIA_DIR) ; ./Configure --kernel=$(LINUX_SOURCE_DIR) --noprompt \ + --rcdir=/etc --arch=$(ARCH) --trust --srctree --nocardbus \ + --sysv --kcc=$(KERNEL_CROSS)gcc --ucc=$(TARGET_CC) --ld=$(TARGET_CROSS)ld \ + --target=$(TARGET_DIR)) + $(SED) "s/pump/udhcpc/" $(PCMCIA_DIR)/etc/network + $(SED) "s/ide_cs/ide-cs/" $(PCMCIA_DIR)/etc/config + $(SED) "s/bind \"wvlan_cs\"/bind \"orinoco_cs\"/g" $(PCMCIA_DIR)/etc/config + touch $(PCMCIA_DIR)/.configured + +$(PCMCIA_DIR)/cardmgr/cardmgr: $(PCMCIA_DIR)/.configured + $(MAKE) -C $(PCMCIA_DIR) -i all + -A=`find $(PCMCIA_DIR) -type f -perm +111` ; \ + for fo in $$A; do \ + file $$fo | grep "ELF" | grep "executable" > /dev/null 2>&1; \ + if [ $$? = 0 ] ; then \ + $(STRIP) $$fo; \ + fi; \ + done + touch -c $(PCMCIA_DIR)/cardmgr/cardmgr + +$(TARGET_DIR)/sbin/cardmgr: $(PCMCIA_DIR)/cardmgr/cardmgr + rm -rf $(TARGET_DIR)/etc/pcmcia; + $(MAKE) -i -C $(PCMCIA_DIR) install + rm -rf $(TARGET_DIR)/usr/man; + rm -rf $(TARGET_DIR)/usr/share/man; + rm -rf $(TARGET_DIR)/usr/X11R6/man; + rm -rf $(TARGET_DIR)/etc/rc.d; + rm -rf $(TARGET_DIR)/etc/rc?.d; + rm -f $(TARGET_DIR)/etc/init.d/pcmcia*; + rm -f $(TARGET_DIR)/sbin/dump_cis $(TARGET_DIR)/sbin/pack_cis + rm -f $(TARGET_DIR)/usr/share/pnp.ids $(TARGET_DIR)/sbin/lspnp $(TARGET_DIR)/sbin/setpnp; + rm -f $(TARGET_DIR)/sbin/pcinitrd + rm -f $(TARGET_DIR)/sbin/probe + rm -f $(TARGET_DIR)/sbin/ide_info + rm -f $(TARGET_DIR)/sbin/scsi_info + rm -f $(TARGET_DIR)/sbin/ftl_check + rm -f $(TARGET_DIR)/sbin/ftl_format + rm -f $(TARGET_DIR)/usr/X11R6/bin/xcardinfo + rm -rf $(TARGET_DIR)/etc/sysconfig + mkdir -p $(TARGET_DIR)/etc/default + cp -f $(PCMCIA_DIR)/etc/pcmcia $(TARGET_DIR)/etc/default/ + cp -f $(PCMCIA_DIR)/etc/rc.pcmcia $(TARGET_DIR)/etc/init.d/S30pcmcia + rm -rf $(TARGET_DIR)/etc/pcmcia/cis + chmod a+x $(TARGET_DIR)/etc/init.d/S30pcmcia + chmod -R u+w $(TARGET_DIR)/etc/pcmcia/* + +# use busybox depmod.pl so we need the sources unpacked +$(PCMCIA_DIR)/.modules.dep: $(BUSYBOX_DIR)/.configured $(TARGET_DIR)/lib/modules + [ -d $(TARGET_DIR)/lib/modules/$(LINUX_VERSION) ] && \ + $(BUSYBOX_DIR)/examples/depmod.pl \ + -b $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/ \ + -k $(LINUX_DIR)/vmlinux \ + -F $(LINUX_DIR)/System.map \ + > $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/modules.dep + touch $(PCMCIA_DIR)/.modules.dep + +pcmcia: uclibc linux $(TARGET_DIR)/sbin/cardmgr $(PCMCIA_DIR)/.modules.dep + +pcmcia-clean: + rm -f $(TARGET_DIR)/sbin/cardmgr + -$(MAKE) -C $(PCMCIA_DIR) clean + rm -f $(PCMCIA_DIR)/.configured $(PCMCIA_DIR)/config.out + +pcmcia-dirclean: + rm -rf $(PCMCIA_DIR) diff --git a/package/pppd/pppd.mk b/package/pppd/pppd.mk new file mode 100644 index 000000000..a76149b9a --- /dev/null +++ b/package/pppd/pppd.mk @@ -0,0 +1,68 @@ +############################################################# +# +# pppd +# +############################################################# +PPPD_SOURCE:=ppp-2.4.1.tar.gz +PPPD_SITE:=ftp://ftp.samba.org/pub/ppp +PPPD_DIR:=$(BUILD_DIR)/ppp-2.4.1 +PPPD_CAT:=zcat +PPPD_BINARY:=pppd/pppd +PPPD_TARGET_BINARY:=usr/sbin/pppd + + +$(DL_DIR)/$(PPPD_SOURCE): + $(WGET) -P $(DL_DIR) $(PPPD_SITE)/$(PPPD_SOURCE) + +pppd-source: $(DL_DIR)/$(PPPD_SOURCE) + +$(PPPD_DIR)/.unpacked: $(DL_DIR)/$(PPPD_SOURCE) + $(PPPD_CAT) $(DL_DIR)/$(PPPD_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(SED) 's/ -DIPX_CHANGE -DHAVE_MULTILINK -DHAVE_MMAP//' $(PPPD_DIR)/pppd/Makefile.linux + $(SED) 's/$(INSTALL) -s/$(INSTALL)/' $(PPPD_DIR)/*/Makefile.linux + $(SED) 's/ -o root//' $(PPPD_DIR)/*/Makefile.linux + $(SED) 's/ -g daemon//' $(PPPD_DIR)/*/Makefile.linux + touch $(PPPD_DIR)/.unpacked + +$(PPPD_DIR)/.configured: $(PPPD_DIR)/.unpacked + (cd $(PPPD_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 \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + ); + touch $(PPPD_DIR)/.configured + +$(PPPD_DIR)/$(PPPD_BINARY): $(PPPD_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(PPPD_DIR) + +$(TARGET_DIR)/$(PPPD_TARGET_BINARY): $(PPPD_DIR)/$(PPPD_BINARY) + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(PPPD_DIR) install + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +pppd: uclibc $(TARGET_DIR)/$(PPPD_TARGET_BINARY) + +pppd-clean: + rm -f $(TARGET_DIR)/usr/sbin/pppd + rm -f $(TARGET_DIR)/usr/sbin/chat + rm -rf $(TARGET_DIR)/etc/ppp + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(PPPD_DIR) uninstall + -$(MAKE) -C $(PPPD_DIR) clean + +pppd-dirclean: + rm -rf $(PPPD_DIR) + + diff --git a/package/procps/procps.mk b/package/procps/procps.mk new file mode 100644 index 000000000..b4ecbbd09 --- /dev/null +++ b/package/procps/procps.mk @@ -0,0 +1,39 @@ +############################################################# +# +# procps +# +############################################################# +PROCPS_VER=3.2.3 +PROCPS_SOURCE=procps-$(PROCPS_VER).tar.gz +PROCPS_SITE=http://procps.sourceforge.net/ +PROCPS_DIR=$(BUILD_DIR)/procps-$(PROCPS_VER) +PROCPS_BINARY=ps/ps +PROCPS_TARGET_BINARY=usr/bin/vmstat + +$(DL_DIR)/$(PROCPS_SOURCE): + $(WGET) -P $(DL_DIR) $(PROCPS_SITE)/$(PROCPS_SOURCE) + +$(PROCPS_DIR)/.source: $(DL_DIR)/$(PROCPS_SOURCE) + zcat $(DL_DIR)/$(PROCPS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(PROCPS_DIR)/.source + +$(PROCPS_DIR)/$(PROCPS_BINARY): $(PROCPS_DIR)/.source + $(TARGET_CONFIGURE_OPTS) $(MAKE) CC=$(TARGET_CC) -C $(PROCPS_DIR) + +$(TARGET_DIR)/$(PROCPS_TARGET_BINARY): $(PROCPS_DIR)/$(PROCPS_BINARY) + $(TARGET_CONFIGURE_OPTS) $(MAKE) DESTDIR=$(TARGET_DIR) \ + install='install -D' -C $(PROCPS_DIR) \ + ldconfig='/bin/true' install + rm -Rf $(TARGET_DIR)/usr/man + +procps: uclibc ncurses $(TARGET_DIR)/$(PROCPS_TARGET_BINARY) + +procps-source: $(DL_DIR)/$(PROCPS_SOURCE) + +procps-clean: + $(MAKE) prefix=$(TARGET_DIR)/usr -C $(PROCPS_DIR) uninstall + -$(MAKE) -C $(PROCPS_DIR) clean + +procps-dirclean: + rm -rf $(PROCPS_DIR) + diff --git a/package/python/python.mk b/package/python/python.mk new file mode 100644 index 000000000..e49cc12aa --- /dev/null +++ b/package/python/python.mk @@ -0,0 +1,77 @@ +############################################################# +# +# python +# +############################################################# +PYTHON_VERSION=2.3.4 +PYTHON_SOURCE:=Python-$(PYTHON_VERSION).tar.bz2 +PYTHON_SITE:=http://python.org/ftp/python/$(PYTHON_VERSION) +PYTHON_DIR:=$(BUILD_DIR)/Python-$(PYTHON_VERSION) +PYTHON_CAT:=bzcat +PYTHON_BINARY:=python +PYTHON_TARGET_BINARY:=usr/bin/python + +$(DL_DIR)/$(PYTHON_SOURCE): + $(WGET) -P $(DL_DIR) $(PYTHON_SITE)/$(PYTHON_SOURCE) + +python-source: $(DL_DIR)/$(PYTHON_SOURCE) + +$(PYTHON_DIR)/.unpacked: $(DL_DIR)/$(PYTHON_SOURCE) + $(PYTHON_CAT) $(DL_DIR)/$(PYTHON_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(PYTHON_DIR)/.unpacked + +$(PYTHON_DIR)/.patched: $(PYTHON_DIR)/.unpacked + $(SOURCE_DIR)/patch-kernel.sh $(PYTHON_DIR) $(SOURCE_DIR) python*.patch + touch $(PYTHON_DIR)/.patched + +$(PYTHON_DIR)/.hostpython: $(PYTHON_DIR)/.patched + (cd $(PYTHON_DIR); rm -rf config.cache; \ + OPT="-O1" \ + ./configure \ + --with-cxx=no \ + $(DISABLE_NLS); \ + make python Parser/pygen; \ + mv python hostpython; \ + mv Parser/pgen Parser/hostpgen; \ + make distclean \ + ); + touch $(PYTHON_DIR)/.hostpython + +$(PYTHON_DIR)/.configured: $(PYTHON_DIR)/.hostpython + (cd $(PYTHON_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + OPT="$(TARGET_OPTIMIZATION)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --sysconfdir=/etc \ + --with-cxx=no \ + $(DISABLE_NLS) \ + ); + touch $(PYTHON_DIR)/.configured + +$(PYTHON_DIR)/$(PYTHON_BINARY): $(PYTHON_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR) DESTDIR=$(TARGET_DIR) \ + HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen + +$(TARGET_DIR)/$(PYTHON_TARGET_BINARY): $(PYTHON_DIR)/$(PYTHON_BINARY) + LD_LIBRARY_PATH=$(STAGING_DIR)/lib + $(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR) install \ + DESTDIR=$(TARGET_DIR) CROSS_COMPILE=yes \ + HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen + rm $(TARGET_DIR)/usr/bin/idle + rm $(TARGET_DIR)/usr/bin/pydoc + find $(TARGET_DIR)/usr/lib/ -name '*.pyc' -o -name '*.pyo' | xargs rm + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +python: uclibc $(TARGET_DIR)/$(PYTHON_TARGET_BINARY) + +python-clean: + -$(MAKE) -C $(PYTHON_DIR) distclean + rm $(PYTHON_DIR)/.configured + +python-dirclean: + rm -rf $(PYTHON_DIR) diff --git a/package/raidtools/raidtools.mk b/package/raidtools/raidtools.mk new file mode 100644 index 000000000..657f245f3 --- /dev/null +++ b/package/raidtools/raidtools.mk @@ -0,0 +1,59 @@ +############################################################# +# +# raidtools2 +# +############################################################# +RAIDTOOLS2_SOURCE:=raidtools2-1.00.3.tar.gz +RAIDTOOLS2_SITE:= +RAIDTOOLS2_DIR:=$(BUILD_DIR)/raidtools2-1.00.3 +RAIDTOOLS2_CAT:=zcat +RAIDTOOLS2_BINARY:=mkraid +RAIDTOOLS2_TARGET_BINARY:=sbin/mkraid + +$(DL_DIR)/$(RAIDTOOLS2_SOURCE): + $(WGET) -P $(DL_DIR) $(RAIDTOOLS2_SITE)/$(RAIDTOOLS2_SOURCE) + +raidtools2-source: $(DL_DIR)/$(RAIDTOOLS2_SOURCE) + +$(RAIDTOOLS2_DIR)/.unpacked: $(DL_DIR)/$(RAIDTOOLS2_SOURCE) + $(RAIDTOOLS2_CAT) $(DL_DIR)/$(RAIDTOOLS2_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(RAIDTOOLS2_DIR)/.unpacked + +$(RAIDTOOLS2_DIR)/.configured: $(RAIDTOOLS2_DIR)/.unpacked + (cd $(RAIDTOOLS2_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 \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share/misc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + --enable-fsect-man5 \ + ); + touch $(RAIDTOOLS2_DIR)/.configured + +$(RAIDTOOLS2_DIR)/$(RAIDTOOLS2_BINARY): $(RAIDTOOLS2_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(RAIDTOOLS2_DIR) + +$(TARGET_DIR)/$(RAIDTOOLS2_TARGET_BINARY): $(RAIDTOOLS2_DIR)/$(RAIDTOOLS2_BINARY) + $(MAKE) ROOTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(RAIDTOOLS2_DIR) install + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +raidtools2: zlib uclibc $(TARGET_DIR)/$(RAIDTOOLS2_TARGET_BINARY) + +raidtools2-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(RAIDTOOLS2_DIR) uninstall + -$(MAKE) -C $(RAIDTOOLS2_DIR) clean + +raidtools2-dirclean: + rm -rf $(RAIDTOOLS2_DIR) diff --git a/package/rxvt/rxvt.mk b/package/rxvt/rxvt.mk new file mode 100644 index 000000000..a63354703 --- /dev/null +++ b/package/rxvt/rxvt.mk @@ -0,0 +1,70 @@ +############################################################# +# +# rxvt +# +############################################################# +# Copyright (C) 2002 by Tom Walsh <Tom@OpenHardware.net> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA + +RXVT_SOURCE:=rxvt-2.6.4.tar.bz2 +RXVT_PATCH:=$(SOURCE_DIR)/rxvt-2.6.4.patch +RXVT_SITE:=ftp://ftp.rxvt.org/pub/rxvt/ +RXVT_CAT:=bzcat +RXVT_DIR:=$(BUILD_DIR)/rxvt-2.6.4 +RXVT_BINARY:=$(RXVT_DIR)/src/rxvt + +$(DL_DIR)/$(RXVT_SOURCE): + $(WGET) -P $(DL_DIR) $(RXVT_SITE)/$(RXVT_SOURCE) + +rxvt-source: $(DL_DIR)/$(RXVT_SOURCE) + +$(RXVT_DIR)/.unpacked: $(DL_DIR)/$(RXVT_SOURCE) + $(RXVT_CAT) $(DL_DIR)/$(RXVT_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(RXVT_DIR)/.unpacked + +$(RXVT_DIR)/.configured: $(RXVT_DIR)/.unpacked + (cd $(RXVT_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr/X11R6 \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --x-includes=$(TINYX_DIR)/exports/include \ + --x-libraries=$(TINYX_DIR)/exports/lib \ + ); + cat $(RXVT_PATCH) | patch -d $(RXVT_DIR) -p1 + touch $(RXVT_DIR)/.configured + +$(RXVT_BINARY): $(RXVT_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(RXVT_DIR) + $(STRIP) -x $(RXVT_BINARY) + +$(TARGET_DIR)/usr/X11R6/bin/rxvt: $(RXVT_BINARY) + cp -f $(RXVT_BINARY) $(TARGET_DIR)/usr/X11R6/bin + +rxvt: tinyx $(TARGET_DIR)/usr/X11R6/bin/rxvt + +rxvt-clean: + rm -f $(TARGET_DIR)/usr/X11R6/bin/rxvt + -$(MAKE) -C $(RXVT_DIR) clean + +rxvt-dirclean: + rm -rf $(RXVT_DIR) + diff --git a/package/sfdisk/sfdisk.mk b/package/sfdisk/sfdisk.mk new file mode 100644 index 000000000..c6b5e632b --- /dev/null +++ b/package/sfdisk/sfdisk.mk @@ -0,0 +1,36 @@ +############################################################# +# +# sfdisk support +# +############################################################# +SFDISK_SOURCE=sfdisk.tar.bz2 +SFDISK_SITE:=http://www.uclibc.org/ +SFDISK_DIR=$(BUILD_DIR)/sfdisk + + +$(DL_DIR)/$(SFDISK_SOURCE): + $(WGET) -P $(DL_DIR) $(SFDISK_SITE)/$(SFDISK_SOURCE) + +$(SFDISK_DIR): $(DL_DIR)/$(SFDISK_SOURCE) + bzcat $(DL_DIR)/$(SFDISK_SOURCE) | tar -C $(BUILD_DIR) -xvf - + +$(SFDISK_DIR)/sfdisk: $(SFDISK_DIR) + $(MAKE) CROSS=$(TARGET_CROSS) DEBUG=false -C $(SFDISK_DIR); + -$(STRIP) $(SFDISK_DIR)/sfdisk; + touch -c $(SFDISK_DIR)/sfdisk + +$(TARGET_DIR)/sbin/sfdisk: $(SFDISK_DIR)/sfdisk + cp $(SFDISK_DIR)/sfdisk $(TARGET_DIR)/sbin/sfdisk; + touch -c $(TARGET_DIR)/sbin/sfdisk + +sfdisk: uclibc $(TARGET_DIR)/sbin/sfdisk + +sfdisk-source: $(DL_DIR)/$(SFDISK_SOURCE) + +sfdisk-clean: + rm -f $(TARGET_DIR)/sbin/sfdisk + -$(MAKE) -C $(SFDISK_DIR) clean + +sfdisk-dirclean: + rm -rf $(SFDISK_DIR) + diff --git a/package/slang/slang.mk b/package/slang/slang.mk new file mode 100644 index 000000000..6a1cb0632 --- /dev/null +++ b/package/slang/slang.mk @@ -0,0 +1,48 @@ +############################################################# +# +# slang +# +############################################################# +SLANG_SOURCE=slang-1.4.5-mini.tar.bz2 +SLANG_SITE:=http://www.uclibc.org/ +SLANG_DIR=$(BUILD_DIR)/slang-1.4.5-mini +ifeq ($(BR2_LARGEFILE),y) +SLANG_CFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +endif +SLANG_CFLAGS+=-fPIC + +$(DL_DIR)/$(SLANG_SOURCE): + $(WGET) -P $(DL_DIR) $(SLANG_SITE)/$(SLANG_SOURCE) + +$(SLANG_DIR): $(DL_DIR)/$(SLANG_SOURCE) + bzcat $(DL_DIR)/$(SLANG_SOURCE) | tar -C $(BUILD_DIR) -xvf - + +$(SLANG_DIR)/libslang.so: $(SLANG_DIR) + $(MAKE) CFLAGS="-Os -g $(SLANG_CFLAGS)" CC=$(TARGET_CC) -C $(SLANG_DIR) + touch -c $(SLANG_DIR)/libslang.so; + +$(STAGING_DIR)/lib/libslang.so.1: $(SLANG_DIR)/libslang.so + cp -a $(SLANG_DIR)/libslang.a $(STAGING_DIR)/lib; + cp -a $(SLANG_DIR)/libslang.so $(STAGING_DIR)/lib; + cp -a $(SLANG_DIR)/slang.h $(STAGING_DIR)/include; + cp -a $(SLANG_DIR)/slcurses.h $(STAGING_DIR)/include; + (cd $(STAGING_DIR)/lib; ln -fs libslang.so libslang.so.1); + touch -c $(STAGING_DIR)/lib/libslang.so.1 + +$(TARGET_DIR)/lib/libslang.so.1: $(STAGING_DIR)/lib/libslang.so.1 + cp -a $(STAGING_DIR)/lib/libslang.so* $(TARGET_DIR)/lib; + -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libslang.so* + touch -c $(TARGET_DIR)/lib/libslang.so.1 + +slang: uclibc $(STAGING_DIR)/lib/libslang.so.1 $(TARGET_DIR)/lib/libslang.so.1 + +slang-source: $(DL_DIR)/$(SLANG_SOURCE) + +slang-clean: + rm -f $(TARGET_DIR)/lib/libslang.so* + -$(MAKE) -C $(SLANG_DIR) clean + +slang-dirclean: + rm -rf $(SLANG_DIR) + + diff --git a/package/socat/socat.mk b/package/socat/socat.mk new file mode 100644 index 000000000..010326d64 --- /dev/null +++ b/package/socat/socat.mk @@ -0,0 +1,67 @@ +############################################################# +# +# socat +# +############################################################# + +SOCAT_VERSION=1.3.0.1 + +# Don't alter below this line unless you (think) you know +# what you are doing! Danger, Danger! + +SOCAT_SOURCE=socat-$(SOCAT_VERSION).tar.bz2 +SOCAT_SITE=http://www.dest-unreach.org/socat/download/ +#SOCAT_DIR=$(BUILD_DIR)/${shell basename $(SOCAT_SOURCE) .tar.bz2} +SOCAT_DIR=$(BUILD_DIR)/socat-1.3 +#SOCAT_WORKDIR=$(BUILD_DIR)/socat_workdir +SOCAT_WORKDIR=$(SOCAT_DIR) + +$(DL_DIR)/$(SOCAT_SOURCE): + $(WGET) -P $(DL_DIR) $(SOCAT_SITE)/$(SOCAT_SOURCE) + +$(SOCAT_DIR)/.unpacked: $(DL_DIR)/$(SOCAT_SOURCE) + bzip2 -d -c $(DL_DIR)/$(SOCAT_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(SOCAT_DIR)/.unpacked + +$(SOCAT_WORKDIR)/Makefile: $(SOCAT_DIR)/.unpacked + rm -f $(SOCAT_WORKDIR)/Makefile + mkdir -p $(SOCAT_WORKDIR) + (cd $(SOCAT_WORKDIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + $(SOCAT_DIR)/configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + ); + +$(SOCAT_WORKDIR)/socat: $(SOCAT_WORKDIR)/Makefile + rm -f $@ + $(MAKE) -C $(SOCAT_WORKDIR) + +$(SOCAT_WORKDIR)/.installed: $(SOCAT_WORKDIR)/socat + mkdir -p $(TARGET_DIR)/usr/man/man1 + $(MAKE) -C $(SOCAT_WORKDIR) install prefix=$(TARGET_DIR)/usr + +socat: uclibc $(SOCAT_WORKDIR)/.installed + +socat-source: $(DL_DIR)/$(SOCAT_SOURCE) + +socat-clean: + @if [ -d $(SOCAT_WORKDIR)/Makefile ] ; then \ + $(MAKE) -C $(SOCAT_WORKDIR) clean ; \ + fi; + +socat-dirclean: + rm -rf $(SOCAT_DIR) $(SOCAT_WORKDIR) + diff --git a/package/squashfsroot/squashfsroot.mk b/package/squashfsroot/squashfsroot.mk new file mode 100644 index 000000000..523d5e2a9 --- /dev/null +++ b/package/squashfsroot/squashfsroot.mk @@ -0,0 +1,51 @@ +############################################################# +# +# mksquashfs to build to target squashfs filesystems +# +############################################################# +SQUASHFS_DIR=$(BUILD_DIR)/squashfs1.3r3 +SQUASHFS_SOURCE=squashfs1.3r3.tar.gz +SQUASHFS_SITE=http://aleron.dl.sourceforge.net/sourceforge/squashfs + +$(DL_DIR)/$(SQUASHFS_SOURCE): + $(WGET) -P $(DL_DIR) $(SQUASHFS_SITE)/$(SQUASHFS_SOURCE) + +$(SQUASHFS_DIR): $(DL_DIR)/$(SQUASHFS_SOURCE) #$(SQUASHFS_PATCH) + zcat $(DL_DIR)/$(SQUASHFS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(SOURCE_DIR)/patch-kernel.sh $(SQUASHFS_DIR) $(SOURCE_DIR) squashfs.patch + +$(SQUASHFS_DIR)/squashfs-tools/mksquashfs: $(SQUASHFS_DIR) + $(MAKE) -C $(SQUASHFS_DIR)/squashfs-tools; + +squashfs: $(SQUASHFS_DIR)/squashfs-tools/mksquashfs + +squashfs-source: $(DL_DIR)/$(SQUASHFS_SOURCE) + +squashfs-clean: + -$(MAKE) -C $(SQUASHFS_DIR)/squashfs-tools clean + +squashfs-dirclean: + rm -rf $(SQUASHFS_DIR) + +############################################################# +# +# Build the squashfs root filesystem image +# +############################################################# + +squashfsroot: squashfs + #-@find $(TARGET_DIR)/lib -type f -name \*.so\* | xargs $(STRIP) --strip-unneeded 2>/dev/null || true; + -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true; + @rm -rf $(TARGET_DIR)/usr/man + @rm -rf $(TARGET_DIR)/usr/info + #$(SQUASHFS_DIR)/squashfs-tools/mksquashfs -q -D $(SOURCE_DIR)/device_table.txt $(TARGET_DIR) $(IMAGE) + $(SQUASHFS_DIR)/squashfs-tools/mksquashfs $(TARGET_DIR) $(IMAGE) -noappend -root-owned + +squashfsroot-source: squashfs-source + +squashfsroot-clean: + -$(MAKE) -C $(SQUASHFS_DIR) clean + +squashfsroot-dirclean: + rm -rf $(SQUASHFS_DIR) + diff --git a/package/strace/strace.mk b/package/strace/strace.mk new file mode 100644 index 000000000..cae5463b8 --- /dev/null +++ b/package/strace/strace.mk @@ -0,0 +1,60 @@ +############################################################# +# +# strace +# +############################################################# +STRACE_VER:=4.5.7 +STRACE_SOURCE:=strace-$(STRACE_VER).tar.bz2 +STRACE_SITE:=http://aleron.dl.sourceforge.net/sourceforge/strace +STRACE_CAT:=bzcat +STRACE_DIR:=$(BUILD_DIR)/strace-$(STRACE_VER) + + +$(DL_DIR)/$(STRACE_SOURCE): + $(WGET) -P $(DL_DIR) $(STRACE_SITE)/$(STRACE_SOURCE) + +strace-source: $(DL_DIR)/$(STRACE_SOURCE) + +$(STRACE_DIR)/.unpacked: $(DL_DIR)/$(STRACE_SOURCE) + $(STRACE_CAT) $(DL_DIR)/$(STRACE_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(STRACE_DIR)/.unpacked + +$(STRACE_DIR)/.configured: $(STRACE_DIR)/.unpacked + (cd $(STRACE_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + ); + touch $(STRACE_DIR)/.configured + +$(STRACE_DIR)/strace: $(STRACE_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(STRACE_DIR) + +$(TARGET_DIR)/usr/bin/strace: $(STRACE_DIR)/strace + install -c $(STRACE_DIR)/strace $(TARGET_DIR)/usr/bin/strace + $(STRIP) $(TARGET_DIR)/usr/bin/strace > /dev/null 2>&1 + +strace: uclibc $(TARGET_DIR)/usr/bin/strace + +strace-clean: + $(MAKE) -C $(STRACE_DIR) clean + +strace-dirclean: + rm -rf $(STRACE_DIR) + + diff --git a/package/tar/tar.mk b/package/tar/tar.mk new file mode 100644 index 000000000..e0ef47e44 --- /dev/null +++ b/package/tar/tar.mk @@ -0,0 +1,67 @@ +############################################################# +# +# tar +# +############################################################# +GNUTAR_VER:=1.14 +GNUTAR_SOURCE:=tar-$(GNUTAR_VER).tar.bz2 +GNUTAR_SITE:=ftp://alpha.gnu.org/gnu/tar +GNUTAR_DIR:=$(BUILD_DIR)/tar-$(GNUTAR_VER) +GNUTAR_CAT:=bzcat +GNUTAR_BINARY:=src/tar +GNUTAR_TARGET_BINARY:=bin/tar + +$(DL_DIR)/$(GNUTAR_SOURCE): + $(WGET) -P $(DL_DIR) $(GNUTAR_SITE)/$(GNUTAR_SOURCE) + +tar-source: $(DL_DIR)/$(GNUTAR_SOURCE) + +$(GNUTAR_DIR)/.unpacked: $(DL_DIR)/$(GNUTAR_SOURCE) + $(GNUTAR_CAT) $(DL_DIR)/$(GNUTAR_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(GNUTAR_DIR)/.unpacked + +$(GNUTAR_DIR)/.configured: $(GNUTAR_DIR)/.unpacked + (cd $(GNUTAR_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(DISABLE_LARGEFILE) \ + ); + touch $(GNUTAR_DIR)/.configured + +$(GNUTAR_DIR)/$(GNUTAR_BINARY): $(GNUTAR_DIR)/.configured + $(MAKE) -C $(GNUTAR_DIR) + +# This stuff is needed to work around GNU make deficiencies +tar-target_binary: $(GNUTAR_DIR)/$(GNUTAR_BINARY) + @if [ -L $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) ] ; then \ + rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); fi; + @if [ ! -f $(GNUTAR_DIR)/$(GNUTAR_BINARY) -o $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) \ + -ot $(GNUTAR_DIR)/$(GNUTAR_BINARY) ] ; then \ + set -x; \ + rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); \ + cp -a $(GNUTAR_DIR)/$(GNUTAR_BINARY) $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); fi ; + +tar: uclibc tar-target_binary + +tar-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUTAR_DIR) uninstall + -$(MAKE) -C $(GNUTAR_DIR) clean + +tar-dirclean: + rm -rf $(GNUTAR_DIR) + diff --git a/package/tinylogin/tinylogin.mk b/package/tinylogin/tinylogin.mk new file mode 100644 index 000000000..549de76b6 --- /dev/null +++ b/package/tinylogin/tinylogin.mk @@ -0,0 +1,52 @@ +############################################################# +# +# tinylogin +# +############################################################# +# Enable this to use the tinylogin daily snapshot +USE_TINYLOGIN_SNAPSHOT=true + +ifeq ($(USE_TINYLOGIN_SNAPSHOT),true) +# Be aware that this changes daily.... +TINYLOGIN_DIR:=$(BUILD_DIR)/tinylogin +TINYLOGIN_SOURCE:=tinylogin-snapshot.tar.bz2 +TINYLOGIN_SITE:=http://tinylogin.busybox.net/downloads/snapshots +else +TINYLOGIN_DIR:=$(BUILD_DIR)/tinylogin-1.4 +TINYLOGIN_SOURCE:=tinylogin-1.4.tar.bz2 +TINYLOGIN_SITE:=http://tinylogin.busybox.net/downloads +endif + +$(DL_DIR)/$(TINYLOGIN_SOURCE): + $(WGET) -P $(DL_DIR) $(TINYLOGIN_SITE)/$(TINYLOGIN_SOURCE) + +tinylogin-source: $(DL_DIR)/$(TINYLOGIN_SOURCE) + +$(TINYLOGIN_DIR)/Config.h: $(DL_DIR)/$(TINYLOGIN_SOURCE) + bzcat $(DL_DIR)/$(TINYLOGIN_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(SED) "s/\`id -u\` -ne 0/0 == 1/" \ + $(TINYLOGIN_DIR)/install.sh + $(SED) "s/4755 --owner=root --group=root/755/" \ + $(TINYLOGIN_DIR)/install.sh + $(SED) "s/^DOSTATIC.*/DOSTATIC=false/g;" $(TINYLOGIN_DIR)/Makefile + $(SED) "s/^DODEBUG.*/DODEBUG=false/g;" $(TINYLOGIN_DIR)/Makefile + # date test this one + touch $(TINYLOGIN_DIR)/Config.h + +$(TINYLOGIN_DIR)/tinylogin: $(TINYLOGIN_DIR)/Config.h + $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" \ + CFLAGS_EXTRA="$(TARGET_CFLAGS)" -C $(TINYLOGIN_DIR) + +$(TARGET_DIR)/bin/tinylogin: $(TINYLOGIN_DIR)/tinylogin + $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" \ + PREFIX="$(TARGET_DIR)" -C $(TINYLOGIN_DIR) \ + CFLAGS_EXTRA="$(TARGET_CFLAGS)" install + +tinylogin: uclibc $(TARGET_DIR)/bin/tinylogin + +tinylogin-clean: + rm -f $(TARGET_DIR)/bin/tinylogin + -$(MAKE) -C $(TINYLOGIN_DIR) clean + +tinylogin-dirclean: + rm -rf $(TINYLOGIN_DIR) diff --git a/package/tinyx/tinyx.mk b/package/tinyx/tinyx.mk new file mode 100644 index 000000000..1455ae6d8 --- /dev/null +++ b/package/tinyx/tinyx.mk @@ -0,0 +1,128 @@ +############################################################# +# +# tinyx - a small footprint X-server for the TuxScreen +# +############################################################# +# Copyright (C) 2002 by Tom Walsh <Tom@OpenHardware.net> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA +# +############################################################# +# You may want to change these. +############################################################# + +TINYX_APPS:=xlsfonts/xlsfonts xmodmap/xmodmap +#xset/xset xdpyinfo/xdpyinfo xsetroot/xsetroot \ +# xrdb/xrdb xrandr/xrandr \ +# xhost/xhost xauth/xauth oclock/oclock xeyes/xeyes +# + +TINYX_LIBS:=ICE X11 Xext Xpm +# Xaw SM Xt Xmu + +############################################################# +# Stuff below this line shouldn't need changes. +# if you do change, look in rxvt & matchbox for the impact! +############################################################# +# +# Where resources are found. +# +TINYX_DIR:=$(BUILD_DIR)/xc-011010 +TINYX_LDIR:=$(TINYX_DIR)/lib +TINYX_PROGS:=$(TINYX_DIR)/programs +TINYX_PATCH:=$(SOURCE_DIR)/tinyx-011010.patch +TINYX_SOURCE:=xc-011010.tar.bz2 +TINYX_SITE:= http://intimate.handhelds.org/jacques/ +TINYX_CF:=$(TINYX_DIR)/config/cf +# +# Some things that you may want to change. +TINYX_XFBDEV:=$(TINYX_DIR)/programs/Xserver/Xfbdev +TINYX_CAT:=bzcat +TINYX_BINX:=$(TARGET_DIR)/usr/X11R6/bin/ +TINYX_LIBX:=$(TARGET_DIR)/usr/lib/ + +# +# These rules fetch various tinyx source files. +# +$(DL_DIR)/$(TINYX_SOURCE): + $(WGET) -P $(DL_DIR) $(TINYX_SITE)/$(TINYX_SOURCE) + +$(DL_DIR)/cross.def: + $(WGET) -P $(DL_DIR) $(TINYX_SITE)/xcompile/tuxscreen/cross.def + $(SED) 's:arm-uclibc-:$(ARCH)-linux-uclibc-:g' $(DL_DIR)/cross.def + +$(DL_DIR)/host.def: + $(WGET) -P $(DL_DIR) $(TINYX_SITE)/xcompile/tuxscreen/host.def + +# +# rule to make sure that we have the source, and it is configured. +# +$(TINYX_DIR)/.configure: $(DL_DIR)/$(TINYX_SOURCE) $(DL_DIR)/cross.def $(DL_DIR)/host.def + $(TINYX_CAT) $(DL_DIR)/$(TINYX_SOURCE) | tar -C $(BUILD_DIR) -xvf - + cat $(TINYX_PATCH) | patch -d $(TINYX_DIR) -p1 + cp $(DL_DIR)/host.def $(TINYX_CF)/host.def + cp $(DL_DIR)/cross.def $(TINYX_CF)/cross.def + $(SED) 's,arm-uclibc-,$(ARCH)-linux-uclibc-,g' $(TINYX_CF)/cross.def + $(SED) 's:REPLACE_STAGING_DIR:$(STAGING_DIR):g' \ + $(TINYX_CF)/cross.def \ + $(TINYX_LDIR)/X11/Xlib.h + touch $(TINYX_DIR)/.configure + +# +# Now that we have the source, build it... +# +$(TINYX_XFBDEV): $(TINYX_DIR)/.configure + rm -f $(TINYX_BINX)/Xfbdev + ( cd $(TINYX_DIR) ; $(MAKE) World ; cd $(BUILDROOT) ) + +# +# Once Frame Buffer is built, we install executables. +# +$(TINYX_BINX)/Xfbdev: $(TINYX_XFBDEV) + -mkdir $(TARGET_DIR)/usr/X11R6 + -mkdir $(TINYX_BINX) + for file in $(TINYX_APPS) ; do \ + cp -f $(TINYX_DIR)/programs/$$file $(TINYX_BINX) ; \ + $(STRIP) $(TINYX_PROGS)/$$file ; \ + done + cp $(TINYX_DIR)/programs/Xserver/Xfbdev $(TINYX_BINX) + $(STRIP) $(TINYX_BINX)/Xfbdev + cp -f $(TINYX_DIR)/startx $(TARGET_DIR)/bin + chmod a+x $(TARGET_DIR)/bin/startx + +# +# After we have executables installed, install the libraries. +# +$(TINYX_LIBX)/libX11.so.6.2: $(TINYX_XFBDEV) + for dirs in $(TINYX_LIBS) ; do \ + file=`find $(TINYX_LDIR)/$$dirs -type f -iname "lib$$dirs.so*"` ; \ + $(STRIP) --strip-unneeded $$file ; \ + cp -f $$file $(TINYX_LIBX) ; \ + file=`find $(TINYX_LDIR)/$$dirs -type l -iname "lib$$dirs.so*"` ; \ + cp -pRf $$file $(TINYX_LIBX) ; \ + done + +tinyx: zlib $(TINYX_LIBX)/libX11.so.6.2 $(TINYX_BINX)/Xfbdev + +tinyx-source: $(DL_DIR)/$(TINYX_SOURCE) + +tinyx-clean: + -rm -rf $(TARGET_DIR)/usr/X11R6 + -$(MAKE) -C $(TINYX_DIR) clean + +tinyx-dirclean: + -rm -rf $(TINYX_DIR) + -rm -rf $(TARGET_DIR)/usr/X11R6 diff --git a/package/tn5250/tn5250.mk b/package/tn5250/tn5250.mk new file mode 100644 index 000000000..6fcc160d6 --- /dev/null +++ b/package/tn5250/tn5250.mk @@ -0,0 +1,51 @@ +TN5250_SITE:=http://aleron.dl.sourceforge.net/sourceforge/tn5250 +TN5250_DIR:=$(BUILD_DIR)/tn5250-0.16.4 +TN5250_SOURCE:=tn5250-0.16.4.tar.gz + +$(DL_DIR)/$(TN5250_SOURCE): + $(WGET) -P $(DL_DIR) $(TN5250_SITE)/$(TN5250_SOURCE) + +$(TN5250_DIR)/.dist: $(DL_DIR)/$(TN5250_SOURCE) + gunzip -c $(DL_DIR)/$(TN5250_SOURCE) | tar -C $(BUILD_DIR) -xvf - + -touch $(TN5250_DIR)/.dist + +$(TN5250_DIR)/.configured: $(TN5250_DIR)/.dist + (cd $(TN5250_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 \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + --with-slang --without-x --without-ssl \ + ); + touch $(TN5250_DIR)/.configured + +$(TN5250_DIR)/tn5250: $(TN5250_DIR)/.configured + $(MAKE) CC=$(TARGET_CC) -C $(TN5250_DIR) + +$(TARGET_DIR)/usr/bin/tn5250: $(TN5250_DIR)/tn5250 + install -c $(TN5250_DIR)/tn5250 $(TARGET_DIR)/usr/bin/tn5250 + +tn5250: uclibc slang $(TARGET_DIR)/usr/bin/tn5250 + +tn5250-source: $(DL_DIR)/$(TN5250_SOURCE) + +tn5250-clean: + $(MAKE) -C $(TN5250_DIR) clean + +tn5250-dirclean: + rm -rf $(TN5250_DIR) + + + diff --git a/package/ttcp/ttcp.mk b/package/ttcp/ttcp.mk new file mode 100644 index 000000000..7ff5f6315 --- /dev/null +++ b/package/ttcp/ttcp.mk @@ -0,0 +1,37 @@ +############################################################# +# +# ttcp +# +############################################################# +# +TTCP_SOURCE_URL=http://ftp.sunet.se/ftp/pub/network/monitoring/ttcp +TTCP_SOURCE=ttcp.c +TTCP_BUILD_DIR=$(BUILD_DIR)/ttcp + +$(DL_DIR)/$(TTCP_SOURCE): + $(WGET) -P $(DL_DIR) $(TTCP_SOURCE_URL)/$(TTCP_SOURCE) + +$(TTCP_BUILD_DIR)/.unpacked: $(DL_DIR)/$(TTCP_SOURCE) + -mkdir $(TTCP_BUILD_DIR) + cp -af $(DL_DIR)/$(TTCP_SOURCE) $(TTCP_BUILD_DIR) + touch $(TTCP_BUILD_DIR)/.unpacked + +$(TTCP_BUILD_DIR)/.configured: $(TTCP_BUILD_DIR)/.unpacked + touch $(TTCP_BUILD_DIR)/.configured + +$(TTCP_BUILD_DIR)/ttcp: $(TTCP_BUILD_DIR)/.configured + $(TARGET_CC) -O2 -o $(TTCP_BUILD_DIR)/ttcp $(TTCP_BUILD_DIR)/$(TTCP_SOURCE) + +$(TARGET_DIR)/usr/bin/ttcp: $(TTCP_BUILD_DIR)/ttcp + cp -af $(TTCP_BUILD_DIR)/ttcp $(TARGET_DIR)/usr/bin/ + +ttcp: $(TARGET_DIR)/usr/bin/ttcp + +ttcp-source: $(DL_DIR)/$(TTCP_SOURCE) + +ttcp-clean: + rm -f $(TTCP_BUILD_DIR)/*.o $(TTCP_BUILD_DIR)/ttcp + +ttcp-dirclean: + rm -rf $(TTCP_BUILD_DIR) + diff --git a/package/udhcp/udhcp.mk b/package/udhcp/udhcp.mk new file mode 100644 index 000000000..46cb203d0 --- /dev/null +++ b/package/udhcp/udhcp.mk @@ -0,0 +1,64 @@ +############################################################# +# +# uchdp DHCP client and/or server +# +############################################################# +# Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org> +# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA + +UDHCP_SOURCE:=udhcp-0.9.8.tar.gz +UDHCP_SITE:=http://udhcp.busybox.net/downloads/ +UDHCP_DIR:=$(BUILD_DIR)/udhcp-0.9.8 + +$(DL_DIR)/$(UDHCP_SOURCE): + $(WGET) -P $(DL_DIR) $(UDHCP_SITE)/$(UDHCP_SOURCE) + +udhcp-source: $(DL_DIR)/$(UDHCP_SOURCE) + +$(UDHCP_DIR)/.unpacked: $(DL_DIR)/$(UDHCP_SOURCE) + zcat $(DL_DIR)/$(UDHCP_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(UDHCP_DIR)/.unpacked + +#$(UDHCP_DIR)/.unpacked: +# (cd $(BUILD_DIR); \ +# CVS_PASSFILE=$(CVS_PASSFILE) \ +# cvs -z3 -d:pserver:anonymous@busybox.net:/var/cvs co udhcp ) +# touch $(UDHCP_DIR)/.unpacked + +$(UDHCP_DIR)/udhcpc: $(UDHCP_DIR)/.unpacked + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" prefix="$(TARGET_DIR)" -C $(UDHCP_DIR) + +$(TARGET_DIR)/sbin/udhcpc: $(UDHCP_DIR)/udhcpc + $(SED) 's/pump/udhcpc/' $(TARGET_DIR)/etc/pcmcia/network* + $(SED) 's/PUMP/UDHCPC/' $(TARGET_DIR)/etc/pcmcia/network* + $(SED) 's/DHCP="n"/DHCP="y"/' $(TARGET_DIR)/etc/pcmcia/network* + mkdir -p $(TARGET_DIR)/sbin + rm -f $(TARGET_DIR)/sbin/udhcpc + cp $(UDHCP_DIR)/udhcpc $(TARGET_DIR)/sbin/ + mkdir -p $(TARGET_DIR)/usr/share/udhcpc + cp $(UDHCP_DIR)/samples/simple.script $(TARGET_DIR)/usr/share/udhcpc/default.script + chmod a+x $(TARGET_DIR)/sbin/udhcpc $(TARGET_DIR)/usr/share/udhcpc/default.script + +udhcp: uclibc $(TARGET_DIR)/sbin/udhcpc + +udhcp-clean: + rm -f $(TARGET_DIR)/sbin/udhcpc + -$(MAKE) -C $(UDHCP_DIR) clean + +udhcp-dirclean: + rm -rf $(UDHCP_DIR) diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk new file mode 100644 index 000000000..1cc828bcd --- /dev/null +++ b/package/util-linux/util-linux.mk @@ -0,0 +1,75 @@ +############################################################# +# +# util-linux +# +############################################################# +UTIL-LINUX_SOURCE:=util-linux_2.12.orig.tar.gz +UTIL-LINUX_SITE:=http://ftp.debian.org/debian/pool/main/u/util-linux/ +UTIL-LINUX_PATCH:=util-linux_2.12-10.diff.gz +UTIL-LINUX_CAT:=zcat +UTIL-LINUX_DIR:=$(BUILD_DIR)/util-linux-2.12 +UTIL-LINUX_BINARY:=$(UTIL-LINUX_DIR)/misc-utils/mcookie +UTIL-LINUX_TARGET_BINARY:=$(TARGET_DIR)/usr/bin/mcookie + +$(DL_DIR)/$(UTIL-LINUX_SOURCE): + $(WGET) -P $(DL_DIR) $(UTIL-LINUX_SITE)/$(UTIL-LINUX_SOURCE) + +$(DL_DIR)/$(UTIL-LINUX_PATCH): + $(WGET) -P $(DL_DIR) $(UTIL-LINUX_SITE)/$(UTIL-LINUX_PATCH) + +$(UTIL-LINUX_DIR)/.unpacked: $(DL_DIR)/$(UTIL-LINUX_SOURCE) $(DL_DIR)/$(UTIL-LINUX_PATCH) + $(UTIL-LINUX_CAT) $(DL_DIR)/$(UTIL-LINUX_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(UTIL-LINUX_CAT) $(DL_DIR)/$(UTIL-LINUX_PATCH) | patch -p1 -d $(UTIL-LINUX_DIR) + cat $(SOURCE_DIR)/util-linux.patch | patch -p1 -d $(UTIL-LINUX_DIR) + touch $(UTIL-LINUX_DIR)/.unpacked + +$(UTIL-LINUX_DIR)/.configured: $(UTIL-LINUX_DIR)/.unpacked + (cd $(UTIL-LINUX_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + ARCH=$(ARCH) \ + ); + $(SED) "s,^INSTALLSUID=.*,INSTALLSUID=\\$$\(INSTALL\) -m \\$$\(BINMODE\)," \ + $(UTIL-LINUX_DIR)/MCONFIG + $(SED) "s,^USE_TTY_GROUP=.*,USE_TTY_GROUP=no," $(UTIL-LINUX_DIR)/MCONFIG + touch $(UTIL-LINUX_DIR)/.configured + +$(UTIL-LINUX_BINARY): $(UTIL-LINUX_DIR)/.configured + $(MAKE) \ + -C $(UTIL-LINUX_DIR) \ + ARCH=$(ARCH) \ + CC=$(TARGET_CC) \ + OPT="$(TARGET_CFLAGS)" \ + HAVE_SLANG="NO" + +$(UTIL-LINUX_TARGET_BINARY): $(UTIL-LINUX_BINARY) + $(MAKE) ARCH=$(ARCH) DESTDIR=$(TARGET_DIR) USE_TTY_GROUP=no -C $(UTIL-LINUX_DIR) install + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/share/info \ + $(TARGET_DIR)/usr/share/man $(TARGET_DIR)/usr/share/doc + +util-linux: uclibc $(UTIL-LINUX_TARGET_BINARY) + +util-linux-source: $(DL_DIR)/$(UTIL-LINUX_SOURCE) + +util-linux-clean: + #There is no working 'uninstall' target. Just skip it... + #$(MAKE) DESTDIR=$(TARGET_DIR) -C $(UTIL-LINUX_DIR) uninstall + -$(MAKE) -C $(UTIL-LINUX_DIR) clean + +util-linux-dirclean: + rm -rf $(UTIL-LINUX_DIR) + + diff --git a/package/valgrind/valgrind.mk b/package/valgrind/valgrind.mk new file mode 100644 index 000000000..ed295a3cf --- /dev/null +++ b/package/valgrind/valgrind.mk @@ -0,0 +1,88 @@ +############################################################# +# +# valgrind +# +############################################################# + +VALGRIND_SITE:=http://developer.kde.org/~sewardj/ +VALGRIND_DIR:=$(BUILD_DIR)/valgrind-2.1.1 +VALGRIND_SOURCE:=valgrind-2.1.1.tar.bz2 +VALGRIND_PATCH:=$(SOURCE_DIR)/valgrind.patch + +$(DL_DIR)/$(VALGRIND_SOURCE): + $(WGET) -P $(DL_DIR) $(VALGRIND_SITE)/$(VALGRIND_SOURCE) + +$(VALGRIND_DIR)/.unpacked: $(DL_DIR)/$(VALGRIND_SOURCE) + bzcat $(DL_DIR)/$(VALGRIND_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(VALGRIND_DIR)/.unpacked + +$(VALGRIND_DIR)/.patched: $(VALGRIND_DIR)/.unpacked + cat $(VALGRIND_PATCH) | patch -d $(VALGRIND_DIR) -p1 + touch $(VALGRIND_DIR)/.patched + +$(VALGRIND_DIR)/.configured: $(VALGRIND_DIR)/.patched + (cd $(VALGRIND_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 \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + --without-uiout --disable-valgrindmi \ + --disable-tui --disable-valgrindtk \ + --without-x --without-included-gettext \ + ); + touch $(VALGRIND_DIR)/.configured + +$(VALGRIND_DIR)/coregrind/valgrind.so: $(VALGRIND_DIR)/.configured + $(MAKE) -C $(VALGRIND_DIR) + -$(STRIP) --strip-unneeded $(VALGRIND_DIR)/*.so* + touch -c $(VALGRIND_DIR)/coregrind/valgrind.so + +$(TARGET_DIR)/usr/bin/valgrind: $(VALGRIND_DIR)/coregrind/valgrind.so + $(MAKE) \ + prefix=$(TARGET_DIR)/usr \ + exec_prefix=$(TARGET_DIR)/usr \ + bindir=$(TARGET_DIR)/usr/bin \ + sbindir=$(TARGET_DIR)/usr/sbin \ + libexecdir=$(TARGET_DIR)/usr/lib \ + datadir=$(TARGET_DIR)/usr/share \ + sysconfdir=$(TARGET_DIR)/etc \ + sharedstatedir=$(TARGET_DIR)/usr/com \ + localstatedir=$(TARGET_DIR)/var \ + libdir=$(TARGET_DIR)/usr/lib \ + infodir=$(TARGET_DIR)/usr/info \ + mandir=$(TARGET_DIR)/usr/man \ + includedir=$(TARGET_DIR)/usr/include \ + -C $(VALGRIND_DIR) install; + rm -rf $(TARGET_DIR)/usr/share/doc/valgrind + #mkdir -p $(TARGET_DIR)/etc/default + #cp $(VALGRIND_DIR)/valgrind.default $(TARGET_DIR)/etc/default/valgrind + #mkdir -p $(TARGET_DIR)/usr/lib/valgrind + #cp $(VALGRIND_DIR)/woody.supp $(TARGET_DIR)/usr/lib/valgrind/ + touch -c $(TARGET_DIR)/usr/bin/valgrind + +ifeq ($(ARCH),i386) +valgrind: $(TARGET_DIR)/usr/bin/valgrind +else +valgrind: +endif + +valgrind-source: $(DL_DIR)/$(VALGRIND_SOURCE) + +valgrind-clean: + $(MAKE) -C $(VALGRIND_DIR) clean + +valgrind-dirclean: + rm -rf $(VALGRIND_DIR) + diff --git a/package/vtun/vtun.mk b/package/vtun/vtun.mk new file mode 100644 index 000000000..595a6f82b --- /dev/null +++ b/package/vtun/vtun.mk @@ -0,0 +1,66 @@ +############################################################# +# +# vtun +# +# NOTE: Uses start-stop-daemon in init script, so be sure +# to enable that within busybox +# +############################################################# +VTUN_SOURCE:=vtun-2.6.tar.gz +VTUN_SITE:=http://aleron.dl.sourceforge.net/sourceforge/vtun/ +VTUN_DIR:=$(BUILD_DIR)/vtun-2.6 +VTUN_CAT:=zcat +VTUN_BINARY:=vtund +VTUN_TARGET_BINARY:=usr/sbin/vtund +VTUN_PATCH:=$(SOURCE_DIR)/vtun.patch + +$(DL_DIR)/$(VTUN_SOURCE): + $(WGET) -P $(DL_DIR) $(VTUN_SITE)/$(VTUN_SOURCE) + +vtun-source: $(DL_DIR)/$(VTUN_SOURCE) + +$(VTUN_DIR)/.unpacked: $(DL_DIR)/$(VTUN_SOURCE) + $(VTUN_CAT) $(DL_DIR)/$(VTUN_SOURCE) | tar -C $(BUILD_DIR) -xvf - + mv $(BUILD_DIR)/vtun $(VTUN_DIR) + cat $(VTUN_PATCH) | patch -p1 -d $(VTUN_DIR) + touch $(VTUN_DIR)/.unpacked + +$(VTUN_DIR)/.configured: $(VTUN_DIR)/.unpacked zlib lzo openssl + (cd $(VTUN_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 \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --with-ssl-headers=$(STAGING_DIR)/include/openssl \ + --with-lzo-headers=$(STAGING_DIR)/include \ + ); + touch $(VTUN_DIR)/.configured + +$(VTUN_DIR)/$(VTUN_BINARY): $(VTUN_DIR)/.configured + $(MAKE) -C $(VTUN_DIR) + +$(TARGET_DIR)/$(VTUN_TARGET_BINARY): $(VTUN_DIR)/$(VTUN_BINARY) + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(VTUN_DIR) install + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +vtun: uclibc $(TARGET_DIR)/$(VTUN_TARGET_BINARY) + +vtun-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(VTUN_DIR) uninstall + -$(MAKE) -C $(VTUN_DIR) clean + +vtun-dirclean: + rm -rf $(VTUN_DIR) + diff --git a/package/wget/wget.mk b/package/wget/wget.mk new file mode 100644 index 000000000..3b67b3faa --- /dev/null +++ b/package/wget/wget.mk @@ -0,0 +1,49 @@ +############################################################# +# +# wget +# +############################################################# +WGET_VER:=1.9.1 +WGET_SOURCE:=wget-$(WGET_VER).tar.gz +WGET_SITE:=ftp://mirrors.kernel.org/gnu/wget +WGET_DIR:=$(BUILD_DIR)/wget-$(WGET_VER) +WGET_CAT:=zcat +WGET_BINARY:=src/wget +WGET_TARGET_BINARY:=bin/wget + +$(DL_DIR)/$(WGET_SOURCE): + $(WGET) -P $(DL_DIR) $(WGET_SITE)/$(WGET_SOURCE) + +$(WGET_DIR)/.unpacked: $(DL_DIR)/$(WGET_SOURCE) + $(WGET_CAT) $(DL_DIR)/$(WGET_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(WGET_DIR)/.unpacked + +$(WGET_DIR)/.configured: $(WGET_DIR)/.unpacked + (cd $(WGET_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) CC_FOR_BUILD=$(HOSTCC) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/ \ + --disable-ipv6 \ + $(DISABLE_NLS) \ + --without-ssl \ + ); + touch $(WGET_DIR)/.configured + +$(WGET_DIR)/$(WGET_BINARY): $(WGET_DIR)/.configured + $(TARGET_CONFIGURE_OPTS) $(MAKE) CC=$(TARGET_CC) -C $(WGET_DIR) + +$(TARGET_DIR)/$(WGET_TARGET_BINARY): $(WGET_DIR)/$(WGET_BINARY) + install -D $(WGET_DIR)/$(WGET_BINARY) $(TARGET_DIR)/$(WGET_TARGET_BINARY) + +wget: uclibc $(TARGET_DIR)/$(WGET_TARGET_BINARY) + +wget-clean: + rm -f $(TARGET_DIR)/$(WGET_TARGET_BINARY) + -$(MAKE) -C $(WGET_DIR) clean + +wget-dirclean: + rm -rf $(WGET_DIR) diff --git a/package/wtools/wtools.mk b/package/wtools/wtools.mk new file mode 100644 index 000000000..53ed4ff57 --- /dev/null +++ b/package/wtools/wtools.mk @@ -0,0 +1,50 @@ +############################################################# +# +# wtools - Wireless Tools +# +############################################################# +# +WTOOLS_SOURCE_URL=http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux +WTOOLS_SOURCE=wireless_tools.26.tar.gz +WTOOLS_BUILD_DIR=$(BUILD_DIR)/wireless_tools.26 + +$(DL_DIR)/$(WTOOLS_SOURCE): + $(WGET) -P $(DL_DIR) $(WTOOLS_SOURCE_URL)/$(WTOOLS_SOURCE) + +$(WTOOLS_BUILD_DIR)/.unpacked: $(DL_DIR)/$(WTOOLS_SOURCE) + zcat $(DL_DIR)/$(WTOOLS_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(WTOOLS_BUILD_DIR)/.unpacked + +$(WTOOLS_BUILD_DIR)/.configured: $(WTOOLS_BUILD_DIR)/.unpacked + touch $(WTOOLS_BUILD_DIR)/.configured + +$(WTOOLS_BUILD_DIR)/iwconfig: $(WTOOLS_BUILD_DIR)/.configured + $(MAKE) -C $(WTOOLS_BUILD_DIR) \ + CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" \ + BUILD_SHARED=y # may want to make this an option + +$(TARGET_DIR)/sbin/iwconfig: $(WTOOLS_BUILD_DIR)/iwconfig + # Copy The Wireless Tools + cp -af $(WTOOLS_BUILD_DIR)/iwconfig $(TARGET_DIR)/sbin/ + cp -af $(WTOOLS_BUILD_DIR)/iwevent $(TARGET_DIR)/sbin/ + cp -af $(WTOOLS_BUILD_DIR)/iwgetid $(TARGET_DIR)/sbin/ + cp -af $(WTOOLS_BUILD_DIR)/iwlist $(TARGET_DIR)/sbin/ + cp -af $(WTOOLS_BUILD_DIR)/iwpriv $(TARGET_DIR)/sbin/ + cp -af $(WTOOLS_BUILD_DIR)/iwspy $(TARGET_DIR)/sbin/ + cp -af $(WTOOLS_BUILD_DIR)/libiw.so.26 $(TARGET_DIR)/lib + $(STRIP) $(TARGET_DIR)/sbin/iwconfig $(TARGET_DIR)/sbin/iwevent \ + $(TARGET_DIR)/sbin/iwgetid $(TARGET_DIR)/sbin/iwlist \ + $(TARGET_DIR)/sbin/iwpriv $(TARGET_DIR)/sbin/iwspy \ + $(TARGET_DIR)/lib/libiw.so.26 + +wtools: $(TARGET_DIR)/sbin/iwconfig + +wtools-source: $(DL_DIR)/$(WTOOLS_SOURCE) + +wtools-clean: + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(WTOOLS_BUILD_DIR) uninstall + -$(MAKE) -C $(WTOOLS_BUILD_DIR) clean + +wtools-dirclean: + rm -rf $(WTOOLS_BUILD_DIR) + diff --git a/package/zlib/zlib.mk b/package/zlib/zlib.mk new file mode 100644 index 000000000..27fe43d5c --- /dev/null +++ b/package/zlib/zlib.mk @@ -0,0 +1,73 @@ +############################################################# +# +# zlib +# +############################################################# +ZLIB_VER=1.2.1 +ZLIB_SOURCE=zlib-$(ZLIB_VER).tar.bz2 +ZLIB_SITE=http://aleron.dl.sourceforge.net/sourceforge/libpng +ZLIB_DIR=$(BUILD_DIR)/zlib-$(ZLIB_VER) +ZLIB_CFLAGS= $(TARGET_CFLAGS) -fPIC +ifeq ($(BR2_LARGEFILE),y) +ZLIB_CFLAGS+= -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +endif + +$(DL_DIR)/$(ZLIB_SOURCE): + $(WGET) -P $(DL_DIR) $(ZLIB_SITE)/$(ZLIB_SOURCE) + +$(ZLIB_DIR)/.source: $(DL_DIR)/$(ZLIB_SOURCE) + bzcat $(DL_DIR)/$(ZLIB_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(ZLIB_DIR)/.source + +$(ZLIB_DIR)/.configured: $(ZLIB_DIR)/.source + (cd $(ZLIB_DIR); \ + ./configure \ + --shared \ + --prefix=/usr \ + --exec-prefix=$(STAGING_DIR)/usr/bin \ + --libdir=$(STAGING_DIR)/lib \ + --includedir=$(STAGING_DIR)/include \ + ); + touch $(ZLIB_DIR)/.configured; + +$(ZLIB_DIR)/libz.so.$(ZLIB_VER): $(ZLIB_DIR)/.configured + $(MAKE) LDSHARED="$(TARGET_CROSS)gcc -shared -Wl,-soname,libz.so.1 -shared-libgcc" \ + CFLAGS="$(ZLIB_CFLAGS)" CC=$(TARGET_CC) -C $(ZLIB_DIR) all libz.a; + touch -c $(ZLIB_DIR)/libz.so.$(ZLIB_VER) + +$(STAGING_DIR)/lib/libz.so.$(ZLIB_VER): $(ZLIB_DIR)/libz.so.$(ZLIB_VER) + cp -dpf $(ZLIB_DIR)/libz.a $(STAGING_DIR)/lib; + cp -dpf $(ZLIB_DIR)/zlib.h $(STAGING_DIR)/include; + cp -dpf $(ZLIB_DIR)/zconf.h $(STAGING_DIR)/include; + cp -dpf $(ZLIB_DIR)/libz.so* $(STAGING_DIR)/lib; + (cd $(STAGING_DIR)/lib; ln -fs libz.so.$(ZLIB_VER) libz.so.1); + chmod a-x $(STAGING_DIR)/lib/libz.so.$(ZLIB_VER) + touch -c $(STAGING_DIR)/lib/libz.so.$(ZLIB_VER) + +$(TARGET_DIR)/lib/libz.so.$(ZLIB_VER): $(STAGING_DIR)/lib/libz.so.$(ZLIB_VER) + cp -dpf $(STAGING_DIR)/lib/libz.so* $(TARGET_DIR)/lib; + -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libz.so* + touch -c $(TARGET_DIR)/lib/libz.so.$(ZLIB_VER) + +$(TARGET_DIR)/usr/lib/libz.a: $(STAGING_DIR)/lib/libz.so.$(ZLIB_VER) + mkdir -p $(TARGET_DIR)/usr/include + cp -dpf $(STAGING_DIR)/include/zlib.h $(TARGET_DIR)/usr/include/ + cp -dpf $(STAGING_DIR)/include/zconf.h $(TARGET_DIR)/usr/include/ + cp -dpf $(STAGING_DIR)/lib/libz.a $(TARGET_DIR)/usr/lib/ + rm -f $(TARGET_DIR)/lib/libz.so + (cd $(TARGET_DIR)/usr/lib; ln -fs ../../lib/libz.so.$(ZLIB_VER) libz.so) + touch -c $(TARGET_DIR)/usr/lib/libz.a + +zlib-headers: $(TARGET_DIR)/usr/lib/libz.a + +zlib: uclibc $(TARGET_DIR)/lib/libz.so.$(ZLIB_VER) + +zlib-source: $(DL_DIR)/$(ZLIB_SOURCE) + +zlib-clean: + rm -f $(TARGET_DIR)/lib/libz.so* + -$(MAKE) -C $(ZLIB_DIR) clean + +zlib-dirclean: + rm -rf $(ZLIB_DIR) + |