]>
Commit | Line | Data |
---|---|---|
836ad9fb DB |
1 | #!/bin/sh |
2 | # | |
3 | # Written by Daniil Baturin, 2018 | |
4 | # This file is public domain | |
3e662ed3 | 5 | set -e |
836ad9fb | 6 | |
3e662ed3 DL |
7 | cd "`dirname $0`" |
8 | cd .. | |
836ad9fb | 9 | |
3e662ed3 DL |
10 | if [ "`id -u`" = 0 ]; then |
11 | echo "Running as root - installing dependencies" | |
12 | apt-get install fakeroot debhelper devscripts | |
13 | mk-build-deps --install debian/control | |
14 | exit 0 | |
836ad9fb DB |
15 | fi |
16 | ||
3e662ed3 | 17 | git diff-index --quiet HEAD || echo "Warning: git working directory is not clean!" |
836ad9fb DB |
18 | |
19 | echo "Preparing the build" | |
3e662ed3 | 20 | tools/tarsource.sh -V |
836ad9fb DB |
21 | |
22 | echo "Building the Debian package" | |
3e662ed3 DL |
23 | if test $# -eq 0; then |
24 | dpkg-buildpackage -b -uc -us | |
25 | else | |
26 | dpkg-buildpackage "$@" | |
27 | fi |