spice server dpkg-buildpackage 打包编译备忘

一般我们会通过configure,make 编译.但是为了替换版本的方便需要把他编译成deb的包,而且还需要自定义下包名.下面就记录下我的修改过程.

注:前面关于spice server的编译过程掠过

1.下载源码包.

  http://packages.ubuntu.com/yakkety/libspice-server-dev    上边下载spice_0.12.8-1.debian.tar.xz和spice_0.12.8.orig.tar.bz2.

2.解压

  tar xvf  spice_0.12.8-1.debian.tar.xz 和  tar xvf spice_0.12.8.orig.tar.bz2.

  之后将解压之后的debian/ 放入 spice-0.12.8/中.

 3.编译

  dpkg-buildpackage -uc -b -j8 (参数自定)

最终在你的spice-0.12.8/的上层目录就会出现libspice-server-dev_0.12.8-1_amd64.deb,libspice-server1-dbg_0.12.8-1_amd64.deb,

libspice-server1_0.12.8-1_amd64.deb这三个deb的可直接安装的包了.

 

但是如果想使用自己定义的包名的话就要修改 debian/下的内容了,假如我想将生成的包名改为dh-libspice-server*

就需要做如下修改:

1.修改debian/下的

libspice-server-dev.install,libspice-server1.install,libspice-server1.symbols这三个文件的文件名,例如:mv 

一般我们会通过configure,make 编译.但是为了替换版本的方便需要把他编译成deb的包,而且还需要自定义下包名.下面就记录下我的修改过程.

1.下载源码包.

  http://packages.ubuntu.com/yakkety/libspice-server-dev    上边下载spice_0.12.8-1.debian.tar.xz和spice_0.12.8.orig.tar.bz2.

2.解压

  tar xvf  spice_0.12.8-1.debian.tar.xz 和  tar xvf spice_0.12.8.orig.tar.bz2.

  之后将解压之后的debian/ 放入 spice-0.12.8/中.

 3.编译

  dpkg-buildpackage -uc -b -j8 (参数自定)

最终在你的spice-0.12.8/的上层目录就会出现libspice-server-dev_0.12.8-1_amd64.deb,libspice-server1-dbg_0.12.8-1_amd64.deb,

libspice-server1_0.12.8-1_amd64.deb这三个deb的可直接安装的包了.

 

但是如果想使用自己定义的包名的话就要修改 debian/下的内容了,假如我想将生成的包名改为dh-libspice-server*

就需要做如下修改:

1.修改debian/下的

libspice-server-dev.install,libspice-server1.install,libspice-server1.symbols这三个文件的文件名,

例如:mv libspice-server1.symbols  dh-libspice-server1.symbols

2.修改debian/下的rules文件

#!/usr/bin/make -f

%:
    dh $@ --parallel --with autoreconf

override_dh_auto_configure:
    dh_auto_configure --  --disable-celt051 --disable-silent-rules \
        --enable-smartcard
# remove Requires.private defs from .pc file -- we're not building static libs
    sed -i '/^Requires\.private:/D' spice-server.pc

override_dh_strip:
    dh_strip -pdh-libspice-server1 --dbg-package=dh-libspice-server1-dbg
    dh_strip -Ndh-libspice-server1

override_dh_installdocs:
    dh_installdocs -pdh-libspice-server1-dbg --link-doc=dh-libspice-server1
    dh_installdocs -Ndh-libspice-server1-dbg
3.修改debian/下的control文件

Source: spice
Section: misc
Priority: optional
Maintainer: Liang Guo <guoliang@debian.org>
Uploaders: Michael Tokarev <mjt@tls.msk.ru>
Build-Depends: debhelper (>= 9), pkg-config,
 dh-autoreconf,
 python, python-six,
 libspice-protocol-dev (>= 0.12.10~),
 libopus-dev (>= 0.9.14),
 libpixman-1-dev (>= 0.17.7~),
 libasound2-dev,
 libssl-dev,
 libsasl2-dev,
 libjpeg-dev,
 python-pyparsing,
 libglib2.0-dev (>= 2.22~),
 libcacard-dev,
Standards-Version: 3.9.8
Homepage: http://spice-space.org/
Vcs-Git: https://anonscm.debian.org/git/collab-maint/spice.git
Vcs-Browser: https://anonscm.debian.org/gitweb/?p=collab-maint/spice.git

Package: dh-libspice-server1
Section: libs
Architecture: i386 amd64
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Breaks: spice-client-gtk (<= 0.12-2), python-spice-client-gtk (<= 0.12-2),
 libspice-client-glib-2.0-1 (<= 0.12-2), libspice-client-gtk-2.0-1 (<= 0.12-2),
 libspice-client-gtk-3.0-1 (<= 0.12-2)
Description: Implements the server side of the SPICE protocol
 The Simple Protocol for Independent Computing Environments (SPICE) is
 a remote display system built for virtual environments which allows
 you to view a computing 'desktop' environment not only on the machine
 where it is running, but from anywhere on the Internet and from a wide
 variety of machine architectures.
 .
 This package contains the run-time libraries for any application that
 wishes to be a SPICE server.

Package: dh-libspice-server1-dbg
Section: debug
Architecture: i386 amd64
Priority: extra
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends:dh-libspice-server1 (= ${binary:Version}), ${misc:Depends}
Description: Debugging symbols for libspice-server1
 The Simple Protocol for Independent Computing Environments (SPICE) is
 a remote display system built for virtual environments which allows
 you to view a computing 'desktop' environment not only on the machine
 where it is running, but from anywhere on the Internet and from a wide
 variety of machine architectures.
 .
 This package contains the debugging symbols for the libspice-server1
 library.

Package: dh-libspice-server-dev
Section: libdevel
Architecture: i386 amd64
Depends: dh-libspice-server1 (= ${binary:Version}), ${misc:Depends}, libspice-protocol-dev (>= 0.12.10~)
Suggests: pkg-config
Description: Header files and development documentation for spice-server
 The Simple Protocol for Independent Computing Environments (SPICE) is
 a remote display system built for virtual environments which allows
 you to view a computing 'desktop' environment not only on the machine
 where it is running, but from anywhere on the Internet and from a wide
 variety of machine architectures.
 .
 This package contains the header files, static libraries and development
 documentation for spice-server.

修改内容不多主要是修改包名.

之后在通过dpkg-buildpackage 命令编译之后就会出现dh-libspice-server-dev_0.12.8-1_amd64.deb,dh-libspice-server1-dbg_0.12.8-1_amd64.deb

dh-libspice-server1_0.12.8-1_amd64.deb.

转载于:https://www.cnblogs.com/aili03/p/6069492.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值