1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
#!/usr/bin/make -f
# use for debugging
# extraInstallFlags := --no-clean-on-error
# or manually run
# MAKEFLAGS="LDFLAGS=-Wl,-z,relro" R CMD INSTALL -l `pwd`/debian/r-cran-yaml/usr/lib/R/site-library --clean --no-clean-on-error .
# and/or
# cd src && gcc -std=gnu99 -I/usr/share/R/include -I. -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c implicit.c -o implicit.o
# and/or
# cd src && gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o yaml.so implicit.o r-ext.o -L/usr/lib/R/lib -lR
#
# see also /etc/R/Makeconf and /usr/lib/R/etc/Makeconf
# and https://cran.r-project.org/doc/manuals/r-release/R-exts.html
# and https://cran.r-project.org/doc/manuals/R-admin.html#Customizing-package-compilation
#
# see http://pyyaml.org/wiki/LibYAML for libyaml upstream docs
# our hacking of upstream is noticed during build:
# * installing *source* package ‘yaml’ ...
# files ‘src/api.c’, ‘src/dumper.c’, ‘src/emitter.c’, ‘src/loader.c’, ‘src/parser.c’, ‘src/reader.c’, ‘src/scanner.c’, ‘src/writer.c’, ‘src/yaml.h’ are missing
# files ‘src/Makevars’, ‘src/implicit.c’, ‘src/r-ext.h’ have the wrong MD5 checksums
# FIXME: get rid of these warnings
# we need -lyaml , if this lacks we get:
# ** testing if installed package can be loaded
# Error in dyn.load(file, DLLpath = DLLpath, ...) :·
# unable to load shared object '.../r-cran-yaml-2.1.13/
# debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so':
# .../r-cran-yaml-2.1.13/debian/r-cran-yaml/usr/lib/R/
# site-library/yaml/libs/yaml.so: undefined symbol:
# yaml_sequence_start_event_initialize
# Error: loading failed
# during build
# FIXME contact upstream, do stress-test our yaml.so; perhaps we'd better ship a
# src/Makefile: this could be useable by both us and upstream.
%:
dh $@ --buildsystem R
override_dh_install:
dh_install
find debian -name LICENSE -o -name CHANGELOG -o -name THANKS | xargs -r rm -f
override_dh_installchangelogs:
dh_installchangelogs ./inst/CHANGELOG
|