You are not logged in.
I have a file [yes it's a Makefile]
with this idiot line:
CFLAGS += '-DGLADEDIR="data"'
I want it replaced to
CFLAGS += '-DGLADEDIR="/usr/local/share/de-jong-explorer/data"'
how can I write a patch to do this
and do I integrate it to my PKGBUILD
thank you very much in advance
Offline
Modify the line, and then save the Makefile and something like Makefile.new. Then run this to make a patch:
diff -u Makefile Makefile.new > Makefile.patchThen in your PKGBUILD, run the patch like this:
patch -p0 < $startdir/Makefile.patch
Modify the instructions to taste.
"Contrary to popular belief, penguins are not the salvation of modern technology. Neither do they throw parties for the urban proletariat."
Offline
Well you have two possibilities: use sed or use diff to create a patch. With sed:
sed -i -e '/^CFLAGS +=/ s@data@/usr/local/share/de-jong-explorer/data@' MakefileOr keep a copy of the original Makefile, create the new one and then diff:
diff -Naur Makefile.orig Makefile >patchfileThen in the PKGBUILD apply with patch:
patch -Np0 -i patchfileYou may have to change the 0 to suit pathnames in the source tree. See the man page.
Offline
Offline