-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·47 lines (35 loc) · 999 Bytes
/
build.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
45
46
47
#!/usr/bin/env sh
#
# Build neovim Debian package.
set -eu
NAME="neovim"
VERSION="0.9.1"
TOPDIR="${PWD}"
echo "Create build directory"
rm -Rf build
mkdir build
cd build
echo "Download sources"
wget https://github.com/"${NAME}"/"${NAME}"/archive/refs/tags/v"${VERSION}".tar.gz
echo "Prepare sources"
mv v"${VERSION}".tar.gz "${NAME}"_"${VERSION}".orig.tar.gz
tar xf "${NAME}"_"${VERSION}".orig.tar.gz
cd "${NAME}"-"${VERSION}"
cp -R ../../debian .
echo "Install build dependencies"
sudo mk-build-deps \
--install \
--tool="apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes" \
debian/control
echo "Build package"
debuild -b -us -uc
echo "Test installation"
dpkg --dry-run -i ../"${NAME}"_"${VERSION}"*.deb
echo "Delete debug deb files"
rm -f ../"${NAME}"*-dbgsym_"${VERSION}"*.deb
echo "Move package to the top directory"
mv ../"${NAME}"_"${VERSION}"*.deb "${TOPDIR}"/
# Return to the top directory
cd "${TOPDIR}"
echo "Clean build directory"
rm -Rf build