deb 打包
二进制打包
dpkg-deb -b [package] file.db
二进制解包
dpkg-deb -R file.db [dir]
快速打包脚本
#!/bin/bash -e
if ! [[ $# -eq 1 ]] || ! [[ -d $1 ]] ; then
echo "$0 [Package]"
exit 1
fi
pkg=$(basename $1)/DEBIAN
mkdir -p ${pkg} $(basename $1)/opt
mkdir -p deb-package
cat <<-EOF | tee $pkg/control
Package: $(echo $(basename $1) | sed 's/_/-/g')
Version: 1.0.0
Section: utils
Priority: extra
Architecture: amd64
Maintainer: Dayu Hong hongyu@yongding.com.cn
Description: cross compile
EOF
cp -rf $1 $(basename $1)/opt
echo $pkg_name
dpkg-deb -b $(basename $1) $(basename $1).deb
mv $(basename $1).deb deb-package/