X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=branch%2Fdouble_build%2FR%2Fpatch.R;fp=branch%2Fdouble_build%2FR%2Fpatch.R;h=b9dc8cee261bfda8d68128b6f1a5e0d3298180bd;hb=bbe8a759637a74b5036c8c7345de55a96cb7bbd6;hp=0000000000000000000000000000000000000000;hpb=449efd24870d395eb1edfd4d3a59e239c8cc5547;p=cran2deb.git diff --git a/branch/double_build/R/patch.R b/branch/double_build/R/patch.R new file mode 100644 index 0000000..b9dc8ce --- /dev/null +++ b/branch/double_build/R/patch.R @@ -0,0 +1,20 @@ +apply_patches <- function(pkg) { + patch_path = file.path(patch_dir, pkg$name) + if (!file.exists(patch_path)) { + notice('no patches in',patch_path) + return() + } + + # make debian/patches for simple-patchsys + deb_patch = pkg$debfile('patches') + if (!dir.create(deb_patch)) { + fail('could not create patches directory', deb_patch) + } + + # now just copy the contents of patch_path into debian/patches + for (patch in list.files(patch_path)) { + notice('including patch', patch) + file.copy(file.path(patch_path, patch), deb_patch) + } +} +