#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE = 1 include /usr/share/dpkg/pkg-info.mk include /usr/share/dpkg/architecture.mk REV ?= $(shell echo "$(DEB_VERSION)" | sed 's/.*[-]\([[:digit:]][[:digit:]]*\)/\1/g') CK_BASE = core/ckeditor_base BUILDDIR = debian/builddir %: dh $@ override_dh_clean: dh_clean rm -rf $(BUILDDIR) rm -rf builtsamples # rebuilt long line $(BUILDDIR)/${CK_BASE}.min.js: $(BUILDDIR)/${CK_BASE}.js $(BUILDDIR)/build.stamp cd $(BUILDDIR) && closure-compiler --js ${CK_BASE}.js --js_output_file ${CK_BASE}.min.js $(BUILDDIR)/ckeditor.js: ckeditor.js $(BUILDDIR)/${CK_BASE}.min.js sed -e '/^\/\/[[:space:]]*AUTOGENERATED by debian/{r $(BUILDDIR)/${CK_BASE}.min.js' -e 'h;}' \ -e '$${x;/./{x;q0};x;q1}' $< > $@ $(BUILDDIR)/build.stamp: mkdir $(BUILDDIR) rsync -a . $(BUILDDIR) --exclude debian --exclude .git rm -f $(BUILDDIR)/ckeditor.js touch $@ override_dh_auto_build: $(BUILDDIR)/build.stamp $(BUILDDIR)/ckeditor.js dh_auto_build cd $(BUILDDIR)/dev/builder \ && xvfb-run \ java -jar /usr/share/ckbuilder/ckbuilder.jar \ -d 1 \ --no-zip --no-tar --overwrite \ --version="$(DEB_VERSION_UPSTREAM)" --revision="$(REV)" \ --build ../../ _build override_dh_installexamples: ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) # update path for examples cp -fr samples builtsamples rsync -v -am --include='*/' --include='*/*/' --include='*/*/samples/**' --exclude='*' plugins builtsamples # no flash rm -f builtsamples/plugins/htmlwriter/samples/outputforflash.html find builtsamples -type f -name '*.html' -exec sed -i 's,