Package: cdebootstrap
Version: 0.3.11
Severity: wishlist
Tags: patch
thanks

When using cdebootstrap on foreign systems, libdebian-installer4
and libdebian-installer-extra4 are unlikely to be installed. It would
be nice if there would be a static package one can alien quickly
for whatever env you are working at. debootstrap is not really
suitable since not all systems have perl (especially embedded ones).

The attached patch is probably the simplest way to add a -static
package.

Cheers,
Riku
diff -urN cdebootstrap-0.3.11/debian/control cdebootstrap-0.3.12/debian/control
--- cdebootstrap-0.3.11/debian/control  2005-03-22 21:11:51.000000000 +0200
+++ cdebootstrap-0.3.12/debian/control  2006-07-23 20:02:52.000000000 +0300
@@ -11,6 +11,13 @@
 Description: Bootstrap a Debian system
  cdebootstrap is used to create a Debian base system from scratch.
 
+Package: cdebootstrap-static
+Architecture: any
+Depends: ${shlibs:Depends}, wget
+Description: Bootstrap a Debian system
+ cdebootstrap is used to create a Debian base system from scratch.
+ This is static version for foreign builds
+
 Package: cdebootstrap-udeb
 XC-Package-Type: udeb
 Section: debian-installer
diff -urN cdebootstrap-0.3.11/debian/rules cdebootstrap-0.3.12/debian/rules
--- cdebootstrap-0.3.11/debian/rules    2005-09-05 17:07:57.000000000 +0300
+++ cdebootstrap-0.3.12/debian/rules    2006-07-23 20:46:48.000000000 +0300
@@ -9,13 +9,16 @@
 
 CFLAGS_DEB = -Wall -W -Werror -ggdb
 CFLAGS_UDEB = -Wall -W -Werror
+CFLAGS_STATIC = -static -Wall -W -Werror 
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS_DEB += -O0
        CFLAGS_UDEB += -O0
+       CFLAGS_STATIC += -O0
 else
        CFLAGS_DEB += -O2
        CFLAGS_UDEB += -Os -fomit-frame-pointer
+       CFLAGS_STATIC += -Os -fomit-frame-pointer
 endif
 
 configure:
@@ -48,7 +51,16 @@
                CFLAGS="${CFLAGS_UDEB}" \
                --with-frontend=debian-installer
 
-build: build-deb build-udeb
+build-static/config.status: configure
+       dh_testdir
+       -mkdir build-static
+       cd build-static && \
+       $(CONFIGURE) \
+               CFLAGS="${CFLAGS_STATIC}" \
+               --enable-ar-internal \
+               --with-frontend=standalone
+               
+build: build-deb build-udeb build-static
 
 .NOTPARALLEL: build-deb-stamp build-udeb-stamp
 
@@ -68,6 +80,14 @@
 
        touch $@
 
+build-static: build-static-stamp
+build-static-stamp: build-static/config.status
+       dh_testdir
+
+       $(MAKE) -C build-static
+
+       touch $@
+       
 clean:
        dh_testdir
        rm -f *-stamp 
@@ -87,6 +107,7 @@
 
        $(MAKE) -C build-deb install DESTDIR=$(CURDIR)/debian/cdebootstrap
        $(MAKE) -C build-udeb install DESTDIR=$(CURDIR)/debian/cdebootstrap-udeb
+       $(MAKE) -C build-static install 
DESTDIR=$(CURDIR)/debian/cdebootstrap-static
 
 
 # Build architecture-independent files here.

Reply via email to