deb包制作

来源:互联网 发布:图形设计电脑知乎 编辑:程序博客网 时间:2024/05/16 01:27

转载自:http://bbs.weiphone.com/read-htm-tid-290811.html

好吧,正文来了:
debian制作DEB包,也可在iphone上制作
debian制作DEB包(在root权限下),打包位置随意。
#建立要打包软件文件夹,如
mkdir Cydia
cd Cydia
#依据程序的安装路径建立文件夹,并将相应程序添加到文件夹。如
mkdir Applications
mkdir var/mobile/Documents (游戏类需要这个目录,其他也有可能需要)
mkdir *** (要依据程序要求来添加)
#建立DEBIAN文件夹
mkdir DEBIAN
#在DEBIAN目录下创建一个control文件,并加入内容:
cat >DEBIAN/control
Package: soft (程序名称)
Version: 1.0.1 (版本)
Section: utils (程序类别)
Architecture:iphoneos-arm (程序格式)
Installed-Size: 512 (大小)
Maintainer: your <> (打包人和联系方式)
Description: soft package (程序说明)
#
postinst
主要设置一些软件安装时需要的使用命令,如:
#!/bin/sh
if [ "$1" = "configure" ]; then
/Applications/MobileLog.app/MobileLog -install
/bin/launchctl load -wF /System/Library/LaunchDaemons/com.iXtension.MobileLogDaemon.plist
fi
prerm
主要设置一些软件卸载时需要的使用命令,如:
#!/bin/sh
if [[ $1 == remove ]]; then
/Applications/MobileLog.app/MobileLog -uninstall
/bin/launchctl unload -wF /System/Library/LaunchDaemons/com.iXtension.MobileLogDaemon.plist
fi
#如果DEBIAN目录中含有postinst 、prerm等执行文件
chmod -R 755 DEBIAN
#退出打包软件文件夹,生成DEB
dpkg-deb --build Cydia


原创粉丝点击