forked from christiansandberg/canopen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makedeb
executable file
·47 lines (29 loc) · 868 Bytes
/
makedeb
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
#!/bin/sh
py=python3
name='canopen'
pkgname=$py-$name
description="CANopen stack implementation"
version=`git tag |grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' |sort | tail -1 `
maintainer=`git log -1 --pretty=format:'%an <%ae>'`
arch=all
echo version: $version
echo maintainer: $maintainer
cd $(dirname $0)
package_dir=$PWD/build-deb/${pkgname}_$version-1_all
fakeroot=$package_dir
mkdir -p $fakeroot
$py setup.py bdist_wheel >setup_py.log
mkdir -p $fakeroot/usr/lib/$py/dist-packages/
unzip dist/*.whl -d $fakeroot/usr/lib/python3/dist-packages/
# deploy extra files
#cp -r install/* $fakeroot/
mkdir $package_dir/DEBIAN
cat > $package_dir/DEBIAN/control <<control_end
Package: $pkgname
Version: $version
Architecture: $arch
Maintainer: $maintainer
Description: $description
Depends: $py, $py-can
control_end
dpkg-deb --build --root-owner-group $package_dir