source: trunk/debian/package/nvram/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.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
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=nvram
16VERSION=1.0
17RELEASE=1
18DOWNLOAD_URL=svn://svn.openwrt.org/openwrt/trunk/package/utils/nvram
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
31if [ ! -d debian ]; then
32   cd ${BUILD_DIR} 
33   dh_make -c gpl -e "amain@debwrt.net" -l -n
34   echo "Please complete debian package configuration. And copy the files back to the svn working directory."
35   exit 1
36else
37   cp -rav debian ${BUILD_DIR}
38   cd ${BUILD_DIR}
39   dpkg-buildpackage -a${ARCH} -rfakeroot
40   find ${BUILD_BASE_DIR} -maxdepth 1 -name "*.deb"  | xargs -r -t -i sudo dpkg-cross -a ${ARCH} -i {} || true
41fi
42
Note: See TracBrowser for help on using the repository browser.