-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakedeb.sh
More file actions
executable file
·24 lines (18 loc) · 795 Bytes
/
makedeb.sh
File metadata and controls
executable file
·24 lines (18 loc) · 795 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
#!/bin/bash -e
_pkgname=poseidon
_pkgversion=$(git describe --tag | sed 's/^[^0-9]//')
_pkgarch=$(dpkg --print-architecture)
_tempdir=$(readlink -f "./.makedeb")
rm -rf ${_tempdir}
mkdir -p ${_tempdir}
cp -pr DEBIAN -t ${_tempdir}
meson setup -Dbuildtype=release build_makedeb
meson compile -Cbuild_makedeb
meson test -Cbuild_makedeb
DESTDIR=${_tempdir} meson install -Cbuild_makedeb
_etcdir=$(find ${_tempdir} -name "etc" -type d)
find ${_etcdir} -type f | sed 's|^.*\.makedeb/|/|' > ${_tempdir}/conffiles
sed -i "s/{_pkgname}/${_pkgname}/" ${_tempdir}/DEBIAN/control
sed -i "s/{_pkgversion}/${_pkgversion}/" ${_tempdir}/DEBIAN/control
sed -i "s/{_pkgarch}/${_pkgarch}/" ${_tempdir}/DEBIAN/control
dpkg-deb --root-owner-group --build .makedeb "${_pkgname}_${_pkgversion}_${_pkgarch}.deb"