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
|
#!/usr/bin/make -f
# These definitions can be removed once #842092 is fixed
include /usr/share/dpkg/default.mk
debRreposname := $(shell echo $(DEB_SOURCE) | sed 's/r-\([a-z]\+\)-.*/\1/')
awkString := "'/^(Package|Bundle):/ {print $$2 }'"
cranNameOrig := $(shell awk "$(awkString)" DESCRIPTION)
cranName := $(shell echo "$(cranNameOrig)" | tr A-Z a-z)
package := r-$(debRreposname)-$(cranName)
debRdir := usr/lib/R/site-library
debRlib := $(CURDIR)/debian/$(package)/$(debRdir)
%:
dh $@ --buildsystem R
override_dh_install:
dh_install
sed -i -e 's|http.*/jquery.min.js|file://usr/share/javascript/jquery/jquery.min.js|' \
-e 's|\([[:space:]]src="\)http.*://d3js\.org/d3\.v3\.min\.js"|\1file:///usr/share/javascript/d3/d3.min.js"|' \
$(debRlib)/$(cranName)/www/reactive-graph.html
find debian -name "LICENSE*" -delete
rm -rf $(debRlib)/$(cranName)/www/shared/showdown/license.txt
mkdir -p $(debRlib)/$(cranName)/www/shared/bootstrap/shim
cp -a debian/missing-sources/respond/respond.min.js $(debRlib)/$(cranName)/www/shared/bootstrap/shim/
mkdir -p $(debRlib)/$(cranName)/www/shared/strftime
cp -a debian/missing-sources/strftime/strftime.min.js $(debRlib)/$(cranName)/www/shared/strftime
# this fails: yui-compressor debian/missing-sources/babel-polyfill/babel-polyfill.js > $(debRlib)/$(cranName)/www/shared/babel-polyfill.min.js
# see https://lists.debian.org/debian-mentors/2016/11/msg00102.html
cp -a debian/missing-sources/babel-polyfill/babel-polyfill.min.js $(debRlib)/$(cranName)/www/shared/babel-polyfill.min.js
# see debian/README.source
mkdir -p $(debRlib)/$(cranName)/www/shared/selectize/js/
cp -a debian/missing-sources/selectize-0.12.1/selectize.min.shiny.js $(debRlib)/$(cranName)/www/shared/selectize/js/selectize.min.js
# For some very strange reason a symlink leads to unexpected results in shiny apps.
# Thus a real copy of font-awesome.min.css from fonts-font-awesome package is created.
mkdir -p $(debRlib)/$(cranName)/www/shared/font-awesome/css/
cp -a /usr/share/fonts-font-awesome/css/font-awesome.min.css $(debRlib)/$(cranName)/www/shared/font-awesome/css/
# datepicker is only non-minimized. Do the minimisation here
mkdir -p $(debRlib)/$(cranName)/www/shared/datepicker/js
closure-compiler --charset 'utf-8' --js /usr/share/javascript/bootstrap/files/js/bootstrap-datepicker.js --js_output_file $(debRlib)/$(cranName)/www/shared/datepicker/js/bootstrap-datepicker.min.js
mkdir -p $(debRlib)/$(cranName)/www/shared/datepicker/css
yui-compressor /usr/share/javascript/bootstrap/files/css/datepicker3.css > $(debRlib)/$(cranName)/www/shared/datepicker/css/bootstrap-datepicker3.min.css
mkdir -p $(debRlib)/$(cranName)/www/shared/bootstrap/shim
yui-compressor debian/missing-sources/html5shiv/html5shiv.js > $(debRlib)/$(cranName)/www/shared/bootstrap/shim/html5shiv.min.js
|