[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Best Packaging Practices, act II



> It first put the patches in a make variable:
> 
>   PATCHES:=$(shell cd debian/diffs && ls *.patch)

PATCHES:=$(wildcard debian/diffs/*.patch)

I did something along these lines, but I allowed patches in
debian/patches. I accomplished this by requiring a file
(debian/patches/00list), with a list of patches to apply.

I utilised `tac' (or sort? I don't remember) to get a reverse
list.

>   patch: patch-stamp
>   patch-stamp:
>         for PATCH in $(PATCHES); do \
>           echo \# Applying patch $$PATCH; \
>           patch -p1 < debian/diffs/$$PATCH; \
>         done
>         touch patch-stamp

My version did some error checking, and logged the output of patch in a
file. Also, I added support to generate comments from patches, so if one
would have wanted, he could make a PATCHES.Debian file.

Oh. And the system I used consisted of self-applying patches. That made
it possible to pass -p1 -p2 or even -p0 to patch. or any other argument.
It would have been possible to write an ed script to do the patching. Or
a sed script.

To be honest, I stole^Wborrowed the original version from gcc (iirc),
and hacked a bit on it to fit my needs. An example of it is in the delo
package.

Cheers,
-- 
Gergely Nagy \ mhp/|8]


-- 
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: