forked from jeremiedecock/pyax12
-
Notifications
You must be signed in to change notification settings - Fork 0
/
debian8-dist.sh
executable file
·36 lines (28 loc) · 980 Bytes
/
debian8-dist.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
#!/bin/sh
NAME=pyax12
#VERSION=$(grep "__version__" pyax12/__init__.py | cut --delimiter="'" -f2)
VERSION=$(python -c "print(__import__('pyax12').__version__)")
DIST_DIR=dist
rm -rf debian
# TODO
mkdir -p debian/usr/local/lib/python3.0/dist-packages
cp -r pyax12 debian/usr/local/lib/python3.0/dist-packages
chmod 644 $(find debian/usr/local/lib -type f)
mkdir -p "debian/usr/share/doc/$NAME/"
cp LICENSE "debian/usr/share/doc/$NAME/copyright"
chmod 644 "debian/usr/share/doc/$NAME/copyright"
mkdir -p debian/DEBIAN
# section list : http://packages.debian.org/stable/
cat > debian/DEBIAN/control << EOF
Package: $NAME
Version: $VERSION
Section: libs
Priority: optional
Maintainer: Jérémie DECOCK <jd.jdhp@gmail.com>
Architecture: all
Depends: python (>= 3.0), python3-serial
Description: A library to control dynamixel AX-12+ servos with python
EOF
fakeroot dpkg-deb -b debian
mkdir -p "$DIST_DIR"
mv debian.deb "$DIST_DIR/${NAME}_${VERSION}_all.deb"