Author: TrinitronX Language: bash
Description: Creating Debian package Timestamp: 2008-12-21 01:24:35 +0000
View raw paste Reply
# So far this is what I've done:
# Get source code tarballs & debian diffs
wget http://li.archive.ubuntu.com/ubuntu/pool/main/x/xine-lib/xine-lib_1.1.15.orig.tar.gz
wget http://li.archive.ubuntu.com/ubuntu/pool/main/x/xine-lib/xine-lib_1.1.15-0ubuntu7.dsc
wget http://li.archive.ubuntu.com/ubuntu/pool/main/x/xine-lib/xine-lib_1.1.15-0ubuntu7.diff.gz

# untar stock source code
tar -zxvf xine-lib_1.1.15.orig.tar.gz
cd xine-lib-1.1.15/

# apply the debian diff to original stock source
# This should create the debian/ directory and files within, including current patches within Ubuntu
 zcat ../xine-lib_1.1.15-0ubuntu7.diff.gz | patch -p1

# Next, I copy the xine-lib-hd.patch into the debian/patches dir
cp /path/to/xine-lib-hd.patch debian/patches


After this, I use the following quick script to convert the patch into dpatch format:

[code]

#!/bin/bash
NUM="07"
DESC="xine-lib-hd"
WHATPATCHDOES="Adds dvb support for pcHDTV 5500 card to xine.\
Patch was distributed with card, I am not original author."


PATH_TO_DEB_PATCHES="/home/trinitronx/src/xine/xine-lib-1.1.15/debian/patches"

cat $1 | \
        dpatch patch-template -p "${NUMBER}_${DESC}" \
        "${WHATPATCHDOES}" > ${PATH_TO_DEB_PATCHES}/${NUM}_${DESC}.dpatch

[/code]

# Command to convert:
patch2debian.sh /home/trinitronx/src/xine/xine-lib-1.1.15/debian/patches/xine-lib-hd.patch

# Now patch is in correct format.  Add 1 line to the debian/patches/00list file to add patch in order:

07_xine-lib-hd.dpatch

# Now dpatch should work as part of the packaging process, however the normal packaging command fails:
chmod +x debian/rules
dpkg-buildpackage -rfakeroot -k

# ERROR recieved:
# applying patch 07_xine-lib-hd to ./ ... failed.
# make: *** [patch-stamp] Error 1

#  To double check, I run: dpatch apply-all, and it fails to apply cleanly.  Is there a more recent patch that will apply on my version of the source?

# This patch does not apply cleanly with only:

dpatch apply 07_xine-lib-hd.dpatch

# or with original patch via:

cat ../patches/xine-lib-hd.patch | patch -p1

# It doesn't seem to be an issue with the order of patches being applied.
View raw paste Reply