forked from BrianAdams/openrov-avrdude
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackage-deb.sh
executable file
·46 lines (41 loc) · 1006 Bytes
/
package-deb.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
set -ex
#Install Pre-req
gem install fpm
apt-get install -y \
autotools-dev \
automake \
bison \
flex
export DIR=${PWD#}
export PACKAGE="openrov-avrdude"
export PACKAGE_VERSION=1:5.11.1-2~${BUILD_NUMBER}.ad04c42
export REPO=https://github.com/kcuzner/avrdude.git
export GITHASH=ad04c429a90f4c34f000ea4ae11db2705915a31f
export REPLACES="avrdude"
ARCH=`uname -m`
if [ ${ARCH} = "armv7l" ]
then
ARCH="armhf"
fi
rm -rf avrdude || true
git clone $REPO
cd avrdude
git reset -- hard $GITHASH
cd ..
echo Building avrdude
cd avrdude/avrdude
PATH=/usr/:$PATH
./bootstrap
./configure --prefix=/usr/ --localstatedir=/var/ --sysconfdir=/etc/ --enable-linuxgpio
make --jobs=8
make install DESTDIR=${DIR}/avrdude_install
#package
cd $DIR
fpm -f -m [email protected] -s dir -t deb -a $ARCH \
-n ${PACKAGE} \
-v ${PACKAGE_VERSION} \
--replaces ${REPLACES} \
--after-install=${DIR}/install_lib/openrov-avrdude-afterinstall.sh \
--description "OpenROV avrdude" \
-C ${DIR}/avrdude_install .