4 175
muokkausta
(→rules) |
p (→Patchit: vähän selittelyä) |
||
Rivi 320: | Rivi 320: | ||
<pre> | <pre> | ||
patch-stamp: | patch-stamp: | ||
dh_testdir | dh_testdir # Oikea hakemisto | ||
@patches=debian/patches/*.patch; for patch in $$patches; do \ | # Kaikille .patch-päätteisille tiedostoille patches-hakemistossa | ||
@patches=debian/patches/*.patch; for patch in $$patches; do \ | |||
test -f $$patch || continue; \ | test -f $$patch || continue; \ | ||
echo "Applying $$patch"; \ | echo "Applying $$patch"; \ | ||
patch -stuN -p1 < $$patch || exit 1; \ | patch -stuN -p1 < $$patch || exit 1; \ # Otetaan pathci käyttöön | ||
done | done | ||
touch $@ | touch $@ | ||
# | # Patchien poistaminen (ajettaessa make clean), palauttaa lähdekoodin alkuperäiseksi | ||
unpatch: | unpatch: | ||
dh_testdir | dh_testdir | ||
@if test -f patch-stamp; then \ | @if test -f patch-stamp; then \ | ||
patches=debian/patches/*.patch; \ | patches=debian/patches/*.patch; \ | ||
for patch in $$patches; do \ | for patch in $$patches; do \ # Kerätään kaikki patchit | ||
reversepatches="$$patch $$reversepatches"; \ | reversepatches="$$patch $$reversepatches"; \ | ||
done; \ | done; \ | ||
Rivi 339: | Rivi 340: | ||
test -f $$patch || continue; \ | test -f $$patch || continue; \ | ||
echo "Reversing $$patch"; \ | echo "Reversing $$patch"; \ | ||
patch -suRf -p1 < $$patch || exit 1; \ | patch -suRf -p1 < $$patch || exit 1; \ # Poistetaan patchi | ||
done; \ | done; \ | ||
rm -f patch-stamp; \ | rm -f patch-stamp; \ |