deb changes
This commit is contained in:
parent
c95fa32fe5
commit
9474232bc3
20
build.sh
20
build.sh
|
@ -25,12 +25,13 @@ source $config_path
|
|||
export VERSION=$(jq -r '.name' <<<$JSON)
|
||||
echo "Building $NAME_CAPS v$VERSION for architectures: $@"
|
||||
|
||||
control_file="Section: $SECTION
|
||||
control_file="Source: $target
|
||||
Section: $SECTION
|
||||
Priority: optional
|
||||
Standards-Version: 3.9.2
|
||||
Maintainer: alex
|
||||
Maintainer: alex"
|
||||
|
||||
package_control_file="Package: $target
|
||||
Depends: $DEPENDS
|
||||
Package: $target
|
||||
Version: $VERSION
|
||||
Architecture: REPLACE_ARCHITECTURE
|
||||
Description: $target"
|
||||
|
@ -104,6 +105,9 @@ for ((i = 1; i < ${#tarballs[@]}; i += 2)); do
|
|||
if (( $@[(Ie)$arch])); then
|
||||
echo "Building for $arch..."
|
||||
dir=$(mktemp -d)
|
||||
deb_dir=$dir/DEBIAN
|
||||
mkdir -p $deb_dir
|
||||
echo $control_file > $deb_dir/control
|
||||
pkgdir=$dir/$target
|
||||
|
||||
mkdir -p $pkgdir/usr/lib/systemd/system
|
||||
|
@ -121,10 +125,10 @@ for ((i = 1; i < ${#tarballs[@]}; i += 2)); do
|
|||
chmod -R a=,a+rX,u+w $pkgdir/usr/lib/$target/bin
|
||||
chmod +x $pkgdir/usr/lib/$target/bin/$NAME_CAPS
|
||||
|
||||
mkdir -p $pkgdir/DEBIAN
|
||||
echo $control_file | sed -E "s/REPLACE_ARCHITECTURE/$arch/g" > $pkgdir/DEBIAN/control
|
||||
echo $sysusers_file > $pkgdir/DEBIAN/sysusers
|
||||
chmod +x $pkgdir/DEBIAN/postinst
|
||||
mkdir -p $pkgdir/debian
|
||||
echo $package_control_file | sed -E "s/REPLACE_ARCHITECTURE/$arch/g" > $pkgdir/debian/control
|
||||
echo $sysusers_file > $pkgdir/debian/sysusers
|
||||
chmod +x $pkgdir/debian/postinst
|
||||
|
||||
cd $dir
|
||||
dpkg-deb --build $target
|
||||
|
|
Loading…
Reference in a new issue