Package: dash
Version: 0.5.3-2
Severity: normal
Tags: patch

Also, build dietlibc based packages only when DEB_BUILD_OPTIONS is on
"diet".

Includes cross-compiling patch.

--- dash-0.5.3/debian/control   2006-03-12 17:43:16.000000000 +0100
+++ dash-0.5.3-2.my/debian/control      2006-03-14 17:45:44.000000000 +0100
@@ -5,6 +5,24 @@
 Build-Depends: po-debconf, dietlibc-dev [alpha amd64 arm hppa i386 ia64 mips 
mipsel powerpc ppc64 s390 sparc]
 Standards-Version: 3.6.2.0
 
+Package: dash-static
+Architecture: any
+Pre-Depends: 
+Description: The Debian Almquist Shell
+ "dash" is a POSIX compliant shell that is much smaller than "bash".
+ We take advantage of that by making it the shell on the installation
+ root floppy, where space is at a premium.
+ .
+ It can be usefully installed as /bin/sh (because it executes scripts
+ somewhat faster than "bash"), or as the default shell either of root
+ or of a second user with a userid of 0 (because it depends on fewer
+ libraries, and is therefore less likely to be affected by an upgrade
+ problem or a disk failure).  It is also useful for checking that a
+ script uses only POSIX syntax.
+ .
+ "bash" is a better shell for most users, since it has some nice
+ features absent from "dash", and is a required part of the system.
+
 Package: dash
 Architecture: any
 Pre-Depends: ${shlibs:Depends}
@@ -23,6 +41,26 @@
  "bash" is a better shell for most users, since it has some nice
  features absent from "dash", and is a required part of the system.
 
+Package: dash-static-udeb
+Architecture: any
+Depends: 
+Section: debian-installer
+Priority: extra
+Description: The Debian Almquist Shell for boot floppies
+ "dash" is a POSIX compliant shell that is much smaller than "bash".
+ We take advantage of that by making it the shell on the installation
+ root floppy, where space is at a premium.
+ .
+ It can be usefully installed as /bin/sh (because it executes scripts
+ somewhat faster than "bash"), or as the default shell either of root
+ or of a second user with a userid of 0 (because it depends on fewer
+ libraries, and is therefore less likely to be affected by an upgrade
+ problem or a disk failure).  It is also useful for checking that a
+ script uses only POSIX syntax.
+ .
+ "bash" is a better shell for most users, since it has some nice
+ features absent from "dash", and is a required part of the system.
+
 Package: dash-udeb
 Architecture: any
 Depends: ${shlibs:Depends}
--- dash-0.5.3/debian/rules     2006-03-12 17:43:16.000000000 +0100
+++ dash-0.5.3-2.my/debian/rules        2006-03-14 19:50:16.000000000 +0100
@@ -2,25 +2,46 @@
 
 CC =cc
 CFLAGS =-g -O2 -Wall
-CCUDEB =diet -v -Os gcc
-CFLAGSUDEB =-nostdinc -g -DREALLY_SMALL -Wall
+
+DCCUDEB =$(CC)
+SCCUDEB =$(CC) -static
+CFLAGSUDEB =-g -Os -DREALLY_SMALL -Wall
+
 STRIP =strip
 
 DIET_ARCHS =alpha amd64 arm hppa i386 ia64 mips mipsel powerpc ppc64 s390 sparc
+DIETDYN_ARCHS =alpha amd64 arm hppa i386 ia64 mips powerpc ppc64 s390 sparc
 ARCH ?=$(shell dpkg-architecture -qDEB_HOST_ARCH)
+
+d=..
+ifneq (,$(findstring diet,$(DEB_BUILD_OPTIONS)))
+d=../DIET
+CFLAGS =-Wall
+SCC =diet -Os $(CC) -static
+SCCUDEB =diet -Os $(CC) -static
+ifeq (,$(findstring $(ARCH),$(DIETDYN_ARCHS)))
 ifeq (,$(findstring $(ARCH),$(DIET_ARCHS)))
-  CCUDEB =$(CC)
-  CFLAGSUDEB =-g -Os -DREALLY_SMALL -Wall
+error 
 endif
-ifneq (,$(findstring diet,$(DEB_BUILD_OPTIONS)))
-  CC =diet -v -Os gcc
-  CFLAGS =-nostdinc -Wall
+  DCC =diet -Os $(CC)
+  DCCUDEB =diet -Os $(CC)
+else
+  DCC =diet-dyn -Os $(CC)
+  DCCUDEB =diet-dyn -Os $(CC)
 endif
+endif
+
+ifeq (,$(findstring diet,$(DEB_BUILD_OPTIONS)))
+DCC=$(CC)
+SCC=$(CC) -static
+endif
+
 ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
   STRIP =: strip
 endif
 
 DIR =$(shell pwd)/debian/dash
+SDIR =$(DIR)-static
 DIRA =$(shell pwd)/debian/ash
 
 patch: deb-checkdir patch-stamp
@@ -30,39 +51,63 @@
        done
        touch patch-stamp
 
-configure: deb-checkdir configure-stamp configure-udeb-stamp
+configure: deb-checkdir configure-stamp configure-udeb-stamp\
+                       configure-static-stamp configure-static-udeb-stamp
+
 configure-stamp: patch-stamp
        mkdir -p build-tmp
-       (cd build-tmp && CC='$(CC)' CFLAGS='$(CFLAGS)' exec ../configure)
+       (cd build-tmp && CC='$(DCC)' CFLAGS='$(CFLAGS)' exec ../configure 
--host=$(DEB_HOST_GNU_TYPE))
        touch configure-stamp
 configure-udeb-stamp: patch-stamp
        mkdir -p build-udeb-tmp
        (cd build-udeb-tmp && \
-         CC='$(CCUDEB)' CFLAGS='$(CFLAGSUDEB)' exec ../configure)
+         CC='$(DCCUDEB)' CFLAGS='$(CFLAGSUDEB)' exec ../configure 
--host=$(DEB_HOST_GNU_TYPE))
        touch configure-udeb-stamp
 
-build: deb-checkdir build-stamp build-udeb-stamp
+configure-static-stamp:
+       mkdir -p build-static-tmp
+       (cd build-static-tmp && CC='$(SCC)' CFLAGS='$(CFLAGS)' exec 
../configure --host=$(DEB_HOST_GNU_TYPE))
+       touch configure-static-stamp
+configure-static-udeb-stamp:
+       mkdir -p build-static-udeb-tmp
+       (cd build-static-udeb-tmp && \
+         CC='$(SCCUDEB)' CFLAGS='$(CFLAGSUDEB)' exec ../configure 
--host=$(DEB_HOST_GNU_TYPE))
+       touch configure-static-udeb-stamp
+
+
+build: deb-checkdir build-stamp build-udeb-stamp\
+                   build-static-stamp build-static-udeb-stamp
+
 build-stamp: configure-stamp
        -gcc -v
-       (cd build-tmp && exec $(MAKE) CFLAGS='$(CFLAGS)')
+       (cd build-tmp && exec $(MAKE) CC='$(DCC)' CFLAGS='$(CFLAGS)')
        touch build-stamp
 build-udeb-stamp: configure-udeb-stamp
        -gcc -v
-       (cd build-udeb-tmp && exec $(MAKE) CFLAGS='$(CFLAGSUDEB)')
+       (cd build-udeb-tmp && exec $(MAKE) CC='$(DCCUDEB)' 
CFLAGS='$(CFLAGSUDEB)')
        touch build-udeb-stamp
 
+build-static-stamp: configure-static-stamp
+       -gcc -v
+       (cd build-static-tmp && exec $(MAKE) CC='$(SCC)' CFLAGS='$(CFLAGS)')
+       touch build-static-stamp
+build-static-udeb-stamp: configure-static-udeb-stamp
+       -gcc -v
+       (cd build-static-udeb-tmp && exec $(MAKE) CC='$(SCCUDEB)' 
CFLAGS='$(CFLAGSUDEB)')
+       touch build-static-udeb-stamp
+
 po-templates: po-templates-stamp
 po-templates-stamp: deb-checkdir
        po2debconf debian/dash.templates.in >debian/dash.templates
        touch po-templates-stamp
 
 clean: deb-checkdir deb-checkuid
-       rm -rf build-tmp build-udeb-tmp
+       rm -rf build{,-static}-tmp build{,-static}-udeb-tmp
        test ! -e patch-stamp || \
          for i in `ls -tr debian/diff/*.diff || :`; do patch -p1 -R <$$i; done
-       rm -f configure-stamp configure-udeb-stamp patch-stamp build-stamp \
+       rm -f configure{,-static}-stamp configure{,-static}-udeb-stamp 
patch-stamp build-stamp \
          build-udeb-stamp po-templates-stamp
-       rm -rf '$(DIR)' '$(DIR)'-udeb '$(DIRA)'
+       rm -rf '$(DIR)' '$(DIR)'-udeb '$(SDIR)' '$(SDIR)'-udeb '$(DIRA)'
        rm -f debian/files debian/substvars debian/dash.templates changelog
 
 install: install-indep install-arch
@@ -74,7 +119,8 @@
        ln -s dash.1.gz '$(DIRA)'/usr/share/man/man1/ash.1.gz
        # changelog
        test -r changelog || ln -s ChangeLog changelog
-install-arch: deb-checkdir deb-checkuid build-stamp build-udeb-stamp
+install-arch: deb-checkdir deb-checkuid build-stamp build-udeb-stamp\
+                                       build-static-stamp 
build-static-udeb-stamp
        # dash
        rm -rf '$(DIR)'
        install -d -m0755 '$(DIR)'/bin
@@ -91,25 +137,51 @@
        install -m0755 build-udeb-tmp/src/dash '$(DIR)'-udeb/bin/dash
        $(STRIP) -R .comment -R .note '$(DIR)'-udeb/bin/dash
        ln -s dash '$(DIR)'-udeb/bin/sh
+       # dash-static
+       rm -rf '$(SDIR)'
+       install -d -m0755 '$(SDIR)'/bin
+       install -m0755 build-static-tmp/src/dash '$(SDIR)'/bin/dash
+       $(STRIP) -R .comment -R .note '$(SDIR)'/bin/dash
+       install -d -m0755 '$(SDIR)'/usr/share/man/man1/
+       install -m0644 src/dash.1 '$(SDIR)'/usr/share/man/man1/dash.1
+       gzip -9 '$(SDIR)'/usr/share/man/man1/dash.1
+       install -d -m0755 '$(SDIR)'/usr/share/menu
+       install -m0644 debian/dash.menu '$(SDIR)'/usr/share/menu/dash
+       # dash-static-udeb
+       rm -rf '$(SDIR)'-udeb
+       install -d -m0755 '$(SDIR)'-udeb/bin
+       install -m0755 build-static-udeb-tmp/src/dash '$(SDIR)'-udeb/bin/dash
+       $(STRIP) -R .comment -R .note '$(SDIR)'-udeb/bin/dash
+       ln -s dash '$(SDIR)'-udeb/bin/sh
        # changelog
        test -r changelog || ln -s ChangeLog changelog
 
 binary: binary-indep binary-arch
 binary-indep: install-indep ash.deb
        dpkg-gencontrol -isp -pash -P'$(DIRA)'
-       dpkg -b '$(DIRA)' ..
+       dpkg -b '$(DIRA)' $d
 binary-arch: install-arch po-templates dash.deb dash-udeb.udeb
+       # dash-static
+       rm -f debian/substvars
+       mkdir -p debian/dash-static/DEBIAN
+       dpkg-gencontrol -isp -pdash-static -P'$(SDIR)'
+       dpkg -b '$(SDIR)' $d
+       # dash-static-udeb
+       rm -f debian/substvars
+       mkdir -p debian/dash-static-udeb/DEBIAN
+       dpkg-gencontrol -isp -pdash-static-udeb -P'$(SDIR)'-udeb
+       dpkg -b '$(SDIR)'-udeb $d
        # dash
        rm -f debian/substvars
-       test '$(CC)' != 'cc' || dpkg-shlibdeps '$(DIR)'/bin/dash
+       test '$(DCC)' != 'cc' || dpkg-shlibdeps '$(DIR)'/bin/dash
        dpkg-gencontrol -isp -pdash -P'$(DIR)'
-       dpkg -b '$(DIR)' ..
+       dpkg -b '$(DIR)' $d
        # dash-udeb
        rm -f debian/substvars
-       test '$(CCUDEB)' != 'cc' || dpkg-shlibdeps '$(DIR)'-udeb/bin/dash
+       test '$(DCCUDEB)' != 'cc' || dpkg-shlibdeps '$(DIR)'-udeb/bin/dash
        dpkg-gencontrol -isp -pdash-udeb -P'$(DIR)'-udeb
-       dpkg -b '$(DIR)'-udeb ..
-       for i in ../dash-udeb_*.deb; do mv $$i $${i%deb}udeb; done
+       dpkg -b '$(DIR)'-udeb $d
+       for i in $d/dash-udeb_*.deb; do mv $$i $${i%deb}udeb; done
        sed -e '/^[^ ]*\.udeb/d;s/^\(dash-udeb_[^ ]*\.\)deb/\1udeb/' \
          <debian/files >debian/files.new
        mv debian/files.new debian/files

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13-rc3
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages dash depends on:
ii  libc6                         2.3.6-3    GNU C Library: Shared libraries an

dash recommends no packages.

-- debconf information:
  dash/sh: false



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to