dh
This commit is contained in:
parent
9474232bc3
commit
b5fcb944d1
19
build.sh
19
build.sh
|
@ -28,9 +28,16 @@ echo "Building $NAME_CAPS v$VERSION for architectures: $@"
|
||||||
control_file="Source: $target
|
control_file="Source: $target
|
||||||
Section: $SECTION
|
Section: $SECTION
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: alex"
|
Maintainer: alex
|
||||||
|
|
||||||
|
Package: $target
|
||||||
|
Depends: $DEPENDS
|
||||||
|
Version: $VERSION
|
||||||
|
Architecture: REPLACE_ARCHITECTURE
|
||||||
|
Description: $target"
|
||||||
|
|
||||||
package_control_file="Package: $target
|
package_control_file="Package: $target
|
||||||
|
Maintainer: alex
|
||||||
Depends: $DEPENDS
|
Depends: $DEPENDS
|
||||||
Version: $VERSION
|
Version: $VERSION
|
||||||
Architecture: REPLACE_ARCHITECTURE
|
Architecture: REPLACE_ARCHITECTURE
|
||||||
|
@ -105,7 +112,7 @@ 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
|
deb_dir=$dir/debian
|
||||||
mkdir -p $deb_dir
|
mkdir -p $deb_dir
|
||||||
echo $control_file > $deb_dir/control
|
echo $control_file > $deb_dir/control
|
||||||
pkgdir=$dir/$target
|
pkgdir=$dir/$target
|
||||||
|
@ -125,10 +132,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
|
deb_pkg_dir=$pkgdir/DEBIAN
|
||||||
echo $package_control_file | sed -E "s/REPLACE_ARCHITECTURE/$arch/g" > $pkgdir/debian/control
|
mkdir -p $deb_pkg_dir
|
||||||
echo $sysusers_file > $pkgdir/debian/sysusers
|
echo $package_control_file | sed -E "s/REPLACE_ARCHITECTURE/$arch/g" > $deb_pkg_dir/control
|
||||||
chmod +x $pkgdir/debian/postinst
|
echo $sysusers_file > $deb_pkg_dir/sysusers
|
||||||
|
|
||||||
cd $dir
|
cd $dir
|
||||||
dpkg-deb --build $target
|
dpkg-deb --build $target
|
||||||
|
|
Loading…
Reference in a new issue