debian-mingw-5 to debian-mingw-6 migration snippets
This page tries to summarize all steps to add a debian-mingw-6 package to a project with existing debian-mingw-5 packaging.
Changelog for adding package
Extend changelog with something like "Adding mingw-6 packaging":
$EDITOR debian-*/changelog
# just edit the first one
pba-syncchangelogsCreate debian-mingw-6
svn cp debian-mingw-5/ debian-mingw-6
echo 9 >debian-mingw-6/compat
$EDITOR debian-mingw-6/changelog debian-mingw-6/control debian-mingw-6/rules
# remove evtl. *.install files!New changelog file
change the source package name in the first entry
delete 2nd and further entries.
New control file
Change dephelper dependency from
(>= 5)to(>= 9)Change
PBA-Distributionfromsqueezeand/orwheezytojessieChange other occurences of 5 to 6, in package names and PBA-Build-Source mingw, but be careful not to destroy anything
Drop build dependencies on
mingw-w32-gcc, mingw-w32-pkg-config, mingw-w64-gcc, mingw-w64-pkg-configAdd build dependencies on
mingw-w64-tools, g++-mingw-w64If not using fancylibs
To mingw-w32 binary packages, add dependency
mingw-w32-gcc-rtresp.mingw-w32-g++-rtTo mingw-w32 *-dev packages, add dependency
mingw-w64-i686-devTo mingw-w64 binary packages, add dependency
mingw-w64-g++-rtresp.mingw-w64-g++-rtTo mingw-w64 *-dev packages, add dependency
mingw-w64-x86-64-dev
Change Architectures from
anytoallCheck if *-dev packages depend on *-dev packages of libraries, not to the runtime packages
New rules file, obligatory
Change occurences of 5 to 6, in package names
Evtl. insert
DEB_UPSTREAM_VERSION ?= $(shell dpkg-parsechangelog | sed -rne 's/^Version: ([0-9.]+)[-+].*$$/\1/p')Change
build-archtobuild-indep,install-archtoinstall-indep, don't forgetrmandtouchcalls but do NOT damagearch=$(archXX)directivesIf not using debian-* directories, add
debian/devhost.txt.gz debian/*.substvars debian/*.debhelper.logto the list of cleaned files (to avoid 'package without artifacts' errors on rebuilds)
New rules file, optional
These steps optimize the packaging process and to some degree the binaries by using fine-tuned debhelper 9 functions over un-tuned debhelper 5/6 functions, but we came across a few packages where it broke the packaging process.
Drop
include /usr/.../debhelper.mkNot sure if required: Empty an eventual
DEB_SHLIBDEPS_INCLUDEDrop an eventual
DEB_DH_STRIP_ARGSAdapt from
*.installtoPKGROOT=$(shell pwd)/debianandDESTDIR=$(PKGROOT)/$(packageXX)Insert the block below
%:
dh $@
# do not strip anything.
# call 'strip' on a mingw lib*.a file causes the ranlib information to
# be discarded rendering the libraries useless.
override_dh_strip:
override_dh_shlibdeps:
export DEB_CFLAGS_MAINT_SET = -O2 -Wall
export DEB_CXXFLAGS_MAINT_SET = -O2 -Wall
export DEB_LDFLAGS_MAINT_SET =
build-indep: common-build-indep
install-indep: common-install-indep
INSTALL_PROGRAM = installTest build
pba-builddeps -i -o "arch|unix|6"
pba-build -u -i -o "arch|unix|6"
# or one-by-one
pba-build -u -i -o "arch|unix"
pba-build -u -i -o "6"Release
pba-release