forked from indilib/indi-3rdparty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_deb_pkgs
executable file
·55 lines (42 loc) · 1.12 KB
/
make_deb_pkgs
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
#!/bin/bash
#make_deb_pkgs
#shell script for building 3rd-party drivers for indi-library
#please note, that some drivers have dependencies to other libraries
#these must be installed first!
#Example: indi-asi depends from libasi so we have to call this script like this:
# ./make_deb_pkgs libasi
# install the resulting debian package with sudo dpkg -i packagename
#then we can call this script again:
# ./make_deb_pkgs indi-asi
set -e
DRV_LIST=$@
SRC_DIR=`pwd`
#at least one driver is needed as argument
#otherwise abort the script!
if [ "$1" == "" ]; then
echo "usage:" "$0" "drivername1 [drivername2 drivername3 .. drivername10]"
echo "optional drivers: drivername2 to drivername10"
exit 1
fi
#all driver arguments must exist as directories
#otherwise abort the script!
for drv in $DRV_LIST ; do
(
if [ ! -d "$drv" ]; then
echo "$drv" "directory doesn't exist"
exit 1
fi
)
done
#now do the real stuff...
for drv in $DRV_LIST ; do
(
mkdir deb_${drv}
cd deb_${drv}
cp -r ${SRC_DIR}/$drv .
cp -r ${SRC_DIR}/debian/$drv debian
cp -r ${SRC_DIR}/cmake_modules $drv/
fakeroot debian/rules binary
)
done
ls -l