source: trunk/debian/package/iw/iw.sh @ 316

Last change on this file since 316 was 316, checked in by amain, 8 years ago

package/iw: add mirror

  • Property svn:executable set to *
File size: 1.3 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
13PACKAGE=iw
14VERSION=0.9.19
15RELEASE=1
16PACKAGE_SOURCE=${PACKAGE}-${VERSION}.tar.bz2
17#DOWNLOAD_URL=http://wireless.kernel.org/download/iw/${PACKAGE_SOURCE}
18DOWNLOAD_URL=http://linuxwireless.org/download/iw/${PACKAGE_SOURCE}
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}
29if [ ! -s ${DOWNLOAD_DIR}/${PACKAGE_SOURCE} ]; then rm -f ${DOWNLOAD_DIR}/${PACKAGE_SOURCE}; wget -O ${DOWNLOAD_DIR}/${PACKAGE_SOURCE} $DOWNLOAD_URL; fi
30tar xjf ${DOWNLOAD_DIR}/${PACKAGE_SOURCE} -C ${BUILD_DIR} --strip 1
31
32if [ ! -d debian ]; then
33   cd ${BUILD_DIR} 
34   dh_make -c gpl -e "amain@debwrt.net" -s -f ../../dl/iw-$VERSION.tar.bz2
35   echo "Please complete debian package configuration. When done: cp -ra ${BUILD_DIR}/debian ."
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.