source: trunk/debian/package/libnl-tiny/build.sh @ 517

Last change on this file since 517 was 517, checked in by amain, 6 years ago

Merge contrib branch 340:516. Main features added:

  • updated plugin architecture
  • improved patch system
  • bitten continous integration support
  • sever build fixed over time to remain in sync with OpenWrt
  • Property svn:executable set to *
File size: 1.4 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
7if [ -z $ARCH ]; then echo "First set \$ARCH before running the build script"; exit 1; fi
8
9export DEBFULLNAME="Amain (DebWrt.net)"
10export LC_ALL=C
11VERBOSE=1
12
13[ "1" == $VERBOSE ] && set -x
14
15PACKAGE=libnl-tiny
16VERSION=0.1
17RELEASE=1
18DOWNLOAD_URL=svn://svn.openwrt.org/openwrt/trunk/package/libs/${PACKAGE}
19DEP=
20
21BASE_DIR=/usr/src
22BUILD_BASE_DIR=${BASE_DIR}/${PACKAGE}
23BUILD_DIR=${BUILD_BASE_DIR}/${PACKAGE}-${VERSION}
24DOWNLOAD_DIR=${BASE_DIR}/dl
25
26mkdir -p $DOWNLOAD_DIR
27rm -rf ${BUILD_DIR}
28mkdir -p ${BUILD_DIR}
29svn co ${DOWNLOAD_URL} ${BUILD_DIR}
30
31# apply patches
32for patch in `ls ${BUILD_BASE_DIR}/patches | sort`; do
33    patch -d ${BUILD_DIR} -p1 <${BUILD_BASE_DIR}/patches/$patch
34done
35
36if [ ! -d debian ]; then
37   cd ${BUILD_DIR} 
38   dh_make -c gpl -e "amain@debwrt.net" -s -n
39   echo "Please complete debian package configuration. When done: cp -ra ${BUILD_DIR}/debian ."
40else
41   cp -rav debian ${BUILD_DIR}
42   cd ${BUILD_DIR}
43   dpkg-buildpackage -a${ARCH} -rfakeroot
44
45   # build and install deb cross packages
46   cd ${BUILD_BASE_DIR}
47   find ${BUILD_BASE_DIR} -maxdepth 1 -name "*.deb"  | grep -v _all.deb | xargs -r -t sudo dpkg-cross -a ${ARCH} -b || true
48   find ${BUILD_BASE_DIR} -maxdepth 1 -name "*.deb"  | grep    _all.deb | xargs -r -t sudo dpkg -i                  || true
49fi
50
Note: See TracBrowser for help on using the repository browser.