http://zh.opensuse.org/index.php?title=openSUSE:Build_Service_Debian_builds&variant=zh-cn#.E8.9D.B6.E5.8F.98_deb_.E6.89.93.E5.8C.85
编译服务对蝶变系发行版的支持
http://www.debian.org/doc/debian-policy/ch-source.html#s-dpkgchangelog
http://wowubuntu.com/ubuntu-packaging-guide.html
打包手册:Ubuntu Packaging Guide
http://developer.ubuntu.com/resources/tools/packaging/
install: build-stamp
dh_testdir
dh_testroot
dh_prep
dh_installdirs
[ ! -f Makefile ] || $(MAKE) prefix=`pwd`/debian/wvdial/usr \
PPPDIR=`pwd`/debian/wvdial/etc/ppp/peers \
VERBOSE=1 \
install-bin
cp debian/pon.wvdial debian/poff.wvdial debian/wvdial/usr/bin/ 选自wvdial包 http://sources.debian.net/src/wvdial/1.61-4.1/debian
采用的是拷贝到目录文件的方式,不需要xxx.install , debian/wvial/ 目录下
$ DEB_CPPFLAGS_SET="-I/foo/bar/baz" DEB_CFLAGS_SET="-g -O6" DEB_LDFLAGS_SET="-L/fruzzel/frazzel/" dpkg-buildpackage -uc -us -j8 -rfakeroot 取得版本号,从chang
VERSION := $(shell dpkg-parsechangelog \
| awk '$$1 == "Version:" { print $$2; }' | cut -d- -f1)
从vifm包rules中参考
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif 安装部分
INSTALLSTRIP = install -p -o root -g root -m 755
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
INSTALLSTRIP += -s
endif
DESTDIR = `pwd`/debian/tmp
@test root = "`whoami`" || (echo need root priviledges; exit 1) #请求root权限
dpkg-shlibdeps $(BINDIR)/$(PACKAGE)
dpkg-gencontrol -isp -P$(DESTDIR)
dpkg --build $(DESTDIR) .. 直接运行 debian/rules build 构建
http://www.debian.org/doc/manuals/maint-guide/dreq.en.html
http://www.debian.org/doc/debian-policy/ch-source.html 重要参考
#export DH_VERBOSE=1
export DH_OPTIONS=-v
显示详细过程
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) in debian/rules to set DEB_HOST_MULTIARCH variable, first
设置自动安装目标目录
override_dh_auto_install:
dh_auto_install --destdir=$(CURDIR)/debian/tmp
http://sources.debian.net/src/razorqt/0.5.2-2/debian/rules
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
#export DEB_BUILD_MAINT_OPTIONS := hardening=+all
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
# CMake doesn't use CPPFLAGS, pass them to CFLAGS/CXXFLAGS instead (bug #662833)
export DEB_CFLAGS_MAINT_APPEND := -pipe -Wall $(shell dpkg-buildflags --get CPPFLAGS)
export DEB_CXXFLAGS_MAINT_APPEND := -pipe -Wall $(shell dpkg-buildflags --get CPPFLAGS)
%:
dh $@ --buildsystem=cmake --parallel
override_dh_auto_configure:
dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" -DBUNDLE_XDG_UTILS=No
override_dh_shlibdeps:
# needed because other libraries depend on
# /usr/lib/<multiarch>/razor-desktop/libdesktop-razor.so, installed in
# this private directory, and that it cannot be found otherwise
#
# dpkg-shlibdeps: warning: couldn't find library libdesktop-razor.so needed by debian/razorqt-desktop/usr/lib/x86_64-linux-gnu/razor-desktop/libiconview.so (ELF format: 'elf64-x86-64'; RPATH: '')
# ...
dh_shlibdeps -l"usr/lib/$(DEB_HOST_MULTIARCH)/razor-desktop/"
override_dh_install:
dh_install --list-missing
export QUILT_PATCHES=debian/patches
quilt applied
运维网声明
1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网 享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com