- 论坛徽章:
- 0
|
by tangke 2009-10-20
和svn-buildpackage类似,git-buildpackage的作用是在debian包基础上面添加git的支持。
1.git-import-dsc
tangke@tangke-laptop:~/Work/program/application/loongson/test$ git-import-dsc pppoeloongson_0.6lemote.dsc
No git repository found, creating one.
Initialized empty Git repository in /home/tangke/Work/program/application/loongson/test/pppoeloongson/.git/
tag debian/0.6lemote not found, importing Debian tarball
Everything imported under 'pppoeloongson'
2.git-import-orig
tangke@tangke-laptop:~/Work/program/application/loongson/test/pppoeloongson$ git-import-orig ../pppoeloongson_0.6lemote.tar.gz
Repository does not have branch 'upstream' for upstream sources. If there is none see
file:///usr/share/doc/git-buildpackage/manual-html/gbp.import.html#GBP.IMPORT.CONVERT
on howto create it otherwise use --upstream-branch to specify it.
3.git-buildpackage
tangke@tangke-laptop:~/Work/program/application/loongson/test/pppoeloongson$ git-buildpackage
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
/usr/bin/make clean
make[1]: Entering directory `/home/tangke/Work/program/application/loongson/test/pppoeloongson'
/usr/bin/qmake-qt4 -unix -o Makefile pppoe_loongson.pro
make[1]: Leaving directory `/home/tangke/Work/program/application/loongson/test/pppoeloongson'
make[1]: Entering directory `/home/tangke/Work/program/application/loongson/test/pppoeloongson'
rm -f moc_pppoe.cpp moc_pppoe_loongson.cpp
rm -f ui_info_message.h ui_pppoe_loongson.h
rm -f info_message.o main.o pppoe.o pppoe_loongson.o moc_pppoe.o moc_pppoe_loongson.o
rm -f *~ core *.core
make[1]: Leaving directory `/home/tangke/Work/program/application/loongson/test/pppoeloongson'
dh_clean
You have uncommitted changes in your source tree:
# On branch master
# Changed but not updated:
# (use "git add ..." to update what will be committed)
# (use "git checkout -- ..." to discard changes in working directory)
#
# modified: Makefile
#
no changes added to commit (use "git add" and/or "git commit -a")
Use --git-ignore-new to ignore.
使用命令git-buildpackage --git-ignore-new就可以了
默认是将编译生成的文件输出到上层目录中,比如生成的deb文件,dsc文件等等,我们也可以指定一个输出路径
git-buildpackage --git-export-dir=../build-area
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/100996/showart_2073218.html |
|