first cut at docs for this package
[build.git] / Patchrules
1 #!/bin/sh
2 #
3 # Hack to generate patch rules for make < 3.80
4 #
5 # Copyright (c) 2003  The Trustees of Princeton University (Trustees).
6
7 # $Id: Patchrules,v 1.1 2004/04/09 19:24:00 mlh-pl_rpm Exp $
8 #
9
10 while read PatchSet n ; do
11
12 [ "$PatchSet" != "PatchSet" ] && continue;
13
14 cat <<EOF
15 # In case the spec file did not explicitly list the PatchSet
16 ifeq (\$(origin Patch${n}),undefined)
17 Patch${n} := \$(package)-${n}.patch.bz2
18 endif
19
20 # Get rid of URL
21 Patch${n} := \$(notdir \$(Patch${n}))
22
23 # Add patch to the list of sources
24 SOURCES += SOURCES/\$(Patch${n})
25
26 # Generate uncompressed patch
27 SOURCES/\$(patsubst %.gz,%,\$(patsubst %.bz2,%,\$(Patch${n}))):
28         mkdir -p SOURCES
29         cvsps --cvs-direct --root \$(CVSROOT) -g -s ${n} \$(MODULE) > \$@
30 EOF
31
32 done