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
|
#!/usr/bin/make -f
# -*- Makefile -*-
# This is the debhelper compatability version to use.
export DH_COMPAT=4
PACKAGE = mecab-jumandic
# VERSION = $(shell dpkg-parsechangelog | awk '/^Version: /{print $$2}' | cut -f1 -d-)
VERSION = 4.0
TAR_DIR = juman-$(VERSION)
include /usr/share/dbs/dbs-build.mk
source: $(patched)
build: $(STAMP_DIR)/build
$(STAMP_DIR)/build: $(BUILD_TREE)/dic/dic.csv
dh_testdir
touch $@
$(BUILD_TREE)/dic/dic.csv: $(BUILD_TREE)/dic/JUMAN.connect
cp -p debian/{juman2mecab.pl,dicrc,jumanrc} $(BUILD_TREE)/dic/
cd $(BUILD_TREE)/dic && perl juman2mecab.pl
sort $@ | uniq > $@.tmp
mv $@.tmp $@
$(BUILD_TREE)/dic/JUMAN.connect: $(patched)
cd $(BUILD_TREE) && ./configure
$(MAKE) -C $(BUILD_TREE)/dic JUMAN.connect
clean:
dh_testdir
dh_testroot
dh_clean
-rm -rf $(STAMP_DIR) $(SOURCE_DIR)
install: dir=debian/mecab-jumandic/usr/share/mecab/dic/juman
install: build
dh_testdir
dh_testroot
dh_clean
mkdir -p $(dir)
cp -p debian/dicrc $(BUILD_TREE)/dic/*.csv $(dir)
binary-indep: install
dh_testdir
dh_testroot
dh_installdocs
dh_installchangelogs
for f in debian/mecab-jumandic/usr/share/mecab/dic/juman/* ; do \
dh_link -pmecab-jumandic \
`echo $$f|sed s,debian/mecab-jumandic/,,` \
`echo $$f|sed s,debian/mecab-jumandic/usr/share/,var/lib/,` ;\
done
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep
|