-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_local.sh
45 lines (37 loc) · 1.08 KB
/
build_local.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
37
38
39
40
41
42
43
44
#!/bin/bash
# Overriding $HOME to prevent permissions issues when running on github actions
mkdir -p /tmp/home
chmod 0777 /tmp/home
export HOME=/tmp/home
apt -y update && \
apt-get -y install apt-utils curl && \
curl https://deb.nodesource.com/setup_18.x | bash && \
apt-get -u update && \
apt-get -y install perl \
make \
gcc \
devscripts \
openssl \
pkg-config \
libssl-dev \
debhelper \
automake \
nodejs \
libkrb5-dev \
libqrencode-dev \
g++ \
zlib1g-dev
# copy entire source tree
mkdir /src
cp -r . /src
cd /src
# workaround for debhelper bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897569
mkdir -p deb_build_home
ls | grep -v deb_build_home | xargs mv -t deb_build_home # move everything except deb_build_home
cd deb_build_home
dh_clean
dpkg-buildpackage -us -uc -nc
# set filename
release_code_name=$(lsb_release --codename | sed 's/Codename:\s*//')
package_name=$(basename ../*.deb | sed 's/.deb$//')_$release_code_name.deb
mv ../*.deb ../$package_name