[分享]非官方gz包这样制成deb包比较简单。

编译打包和其他
回复
头像
masonliu
帖子: 470
注册时间: 2007-04-10 14:51

[分享]非官方gz包这样制成deb包比较简单。

#1

帖子 masonliu » 2007-10-23 23:14

发现这样打包,仅仅是安装到一个新建文件夹一堆文件,没有发挥作用,
网上的好法,也会骗人。
不可行的方法之一:
debian下制作deb包的简便方法(比较好用,成功制成并且安装,删除可以方便的在新历得中进行)
1.创建目录
mkdir ubuntu01
2.把下载的需要打包的东东使用归档管理器解压到ubuntu01目录
3.解压缩到目录中,创建/DEBIAN/目录和control空文件,更新日期为当天。
touch ubuntu/DEBIAN/control
4.使用gedit编辑control,模板如下 把Maintainer 中的
Package: gecko-mediaplayer #会在新历得显示该名称gecko-mediaplayer
Version: 1.0.2
Section: utils#建议保留,应用软件
Priority: optional#建议保留,可选包
Architecture: i386#可以改成any
Depends:
Installed-Size: 567
Maintainer: masonliu <masonliu@123.com>
Description: This package will do good mediaplayer job for you .
5.创建deb包,
dpkg -b ubuntu01/ gecko-mediaplayer_1.0.2.deb
6.好了,可以安装了.----可是不会有作用,不过删除也很容易,新历得找到他,打钩!
附件
gecko-mediaplayer-0.5.1.deb
(358.13 KiB) 已下载 387 次
上次由 masonliu 在 2007-10-24 15:52,总共编辑 2 次。
头像
masonliu
帖子: 470
注册时间: 2007-04-10 14:51

这个包有什么用,好像gnome Mplayer说和它配合可以打开在线媒体。

#2

帖子 masonliu » 2007-10-23 23:26

今天采用我介绍的方法打包成功,并且安装了这包,不过gnome mplayer没有好的表现。
大家试试如何。
打包很容易了,
不过dh_make有点不会使用,选项l/m/k/c/等等让人迷,
依赖关系是不是要求过严,反正没有打成包。
高手请留言

dpkg-buildpackage
dpkg-buildpackage: source package is gecko-mediaplayer
dpkg-buildpackage: source version is 0.5.1-1
dpkg-buildpackage: source changed by mason <mason@unknown>
dpkg-buildpackage: host architecture i386
dpkg-buildpackage: source version without epoch 0.5.1-1
dpkg-checkbuilddeps:未满足的构建依赖关系: autotools-dev
dpkg-buildpackage: Build dependencies/conflicts unsatisfied; aborting.
dpkg-buildpackage: (Use -d flag to override.)
mason@mason-laptop:~/ubuntu/gecko-mediaplayer-0.5.1$ dpkg-buildpackage -d
dpkg-buildpackage: source package is gecko-mediaplayer
dpkg-buildpackage: source version is 0.5.1-1
dpkg-buildpackage: source changed by mason <mason@unknown>
dpkg-buildpackage: host architecture i386
dpkg-buildpackage: source version without epoch 0.5.1-1
debian/rules clean
dh_testdir
dh_testroot
dh_testroot: You must run this as root (or use fakeroot).
make: *** [clean] 错误 1
加上sudo后更乱
dpkg-buildpackage: source package is gecko-mediaplayer
dpkg-buildpackage: source version is 0.5.1-1
dpkg-buildpackage: source changed by mason <mason@unknown>
dpkg-buildpackage: host architecture i386
dpkg-buildpackage: source version without epoch 0.5.1-1
debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
/usr/bin/make distclean
make[1]: Entering directory `/home/mason/ubuntu/gecko-mediaplayer-0.5.1'
make[1]: *** 没有规则可以创建目标“distclean”。 停止。
make[1]: Leaving directory `/home/mason/ubuntu/gecko-mediaplayer-0.5.1'
make: [clean] 错误 2 (忽略)
rm -f config.sub config.guess
dh_clean
dpkg-source -b gecko-mediaplayer-0.5.1
dpkg-source:正在构建 gecko-mediaplayer 于 gecko-mediaplayer_0.5.1.orig.tar.gz
dpkg-source:正在构建 gecko-mediaplayer 于 gecko-mediaplayer_0.5.1-1.diff.gz
dpkg-source:警告:忽略对文件 config.sub 的删除指令
dpkg-source:警告:忽略对文件 config.guess 的删除指令
dpkg-source:正在构建 gecko-mediaplayer 于 gecko-mediaplayer_0.5.1-1.dsc
debian/rules build
dh_testdir
# Add here commands to configure the package.
./configure --host=i486-linux-gnu --build=i486-linux-gnu --prefix=/usr --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info CFLAGS="-Wall -g -O2" LDFLAGS="-Wl,-z,defs"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for i486-linux-gnu-gcc... i486-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i486-linux-gnu-gcc accepts -g... yes
checking for i486-linux-gnu-gcc option to accept ISO C89... none needed
checking dependency style of i486-linux-gnu-gcc... gcc3
checking for library containing strerror... none required
checking for i486-linux-gnu-gcc... (cached) i486-linux-gnu-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether i486-linux-gnu-gcc accepts -g... (cached) yes
checking for i486-linux-gnu-gcc option to accept ISO C89... (cached) none needed
checking dependency style of i486-linux-gnu-gcc... (cached) gcc3
checking for i486-linux-gnu-gcc... (cached) i486-linux-gnu-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether i486-linux-gnu-gcc accepts -g... (cached) yes
checking for i486-linux-gnu-gcc option to accept ISO C89... (cached) none needed
checking dependency style of i486-linux-gnu-gcc... (cached) gcc3
checking how to run the C preprocessor... i486-linux-gnu-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking how to run the C preprocessor... i486-linux-gnu-gcc -E
checking for i486-linux-gnu-g++... no
checking for i486-linux-gnu-c++... no
checking for i486-linux-gnu-gpp... no
checking for i486-linux-gnu-aCC... no
checking for i486-linux-gnu-CC... no
checking for i486-linux-gnu-cxx... no
checking for i486-linux-gnu-cc++... no
checking for i486-linux-gnu-cl.exe... no
checking for i486-linux-gnu-FCC... no
checking for i486-linux-gnu-KCC... no
checking for i486-linux-gnu-RCC... no
checking for i486-linux-gnu-xlC_r... no
checking for i486-linux-gnu-xlC... no
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
configure: error: cannot run /bin/bash ./config.sub
make: *** [config.status] 错误 1
头像
alpha.gu
帖子: 1456
注册时间: 2006-09-10 16:06
联系:

#3

帖子 alpha.gu » 2008-01-10 11:43

楼主,这样子做包的话,前提是放在目标目录下的东西要是编译过的吧!不能是源代码。
头像
tiancaiamao
帖子: 149
注册时间: 2007-11-06 22:58
来自: 武汉

#4

帖子 tiancaiamao » 2008-01-12 12:36

更简单的方法

cd 到源码目录
./configure
make
sudo checkinstall

你会发现用checkinstall命令会产生一个deb的包,不过只是对你自己的系统兼容.............
还是源码编译出来的东西稳定
littertiger
帖子: 99
注册时间: 2006-08-08 20:25
联系:

#5

帖子 littertiger » 2008-01-12 19:21

比较干净的打包方式还是用pbuilder。
masonliu: 可能你要对着rules一点点查了。
回复