source: debwrt/trunk/debian/package/swconfig/build.sh @ 178

Last change on this file since 178 was 178, checked in by stappers, 8 years ago

debian/package/swconfig/build.sh: silence a recursive copy command

  • Property svn:executable set to *
File size: 1.2 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=swconfig
16VERSION=0.1
17RELEASE=6
18DOWNLOAD_URL=svn://svn.openwrt.org/openwrt/trunk/package/${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} | grep -v /.svn  # copy all, silence subversion
42   cd ${BUILD_DIR}
43   dpkg-buildpackage -a${ARCH} -rfakeroot
44   find ${BUILD_BASE_DIR} -maxdepth 1 -name "*.deb"  | xargs -r -t -i sudo dpkg-cross -a ${ARCH} -i {} || true
45fi
46
Note: See TracBrowser for help on using the repository browser.