| 1 |
#!/usr/bin/make -f |
| 2 |
# |
| 3 |
# (C) 1999-2024 Roland Rosenfeld <[email protected]> |
| 4 |
|
| 5 |
# Uncomment this to turn on verbose mode. |
| 6 |
#export DH_VERBOSE=1 |
| 7 |
|
| 8 |
DINGDIR=`pwd`/debian/ding |
| 9 |
TRANSDIR=`pwd`/debian/trans-de-en |
| 10 |
DICTDIR=`pwd`/debian/dict-de-en |
| 11 |
DICTVERSION:=$(shell sed 's/^.*:: //;1q' de-en.txt) |
| 12 |
|
| 13 |
include /usr/share/dpkg/pkg-info.mk |
| 14 |
|
| 15 |
%: |
| 16 |
dh $@ |
| 17 |
|
| 18 |
override_dh_auto_build: |
| 19 |
# Build dictionaries for dictd daemon |
| 20 |
chmod 755 debian/conv.pl |
| 21 |
./debian/conv.pl < de-en.txt \ |
| 22 |
| dictfmt -j --utf8 --without-time \ |
| 23 |
-u 'https://dict.tu-chemnitz.de/' \ |
| 24 |
-s "German - English Dictionary $(DICTVERSION)" \ |
| 25 |
german-english |
| 26 |
dictzip german-english.dict |
| 27 |
./debian/conv.pl -r < de-en.txt \ |
| 28 |
| dictfmt -j --utf8 --without-time \ |
| 29 |
-u 'https://dict.tu-chemnitz.de/' \ |
| 30 |
-s "English - German Dictionary $(DICTVERSION)" \ |
| 31 |
english-german |
| 32 |
dictzip english-german.dict |
| 33 |
|
| 34 |
override_dh_auto_install: |
| 35 |
sed -e 's#/usr/share/dict/de-en.txt#/usr/share/trans/de-en#' ding \ |
| 36 |
> $(DINGDIR)/usr/bin/ding |
| 37 |
chmod 755 $(DINGDIR)/usr/bin/ding |
| 38 |
|
| 39 |
install -m644 ding.1 $(DINGDIR)/usr/share/man/man1/ding.1 |
| 40 |
install -m644 ding.desktop \ |
| 41 |
$(DINGDIR)/usr/share/applications/ding.desktop |
| 42 |
|
| 43 |
convert ding.png -geometry 32x32 -colors 6 \ |
| 44 |
$(DINGDIR)/usr/share/pixmaps/dbook.xpm |
| 45 |
install -m644 debian/mini-dbook.xpm \ |
| 46 |
$(DINGDIR)/usr/share/pixmaps/mini-dbook.xpm |
| 47 |
install -m644 ding.png $(DINGDIR)/usr/share/icons/hicolor/32x32/apps/ |
| 48 |
convert ding.png -geometry 64x64 \ |
| 49 |
$(DINGDIR)/usr/share/icons/hicolor/64x64/apps/ding.png |
| 50 |
install -m644 debian/html/* $(DINGDIR)/usr/share/doc/ding/html/ |
| 51 |
|
| 52 |
env -u LANG LC_ALL=C MANWIDTH=80 MAN_DISABLE_SECCOMP=1 \ |
| 53 |
man -l -7 -P /bin/cat ding.1 | col -b \ |
| 54 |
> $(DINGDIR)/usr/share/doc/ding/html/ding.1.txt |
| 55 |
|
| 56 |
install -m755 -d $(TRANSDIR)/usr/share/trans |
| 57 |
install -m644 de-en.txt $(TRANSDIR)/usr/share/trans/de-en |
| 58 |
|
| 59 |
install -m 644 debian/english-german-conf.xml \ |
| 60 |
$(DICTDIR)/usr/share/opendict/dictionaries/plain/english-german.dict.dz/conf/config.xml |
| 61 |
install -m 644 debian/german-english-conf.xml \ |
| 62 |
$(DICTDIR)/usr/share/opendict/dictionaries/plain/german-english.dict.dz/conf/config.xml |
| 63 |
|
| 64 |
override_dh_clean: |
| 65 |
-rm -f *.dz *.index *.dict *.dictfmt |
| 66 |
dh_clean |