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