| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export GEM2DEB_TEST_RUNNER = --check-dependencies |
| 4 |
export DH_RUBY = --gem-install |
| 5 |
export ASCIIDOCTOR_MANPAGE_PATH = $(CURDIR)/man/asciidoctor.1 |
| 6 |
# export ASCIIDOCTOR_LIB_DIR = $(CURDIR)/debian/ruby-asciidoctor/usr/lib/ruby/vendor_ruby |
| 7 |
|
| 8 |
%: |
| 9 |
dh $@ --buildsystem=ruby --with ruby |
| 10 |
|
| 11 |
override_dh_auto_clean: |
| 12 |
dh_auto_clean |
| 13 |
rm -rf doc |
| 14 |
|
| 15 |
override_dh_auto_build: |
| 16 |
dh_auto_build |
| 17 |
# build documentation |
| 18 |
rdoc --main=README.adoc lib |
| 19 |
rm -f doc/js/*.js.gz |
| 20 |
|
| 21 |
override_dh_auto_install: |
| 22 |
# needed since we split the packages |
| 23 |
install -d debian/ruby-asciidoctor/usr/share/ruby-asciidoctor |
| 24 |
cp -r data/* debian/ruby-asciidoctor/usr/share/ruby-asciidoctor |
| 25 |
dh_auto_install |
| 26 |
# remove asciidoctor-safe |
| 27 |
rm -f debian/ruby-asciidoctor/usr/bin/asciidoctor-safe |
| 28 |
# remove bundled jquery.js |
| 29 |
rm -f debian/asciidoctor-doc/usr/share/doc/asciidoctor-doc/html/js/jquery.js |
| 30 |
mkdir -p debian/asciidoctor/usr/bin |
| 31 |
mv debian/ruby-asciidoctor/usr/bin/* debian/asciidoctor/usr/bin/ |
| 32 |
rmdir debian/ruby-asciidoctor/usr/bin |
| 33 |
|
| 34 |
override_dh_installchangelogs: |
| 35 |
dh_installchangelogs -O--buildsystem=ruby CHANGELOG.adoc |
| 36 |
|
| 37 |
override_dh_installdocs: |
| 38 |
bin/asciidoctor -a webfonts! -a icons! -a image-uri-screenshot! README*.adoc |
| 39 |
dh_installdocs |