File: create_deb_package.sh

package info (click to toggle)
httraqt 1.4.11-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 2,780 kB
  • sloc: cpp: 7,970; sh: 177; makefile: 13
file content (39 lines) | stat: -rwxr-xr-x 705 bytes parent folder | download
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
#!/bin/bash

CMD=$(type -p cmake)

if [ ! -x "$CMD" ]; then
   # not found exit
   echo "please install cmake and restart this script"
   exit 1
fi

CMD=$(type -p dh)

if [ ! -x "$CMD" ]; then
   # not found exit
   echo "please install debhelper and restart this script"
   exit 1
fi


CPU_NUM=$(nproc --all)
echo "cpu cores: $CPU_NUM"

DIRECTORY="build-deb"

if [ ! -d "$DIRECTORY" ]; then
  # Control will enter here if $DIRECTORY exists.
    mkdir "$DIRECTORY"
fi

# because of removing of all files in directory
if [ -d "$DIRECTORY" ]; then
    cd "$DIRECTORY"
    rm * -rf
    cmake -DUSE_DEBUGGER=OFF ..
    make -j$CPU_NUM
    make package-binary-deb
    cd ..
    mv ./$DIRECTORY/httra*.deb .
fi