#!/usr/bin/make -f # This software may be used, modified, copied, distributed, and sold, # in both source and binary form. This why under no circumstances is # the author responsible for the proper functioning of this software, # nor does the author assume any responsibility for damages incurred # with its use. USE AT YOUR OWN RISK ! SHELL = /bin/bash package = console-cyrillic byte_encodings = cp1251 ibm866 iso-8859-5 koi8-r koi8-u mac-cyrillic mik pt154 encodings = unicode rk1048 $(byte_encodings) kazakh=debian/binary/console-kazakh-0.2b BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date) clean: -rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars binary-indep: checkroot -rm -rf debian/tmp mkdir -p debian/tmp/DEBIAN cp debian/postrm debian/tmp/DEBIAN mkdir -p debian/tmp/usr/share/doc/$(package) cp debian/copyright debian/tmp/usr/share/doc/$(package) cp debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian gzip -9nv debian/tmp/usr/share/doc/$(package)/changelog.Debian cp debian/README debian/tmp/usr/share/doc/$(package)/README.Debian cp -t debian/tmp/usr/share/doc/$(package)/ debian/README.Debian.old debian/Cyr_and_Lat.README debian/README.ru debian/README.eng sed '/README.en/d' $(kazakh)/README.ru >debian/tmp/usr/share/doc/${package}/README.console-kazakh mkdir -p debian/tmp/usr/share/doc/$(package)/dosemu cp -t debian/tmp/usr/share/doc/$(package)/dosemu/ x-window/vga.bdf debian/mik.bdf mkdir -p debian/tmp/usr/share/doc/$(package)/windows set -e; \ for enc in $(byte_encodings); do \ trcs -f koi8-r -t $${enc} windows.txt >debian/tmp/usr/share/doc/$(package)/windows/$${enc}; \ done iconv -f koi8-r -t utf-8 windows.txt >debian/tmp/usr/share/doc/$(package)/windows/utf-8 mkdir -p debian/tmp/usr/share/console-cyrillic set -e; \ for enc in $(encodings); do \ debian/makeenc $$enc debian/tmp/usr/share/console-cyrillic/ru-$${enc}.kmap;\ done set -e; \ for enc in $(encodings); do \ debian/makeenc $$enc debian/tmp/usr/share/console-cyrillic/ru_ms-$${enc}.kmap;\ done set -e; \ for enc in $(encodings); do \ debian/makeenc $$enc debian/tmp/usr/share/console-cyrillic/by-$${enc}.kmap;\ done set -e; \ for enc in $(encodings); do \ debian/makeenc $$enc debian/tmp/usr/share/console-cyrillic/bg_bds-$${enc}.kmap;\ done set -e; \ for enc in $(encodings); do \ debian/makeenc $$enc debian/tmp/usr/share/console-cyrillic/bg_phon-$${enc}.kmap;\ done set -e; \ for enc in $(encodings); do \ debian/makeenc $$enc debian/tmp/usr/share/console-cyrillic/sr-$${enc}.kmap;\ done set -e; \ for enc in $(encodings); do \ debian/makeenc $$enc debian/tmp/usr/share/console-cyrillic/mk-$${enc}.kmap;\ done set -e; \ for enc in $(encodings); do \ debian/makeenc $$enc debian/tmp/usr/share/console-cyrillic/ua-$${enc}.kmap;\ done set -e; \ for enc in $(encodings); do \ debian/makeenc $$enc debian/tmp/usr/share/console-cyrillic/ua_ms-$${enc}.kmap;\ done set -e; \ for enc in $(encodings); do \ debian/makeenc $$enc debian/tmp/usr/share/console-cyrillic/mn-$${enc}.kmap;\ done set -e; \ for enc in $(encodings); do \ debian/makeenc $$enc debian/tmp/usr/share/console-cyrillic/kaz_gost-$${enc}.kmap;\ done set -e; \ for enc in $(encodings); do \ debian/makeenc $$enc debian/tmp/usr/share/console-cyrillic/kaz_alt-$${enc}.kmap;\ done cp -t debian/tmp/usr/share/console-cyrillic debian/option-*.kmap acm/* sfm/* debian/cyrillic.fallback debian/*.screenmap psf/* debian/binary/*.psf debian/binary/*.acm $(kazakh)/acm/rk1048.acm $(kazakh)/sfm/*.sfm $(kazakh)/psf/*.psf debian/*.trans echo '# This file is combination between cyrillic.fallback and graph.fallback' >debian/tmp/usr/share/console-cyrillic/cyrillic-graph.fallback cat debian/cyrillic.fallback >>debian/tmp/usr/share/console-cyrillic/cyrillic-graph.fallback zcat /usr/share/consoletrans/graph.fallback.gz >>debian/tmp/usr/share/console-cyrillic/cyrillic-graph.fallback gzip -9nv debian/tmp/usr/share/console-cyrillic/*.acm gzip -9nv debian/tmp/usr/share/console-cyrillic/*.sfm gzip -9nv debian/tmp/usr/share/console-cyrillic/*.fallback mkdir -p debian/tmp/usr/bin cp -t debian/tmp/usr/bin scripts/* debian/cyr mkdir -p debian/tmp/usr/share/man/man1 set -e; \ for s in displayfont dumppsf makeacm raw2psf; do \ pod2man scripts/$$s >debian/tmp/usr/share/man/man1/$$s.1; \ done cp -t debian/tmp/usr/share/man/man1/ debian/cyr.1 debian/mkvgafont.1 gzip -9nv debian/tmp/usr/share/man/man1/*.1 mkdir -p debian/tmp/usr/share/lintian/overrides cp debian/console-cyrillic.lintian-overrides debian/tmp/usr/share/lintian/overrides/console-cyrillic dpkg-gencontrol chown -R 0:0 debian/tmp chmod -R go=rX,u=rwX debian/tmp find debian/tmp -newermt '$(BUILD_DATE)' -exec touch --no-dereference --date='$(BUILD_DATE)' {} + dpkg --build debian/tmp .. binary-arch: checkroot binary: binary-indep binary-arch checkroot: test $$(id -u) -eq 0 build-arch: build-indep: .PHONY: build build-arch build-indep binary binary-arch binary-indep clean checkroot