source: debwrt/trunk/debian/package/debwrt-kernel-headers/debwrt-kernel-headers.sh @ 52

Last change on this file since 52 was 52, checked in by amain, 10 years ago

Fix makefile dependancy problems and include libnl.so in debian package

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/bash
2#
3# 1. Download package and unpack package
4# 2. Copy debian/directory to it
5# 3. Run dpkg-buildpackage --arch=<ARCH> -rfakeroot
6
7export DEBFULLNAME="Amain (DebWrt.net)"
8export LC_ALL=C
9VERBOSE=1
10
11[ "1" == $VERBOSE ] && set -x
12
13# linux-headers-2.6.32.14
14PACKAGE=debwrt-kernel-headers
15VERSION=2.6.32.14
16RELEASE=1
17
18BASE_DIR=/usr/src
19BUILD_BASE_DIR=${BASE_DIR}/${PACKAGE}
20BUILD_DIR=${BUILD_BASE_DIR}/${PACKAGE}-${VERSION}
21SOURCE_DIR=${BUILD_BASE_DIR}/linux-headers-${VERSION}
22DOWNLOAD_DIR=${BASE_DIR}/dl
23KCONF=${BUILD_BASE_DIR}/config-kernel-${VERSION}
24
25rm -rf ${BUILD_DIR}
26mkdir -p ${BUILD_DIR}
27cp -ra ${SOURCE_DIR} ${BUILD_DIR}
28cp -a ${KCONF} ${BUILD_DIR}/.config
29
30if [ ! -d debian ]; then
31   cd ${BUILD_DIR} 
32   dh_make -c gpl -e "amain@debwrt.net" -s -n
33   echo "Please complete debian package configuration. When done: cp -ra ${BUILD_DIR}/debian ."
34else
35   cp -rav debian ${BUILD_DIR}
36   cd ${BUILD_DIR}
37   dch -v ${VERSION}-${RELEASE} -m -t "Automated packet generation"
38   dpkg-buildpackage -a${ARCH} -rfakeroot -b
39   find ${BUILD_BASE_DIR} -maxdepth 1 -name "*.deb"  | xargs -r -t -i sudo dpkg-cross -a ${ARCH} -i {} || true
40fi
41
Note: See TracBrowser for help on using the repository browser.