# Everything needed to build a full uClibc development system!
#TARGETS+=coreutils findutils bash make diffutils patch sed
-#TARGETS+=ed flex bison file gawk gcc_target
+#TARGETS+=ed flex bison file gawk tar gcc_target
# Of course, if you are installing a development system, you
# may want some header files so you can compile stuff....
-mv $(TARGET_DIR)/lib/*.a $(TARGET_DIR)/usr/lib/
-mv $(TARGET_DIR)/lib/*.la $(TARGET_DIR)/usr/lib/
rm -f $(TARGET_DIR)/lib/libstdc++.so
- (cd $(TARGET_DIR)/usr/lib; ln -fs /lib/libstdc++.a libstdc++.so)
+ (cd $(TARGET_DIR)/usr/lib; ln -fs /lib//lib/libstdc++.so.5* libstdc++.so)
-$(STRIP) $(TARGET_DIR)/bin/*
-$(STRIP) $(TARGET_DIR)/usr/bin/*
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
+ rm -f $(TARGET_DIR)/usr/lib/*.la*
# gcc "fixincludes" step is totally broken and takes unwanted
# stuff from the host system. Fix that here.
rm -rf $(TARGET_DIR)/usr/lib/gcc-lib/$(GNU_TARGET_NAME)/*/include/*
perl -i -p -e "s/pump/udhcpc/" $(PCMCIA_DIR)/etc/network
perl -i -p -e "s/ide_cs/ide-cs/" $(PCMCIA_DIR)/etc/config
perl -i -p -e "s/bind \"wvlan_cs\"/bind \"orinoco_cs\"/g" $(PCMCIA_DIR)/etc/config
- perl -i -p -e "s,/etc/pcmcia.conf,/etc/pcmcia/pcmcia.conf," $(PCMCIA_DIR)/etc/rc.pcmcia
touch $(PCMCIA_DIR)/.configured
$(PCMCIA_DIR)/cardmgr/cardmgr: $(PCMCIA_DIR)/.configured
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
- perl -i -p -e "s,/etc/pcmcia.conf,/etc/pcmcia/pcmcia.conf," $(PCMCIA_DIR)/etc/rc.pcmcia
cp $(PCMCIA_DIR)/etc/rc.pcmcia $(TARGET_DIR)/etc/init.d/S30pcmcia
chmod a+x $(TARGET_DIR)/etc/init.d/S30pcmcia
chmod -R u+w $(TARGET_DIR)/etc/pcmcia/*
--- /dev/null
+#############################################################
+#
+# tar
+#
+#############################################################
+GNUTAR_SOURCE:=tar-1.13.tar.gz
+GNUTAR_SITE:=ftp://ftp.gnu.org/gnu/tar
+GNUTAR_DIR:=$(BUILD_DIR)/tar-1.13
+GNUTAR_CAT:=zcat
+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; \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ ./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 \
+ );
+ touch $(GNUTAR_DIR)/.configured
+
+$(GNUTAR_DIR)/$(GNUTAR_BINARY): $(GNUTAR_DIR)/.configured
+ $(MAKE) -C $(GNUTAR_DIR)
+
+$(TARGET_DIR)/$(GNUTAR_TARGET_BINARY): $(GNUTAR_DIR)/$(GNUTAR_BINARY)
+ rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY)
+ cp -a $(GNUTAR_DIR)/$(GNUTAR_BINARY) $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY)
+
+tar: uclibc $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY)
+
+tar-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUTAR_DIR) uninstall
+ -$(MAKE) -C $(GNUTAR_DIR) clean
+
+tar-dirclean:
+ rm -rf $(GNUTAR_DIR)
+