2
# Sample debian/rules that uses debhelper.
3
# GNU copyright 1997 to 1999 by Joey Hess.
5
# Modified for sunpinyin package by
6
3
# Liang Guo <bluestonechina@gmail.com> 2010
4
# YunQiang Su <wzssyqa@gmail.com>, 2012
6
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
10
10
PROGS=genpyt idngram_merge slminfo slmseg tslminfo getWordFreq ids2ngram \
11
11
mmseg slmbuild slmprune slmthread tslmendian tslmpack
13
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
19
build: build-arch build-indep
20
build-arch: build-stamp
21
build-indep: build-stamp
24
-$(SCONS) --prefix=$(DEB_DESTDIR)/usr
16
override_dh_auto_clean:
21
override_dh_auto_build:
22
$(SCONS) --prefix=/usr --libdir=/usr/lib/${DEB_HOST_MULTIARCH}/ --libdatadir=/usr/lib/${DEB_HOST_MULTIARCH}
25
23
for p in $(PROGS); do $(POD2MAN) --section 1 doc/$$p.pod > doc/$$p.1; done
33
-rm -r config.log config.h \
34
.sconf_temp .sconsign.dblite \
35
configure.conf sunpinyin-2.0.pc
36
-for p in $(PROGS); do rm doc/$$p.1; done
40
install: install-stamp
41
install-stamp: build-stamp
46
-$(SCONS) install --prefix=$(DEB_DESTDIR)/usr --install-sandbox=debian/tmp
47
-for p in $(PROGS); do install -D -m 0755 build/$$p $(CURDIR)/debian/tmp/usr/bin/$$p; done
48
mkdir -p $(CURDIR)/debian/tmp/usr/share/sunpinyin/
49
cp -r python $(CURDIR)/debian/tmp/usr/share/sunpinyin/
50
dh_install --sourcedir=debian/tmp --fail-missing
53
binary-arch: build install
25
override_dh_auto_install:
26
$(SCONS) install --install-sandbox=debian/tmp
27
for p in $(PROGS); do install -D -m 0755 build/$$p $(CURDIR)/debian/tmp/usr/bin/$$p; done
30
dh_install --fail-missing
31
rm -f debian/tmp/python-sunpinyin/usr/share/pyshared/sunpinyin/setup.py
34
dh_strip -plibsunpinyin3 --dbg-package=libsunpinyin3-dbg
71
# Build architecture-independent files here.
72
binary-indep: build install
73
# We have nothing to do by default.
75
binary: binary-indep binary-arch
76
.PHONY: build clean binary-indep binary-arch binary install