-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmakedeb.sh
More file actions
executable file
·40 lines (32 loc) · 912 Bytes
/
Copy pathmakedeb.sh
File metadata and controls
executable file
·40 lines (32 loc) · 912 Bytes
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
#!/bin/bash
set -e
distro="${1:-}"
mode="${2:-}"
# rebuild mode: reuse the extracted build tree from a previous run;
# skips clean (-nc) and builds binary packages only (-b)
if [ "$mode" = "rebuild" ]; then
cd dist/*/
if [ -n "$distro" ] && [ "$distro" != "sid" ]; then
sed -i "s/) unstable/$distro) $distro/" debian/changelog
head -1 debian/changelog
fi
debuild --no-sign -nc -b
exit 0
fi
sudo mk-build-deps --install debian/control
rm -rf dist build
if [ -f setup.py ]; then
python3 setup.py sdist
else
python3 -m build --sdist
fi
cd dist
tar zxf *.tar.gz
cd */
# add distro suffix to the changelog version (like autopackager does),
# only in the extracted build tree - never in the source repo
if [ -n "$distro" ] && [ "$distro" != "sid" ]; then
sed -i "s/) unstable/$distro) $distro/" debian/changelog
head -1 debian/changelog
fi
debuild --no-sign