Browse Source

Limited Debian architectures to the ones we can actually build.
Improved mksnapshot script; now adds a bogus changelog entry.
Added fixlinks script that automatically converts symlinks to
conform to Debian policy and updated rules to use it. Added
another bogus man page, prolonging the pretense that I'll actually
write real ones.

David Schleef 22 years ago
parent
commit
534a83fcf6
8 changed files with 147 additions and 40 deletions
  1. 0 3
      debian/changelog
  2. 3 4
      debian/control
  3. 3 4
      debian/control.in
  4. 80 0
      debian/fixlinks
  5. 26 12
      debian/mksnapshot
  6. 8 1
      debian/rules
  7. 8 16
      debian/uclibc-ldd.1
  8. 19 0
      debian/uclibc-readelf.1

+ 0 - 3
debian/changelog

@@ -30,6 +30,3 @@ uclibc (0.9.5-cvs20010625-1) unstable; urgency=low
 
  -- David Schleef <ds@schleef.org>  Mon, 25 Jun 2001 22:13:43 -0700
 
-Local variables:
-mode: debian-changelog
-End:

+ 3 - 4
debian/control

@@ -7,7 +7,7 @@ Standards-Version: 3.5.2
 
 Package: libuclibc-dev
 Section: devel
-Architecture: any
+Architecture: i386 powerpc mipsel sh m68k arm
 Depends: ${shlibs:Depends}
 Description: A small implementation of the C library
  uClibc is an implementation of the standard C library that is
@@ -16,8 +16,7 @@ Description: A small implementation of the C library
 
 Package: libuclibc0
 Section: libs
-Architecture: any
-Depends: ${shlibs:Depends}
+Architecture: i386 powerpc mipsel sh m68k arm
 Description: A small implementation of the C library
  uClibc is an implementation of the standard C library that is
  much smaller than glibc, which makes it useful for embedded
@@ -25,7 +24,7 @@ Description: A small implementation of the C library
 
 Package: uclibc-toolchain
 Section: devel
-Architecture: any
+Architecture: i386 powerpc mipsel sh m68k arm
 Depends: gcc|c-compiler, binutils, ${shlibs:Depends}
 Conflicts: uclibc-gcc
 Replaces: uclibc-gcc

+ 3 - 4
debian/control.in

@@ -7,7 +7,7 @@ Standards-Version: 3.5.2
 
 Package: libuclibc-dev_TARGET_
 Section: devel
-Architecture: any
+Architecture: _ARCHS_
 Depends: ${shlibs:Depends}
 Description: A small implementation of the C library
  uClibc is an implementation of the standard C library that is
@@ -16,8 +16,7 @@ Description: A small implementation of the C library
 
 Package: libuclibc0_TARGET_
 Section: libs
-Architecture: any
-Depends: ${shlibs:Depends}
+Architecture: _ARCHS_
 Description: A small implementation of the C library
  uClibc is an implementation of the standard C library that is
  much smaller than glibc, which makes it useful for embedded
@@ -25,7 +24,7 @@ Description: A small implementation of the C library
 
 Package: uclibc_TARGET_-toolchain
 Section: devel
-Architecture: any
+Architecture: _ARCHS_
 Depends: gcc|c-compiler, binutils, ${shlibs:Depends}
 Conflicts: uclibc_TARGET_-gcc
 Replaces: uclibc_TARGET_-gcc

+ 80 - 0
debian/fixlinks

@@ -0,0 +1,80 @@
+#!/usr/bin/perl -w
+# vi: set ts=4:
+
+
+@LINKS=`find . -type l|xargs ls -l`;
+
+#print @LINKS;
+
+
+while($_ = shift @LINKS){
+	chomp;
+	my ($perm,$nlinks,$owner,$group,$size,$month,$day,$year,$file) =
+		split(' ', $_, 9);
+	my $link;
+
+	if($perm =~ m/^l/){
+		($relfile, $link) = split(' -> ', $file);
+	}
+
+	# chop off leading . in $file
+	$file = $relfile;
+	$file =~ s/^\.//;
+
+	if($perm =~ m/^l/){
+		my @pathcomponents = split('/', $file);
+		my @linkcomponents = split('/', $link);
+
+		if($link =~ m/^\//){
+			@newcomponents = @linkcomponents;
+		}else{
+			@newcomponents = @pathcomponents;
+
+			# chop off filename
+			pop(@newcomponents);
+
+			while($comp = shift @linkcomponents){
+				#print "path: ",join(':',@newcomponents)," -- $comp -- ", join(':',@linkcomponents),"\n";
+
+				if($comp eq ""){
+					# ignore
+				}elsif($comp eq ".."){
+					pop(@newcomponents);
+				}else{
+					push @newcomponents,$comp;
+				}
+			}
+		}
+
+		if($newcomponents[0] eq ""){
+			shift(@newcomponents);
+		}
+		if($pathcomponents[0] eq ""){
+			shift(@pathcomponents);
+		}
+
+		#print "from ",join('/',@pathcomponents),"\n";
+		#print "to ",join('/',@newcomponents),"\n";
+
+		if($newcomponents[0] eq $pathcomponents[0]){
+			#print $newcomponents[0],", ",$pathcomponents[0];
+			#print "should be relative\n";
+			while($newcomponents[0] eq $pathcomponents[0]){
+				shift(@newcomponents);
+				shift(@pathcomponents);
+			}
+			while(@pathcomponents > 1){
+				shift(@pathcomponents);
+				unshift(@newcomponents,"..");
+			}
+		}else{
+			#print "should be absolute\n";
+			unshift(@newcomponents,"");
+		}
+		$newlink=join('/',@newcomponents);
+		print "ln -sf $newlink $relfile\n";
+		unlink($relfile);
+		symlink($newlink,$relfile);
+	}
+}
+

+ 26 - 12
debian/mksnapshot

@@ -1,20 +1,34 @@
-#!/bin/sh
+#!/bin/bash
 
 
-version=$(dpkg-parsechangelog | grep ^Version | sed 's/^Version: //' | sed 's/-1$//')
+topdir=$(pwd)
+today=$(date +%Y%m%d)
 
-dir=uclibc-${version}
+mkdir -p ${topdir}/uclibc-tmp
+cd ${topdir}/uclibc-tmp
 
-export CVSROOT='cvs.uclinux.org:/var/cvs'
-#export CVSROOT=':pserver:anonymous@cvs.uclinux.org:/var/cvs'
-#if ! grep -q '^.pserver.anonymous.cvs.uclinux.org..var.cvs' ~/.cvspass
-#then
-#echo "$CVSROOT" 'Ay=0=a%0bZ' >>~/.cvspass
-#fi
+export CVSROOT=':pserver:anonymous@cvs.uclinux.org:/var/cvs'
+if ! grep -q '^.pserver.anonymous.cvs.uclinux.org..var.cvs' ~/.cvspass
+then
+	echo "$CVSROOT" 'Ay=0=a%0bZ' >>~/.cvspass
+fi
 
-rm -rf ${dir}
-cvs co -d ${dir} uClibc
+cvs co uClibc
 
-tar -czvf ${dir}.tgz ${dir}
+cd ${topdir}/uclibc-tmp/uClibc/debian
+echo "uclibc (0.9.5-cvs${today}-1) unstable; urgency=low" >changelog.tmp
+echo >>changelog.tmp
+echo "  * This is an automatic snapshot of uClibc CVS" >>changelog.tmp
+echo >>changelog.tmp
+echo " -- David Schleef <ds@schleef.org>  $(date -R)" >>changelog.tmp
+cat changelog >>changelog.tmp
+mv changelog.tmp changelog
 
+cd ${topdir}/uclibc-tmp
+mv uClibc uclibc-cvs-${today}
+tar -czf ../uclibc-cvs-${today}.tgz uclibc-cvs-${today}
+
+
+cd ${topdir}
+rm -rf uclibc-tmp
 

+ 8 - 1
debian/rules

@@ -30,7 +30,9 @@ p_lib=libuclibc0$(target_suffix)
 p_gcc=uclibc$(target_suffix)-toolchain
 
 debian/control: debian/control.in debian/rules
-	sed s/_TARGET_/$(target_suffix)/ debian/control.in >debian/control
+	sed -e s/_TARGET_/$(target_suffix)/ \
+	  -e "s/_ARCHS_/i386 powerpc mipsel sh m68k arm/" \
+	  debian/control.in >debian/control
 
 build: build-stamp
 build-stamp: debian/control
@@ -99,6 +101,8 @@ install: build debian/control
 	  debian/$(p_lib)/usr/share/man/man1/$(target)-uclibc-ldd.1
 	install -m 644 debian/uclibc-ldconfig.1 \
 	  debian/$(p_lib)/usr/share/man/man1/$(target)-uclibc-ldconfig.1
+	install -m 644 debian/uclibc-readelf.1 \
+	  debian/$(p_lib)/usr/share/man/man1/$(target)-uclibc-readelf.1
 
 ifeq ($(with_shared_libs),y)
 ifeq ($(target),$(DEB_HOST_GNU_CPU))
@@ -130,6 +134,9 @@ binary-arch: build install
 #	dh_undocumented
 	dh_installchangelogs 
 	dh_link
+	cd debian/libuclibc0 && ../fixlinks
+	cd debian/libuclibc-dev && ../fixlinks
+	cd debian/uclibc-toolchain && ../fixlinks
 	dh_strip
 	dh_compress
 	dh_fixperms -Xld-uClibc

+ 8 - 16
debian/uclibc-ldd.1

@@ -1,28 +1,20 @@
-.TH UCLIBC-GCC 1
+.TH UCLIBC-LDD 1
 .SH NAME
-uclibc-gcc \- Cross-compiler for uClibc
+uclibc-ldd \- Print shared library dependencies
 .SH SYNOPSIS
-.B uclibc-gcc
-[
-.B options
-]
-.br
-.B uclibc-ld
+.B uclibc-ldd
 [
 .B options
 ]
+.B file...
 .SH DESCRIPTION
-These programs are wrappers for
-.B gcc
-and
-.B ld.
+Prints shared library dependencies.
 .SH BUGS
-Probably.
+Maybe.
 
 .SH AUTHORS
-Manuel Nova
+Erik Andersen <andersen@codepoet.org>
 .br
 Manual page written by David Schleef <ds@schleef.org>
 .SH SEE ALSO
-.BR gcc (1),
-.BR ld (1)
+.BR ldd (1)

+ 19 - 0
debian/uclibc-readelf.1

@@ -0,0 +1,19 @@
+.TH UCLIBC-READELF 1
+.SH NAME
+uclibc-readelf \- Displays information about ELF files.
+.SH SYNOPSIS
+.B uclibc-readelf
+[
+.B options
+]
+.SH DESCRIPTION
+A small program to display information about ELF files.
+.SH BUGS
+Maybe.
+
+.SH AUTHORS
+Erik Andersen <andersen@codepoet.org>
+.br
+Manual page written by David Schleef <ds@schleef.org>
+.SH SEE ALSO
+.BR readelf (1)