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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
idict-package := ipolish
words-package := wpolish
myspell-package := myspell-pl
export LC_ALL=C
unexport LANGUAGE
SOURCE_DIR := $(CURDIR)
TMP_BUILD_DIR := debian/BUILDDIR
SORT_C := LC_ALL=C sort
LOCALE_NAME := pl_PL
LOCALE_CHARSET := ISO-8859-2
ifeq (,$(wildcard /usr/share/i18n/charmaps))
LOCALE_DIR :=
SORT_PL := env -u LOCPATH LC_ALL="$(LOCALE_NAME).$(LOCALE_CHARSET)" sort
else
LOCALE_DIR := $(TMP_BUILD_DIR)/locale
SORT_PL := env LOCPATH="$(LOCALE_DIR)" LC_ALL="$(LOCALE_NAME).$(LOCALE_CHARSET)" sort
endif
%: force
dh "$@"
override_dh_auto_clean:
rm -rf $(TMP_BUILD_DIR)
override_dh_auto_build:
mkdir -p $(LOCALE_DIR) $(TMP_BUILD_DIR)
[ -z "$(LOCALE_DIR)" ] || \
localedef -i "$(LOCALE_NAME)" -f "$(LOCALE_CHARSET)" \
"$(LOCALE_DIR)/$(LOCALE_NAME).$(LOCALE_CHARSET)"
echo "a ą c ć e ę l ł n ń o ó s ś z ź ż" | recode utf-8..iso-8859-2 | \
tr ' ' '\n' | $(SORT_PL) -c
$(SORT_C) -k1,1 -k 2 -t/ < $(SOURCE_DIR)/polish.all > $(TMP_BUILD_DIR)/polish.mwl.tmp
icombine $(SOURCE_DIR)/polish.aff < $(TMP_BUILD_DIR)/polish.mwl.tmp > $(TMP_BUILD_DIR)/polish.mwl
gzip -9fn -c < $(TMP_BUILD_DIR)/polish.mwl > $(TMP_BUILD_DIR)/polish.mwl.gz
ispellaff2myspell --myheader debian/sources/myspell.header \
--charset=latin2 \
$(SOURCE_DIR)/polish.aff > $(TMP_BUILD_DIR)/pl.aff
cat $(TMP_BUILD_DIR)/polish.mwl | wc -l > $(TMP_BUILD_DIR)/pl.dic
cat $(TMP_BUILD_DIR)/polish.mwl >> $(TMP_BUILD_DIR)/pl.dic
buildhash $(TMP_BUILD_DIR)/polish.mwl $(SOURCE_DIR)/polish.aff $(TMP_BUILD_DIR)/polish.hash
ifeq (,$(findstring testbuild,$(DEB_BUILD_OPTIONS)))
ispell -d $(TMP_BUILD_DIR)/polish -e < $(TMP_BUILD_DIR)/polish.mwl | \
tr '\040' '\012' > $(TMP_BUILD_DIR)/polish.words.unsorted
$(SORT_PL) -u < $(TMP_BUILD_DIR)/polish.words.unsorted > $(TMP_BUILD_DIR)/polish.words
else
touch $(TMP_BUILD_DIR)/polish.words
echo "Test build.... Press any key..."
read THROWAWAY
endif
recode iso-8859-2..utf-8 $(TMP_BUILD_DIR)/polish.words
override_dh_auto_install:
dh_installdocs -p$(idict-package) $(SOURCE_DIR)/README
install -m 644 $(SOURCE_DIR)/polish.aff debian/$(idict-package)/usr/lib/ispell/
install -m 644 $(TMP_BUILD_DIR)/polish.mwl.gz debian/$(idict-package)/usr/share/ispell/
installdeb-ispell -p$(idict-package)
install -m 644 $(TMP_BUILD_DIR)/polish.words debian/$(words-package)/usr/share/dict/polish
installdeb-wordlist -p$(words-package)
installdeb-myspell -p$(myspell-package) --srcdir=$(TMP_BUILD_DIR)
installdeb-hunspell -p$(myspell-package)
.PHONY: force debian/rules override_dh_auto_build override_dh_auto_install override_dh_auto_clean
.DEFAULT_GOAL := binary
|