File tree 2 files changed +50
-0
lines changed 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 25
25
* .egg-info /
26
26
.installed.cfg
27
27
* .egg
28
+ build-deb /
28
29
29
30
# PyInstaller
30
31
# Usually these files are written by a python script from a template
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ py=python3
4
+ name=canopen
5
+ pkgname=$py -canopen
6
+ description=" CANopen stack implementation"
7
+
8
+
9
+ version=` git tag | grep -Eo ' [0-9]+\.[0-9]+\.[0-9]+' | sort | tail -1 `
10
+ maintainer=` git log -1 --pretty=format:' %an <%ae>' `
11
+ arch=all
12
+
13
+ echo version: $version
14
+ echo maintainer: $maintainer
15
+
16
+ cd $( dirname $0 )
17
+ package_dir=$PWD /build-deb/${pkgname} _$version -1_all
18
+ fakeroot=$package_dir
19
+
20
+ mkdir -p $fakeroot
21
+
22
+ $py setup.py bdist > setup_py.log
23
+
24
+ tar -f dist/* .tar.* -C $fakeroot -x
25
+
26
+ mkdir -p $fakeroot /usr/lib/$py /dist-packages/
27
+ mv -f $( find $fakeroot -name $name -type d) $fakeroot /usr/lib/python3/dist-packages/
28
+
29
+ cp -r $name .egg-info $fakeroot /usr/lib/python3/dist-packages/$name -$version .egg-info
30
+
31
+ mkdir $package_dir /DEBIAN
32
+
33
+ cat > $package_dir /DEBIAN/control << control_end
34
+ Package: $pkgname
35
+ Version: $version
36
+ Architecture: $arch
37
+ Maintainer: $maintainer
38
+ Description: $description
39
+ Depends: $py , $py -can
40
+ control_end
41
+
42
+
43
+ dpkg-deb --build --root-owner-group $package_dir
44
+
45
+
46
+
47
+
48
+
49
+
You can’t perform that action at this time.
0 commit comments