-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild-src-package.sh
executable file
·138 lines (121 loc) · 3.06 KB
/
build-src-package.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!/bin/bash
DISTS="trusty utopic vivid"
if [ $# -ne 0 ]
then
RELEASE=$1
if [ $# -ne 1 ]
then
DISTS=$2
fi
else
RELEASE=$(date +"%y%m%d")
RELEASE=${RELEASE:0:6}
#-$(date +%Y%m%d)
fi
echo Building release: $RELEASE
if [ -d release ]
then
echo Directory release exists, removing ...
rm -rf release
fi
echo making release directory
mkdir release
#mkdir release/usbpicprog
#mkdir release/firmware
echo exporting git tree...
#svn export uc_code release/firmware/firmware-$RELEASE
#svn export boot release/firmware/boot1.0
git clone ./ release/
mv release/OSMScout/libosmscout release/libosmscout-$RELEASE
mv release/OSMScout/libosmscout-import release/libosmscoutimport-$RELEASE
mv release/OSMScout/Import release/osmscoutimport-$RELEASE
mv release/OSMScout/ImportGui release/osmscoutimportgui-$RELEASE
rm release/LICENSE
rm release/README
rm release/build-src-package.sh
rm -rf release/OSMScout/
echo creating autogen files
cd release/libosmscout-$RELEASE
sed -i 's/SUBDIRS = src include tests/SUBDIRS = src include/g' Makefile.am
./autogen.sh
make distclean
rm -rf autom4te.cache
cd ..
echo creating source archive...
tar -zcvhf libosmscout_$RELEASE.orig.tar.gz libosmscout-$RELEASE
rm -rf libosmscout-$RELEASE
tar -zxvf libosmscout_$RELEASE.orig.tar.gz
cd libosmscout-$RELEASE
COUNT=0
INCLUDESRC=-sa
for DIST in ${DISTS} ; do
COUNT=$(($COUNT-1))
dch -D $DIST -m -v $RELEASE$COUNT -b "Released $RELEASE"
debuild -S -k8AD5905E $INCLUDESRC
INCLUDESRC=-sd
done
cd ..
##################
echo creating autogen files
cd libosmscoutimport-$RELEASE
./autogen.sh
./configure
make distclean
rm -rf autom4te.cache
cd ..
echo creating source archive...
tar -zcvhf libosmscoutimport_$RELEASE.orig.tar.gz libosmscoutimport-$RELEASE
rm -rf libosmscoutimport-$RELEASE
tar -zxvf libosmscoutimport_$RELEASE.orig.tar.gz
cd libosmscoutimport-$RELEASE
COUNT=0
INCLUDESRC=-sa
for DIST in ${DISTS} ; do
COUNT=$(($COUNT-1))
dch -D $DIST -m -v $RELEASE$COUNT -b "Released $RELEASE"
debuild -S -k8AD5905E $INCLUDESRC
INCLUDESRC=-sd
done
cd ..
####################
echo creating autogen files
cd osmscoutimport-$RELEASE
./autogen.sh
make distclean
rm -rf autom4te.cache
cd ..
echo creating source archive...
tar -zcvhf osmscoutimport_$RELEASE.orig.tar.gz osmscoutimport-$RELEASE
rm -rf osmscoutimport-$RELEASE
tar -zxvf osmscoutimport_$RELEASE.orig.tar.gz
cd osmscoutimport-$RELEASE
COUNT=0
INCLUDESRC=-sa
for DIST in ${DISTS} ; do
COUNT=$(($COUNT-1))
dch -D $DIST -m -v $RELEASE$COUNT -b "Released $RELEASE"
debuild -S -k8AD5905E $INCLUDESRC
INCLUDESRC=-sd
done
cd ..
####################
echo creating autogen files
cd osmscoutimportgui-$RELEASE
./autogen.sh
make distclean
rm -rf autom4te.cache
cd ..
echo creating source archive...
tar -zcvhf osmscoutimportgui_$RELEASE.orig.tar.gz osmscoutimportgui-$RELEASE
rm -rf osmscoutimportgui-$RELEASE
tar -zxvf osmscoutimportgui_$RELEASE.orig.tar.gz
cd osmscoutimportgui-$RELEASE
COUNT=0
INCLUDESRC=-sa
for DIST in ${DISTS} ; do
COUNT=$(($COUNT-1))
dch -D $DIST -m -v $RELEASE$COUNT -b "Released $RELEASE"
debuild -S -k8AD5905E $INCLUDESRC
INCLUDESRC=-sd
done
cd ..