summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2002-02-11 03:10:32 +0000
committerDavid Schleef <ds@schleef.org>2002-02-11 03:10:32 +0000
commit54c46b3d18731526af7b9eac15521827ef3a4a2a (patch)
treee733874e8e3908e2126fb38ab1eb53676a11ac97 /debian/rules
parent432a37d9a89a0f3d9d04cf9bd42102fcbe4e9327 (diff)
mksnapshot: updated version and filenames. control.in: changed
dependency from kernel-headers to kernel-source packages. rules: force HAS_MMU=true, change mipsel to mips, untar kernel-source package include directory and use that as kernel source
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules20
1 files changed, 16 insertions, 4 deletions
diff --git a/debian/rules b/debian/rules
index c20391979..288a211c8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,8 @@ major=$(shell grep '^MAJOR_VERSION' Rules.mak|sed 's/.*=//')
minor=$(shell grep '^MINOR_VERSION' Rules.mak|sed 's/.*=//')
version:=$(strip $(major)).$(strip $(minor))
+kernel_source=kernel-source-2.4.16
+
target=$(DEB_HOST_GNU_CPU)
#target=powerpc
@@ -31,14 +33,17 @@ p_gcc=uclibc$(target_suffix)-toolchain
debian/control: debian/control.in debian/rules
sed -e s/_TARGET_/$(target_suffix)/ \
- -e "s/_ARCHS_/i386 powerpc mipsel sh m68k arm/" \
+ -e "s/_ARCHS_/arm i386 m68k mips powerpc sh sparc/" \
+ -e "s/_KERNEL_/$(kernel_source)/" \
debian/control.in >debian/control
build: build-stamp
build-stamp: debian/control
dh_testdir
- # Add here commands to compile the package.
+ # Brute force method of getting kernel headers
+ tar --bzip2 -xf /usr/src/$(kernel_source).tar.bz2 $(kernel_source)/include
+
cp extra/Configs/Config.$(target) Config
echo '#Debian configuration overrides' >>Config
@@ -54,7 +59,8 @@ endif
ifeq ($(with_shared_libs),n)
echo 'HAVE_SHARED = false' >>Config
endif
- echo 'KERNEL_SOURCE = '`echo /usr/src/kernel-headers-*|sed 's/ .*//'` >>Config
+ echo 'KERNEL_SOURCE = '`pwd`/$(kernel_source) >>Config
+ echo 'HAS_MMU = true' >>Config
$(MAKE)
@@ -67,6 +73,8 @@ clean: debian/control
rm -f debian/$(p_dev)
+ rm -rf kernel-source-*
+
# Add here commands to clean up after the build process.
-$(MAKE) clean
@@ -84,7 +92,7 @@ install: build debian/control
# Add here commands to install the package into debian/tmp.
$(MAKE) install_dev PREFIX=`pwd`/debian/$(p_dev)
$(MAKE) install_runtime PREFIX=`pwd`/debian/$(p_lib)
- $(MAKE) install_gcc PREFIX=`pwd`/debian/$(p_gcc)
+ $(MAKE) install_toolchain PREFIX=`pwd`/debian/$(p_gcc)
install -d debian/$(p_gcc)/usr/share/man/man1
install -m 644 debian/uclibc-gcc.1 \
@@ -104,6 +112,10 @@ install: build debian/control
install -m 644 debian/uclibc-readelf.1 \
debian/$(p_lib)/usr/share/man/man1/$(target)-uclibc-readelf.1
+ (cd debian/$(p_dev); find . -name '.*' -exec rm -f '{}' ';')
+ (cd debian/$(p_lib); find . -name '.*' -exec rm -f '{}' ';')
+ (cd debian/$(p_gcc); find . -name '.*' -exec rm -f '{}' ';')
+
ifeq ($(with_shared_libs),y)
ifeq ($(target),$(DEB_HOST_GNU_CPU))
mkdir -p debian/$(p_lib)/lib/