File: rules

package info (click to toggle)
sunpinyin 2.0.3%2Bgit20120607-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,372 kB
  • sloc: cpp: 14,549; python: 1,309; makefile: 154
file content (35 lines) | stat: -rwxr-xr-x 1,044 bytes parent folder | download
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
#!/usr/bin/make -f
export DH_VERBOSE=1
# Liang Guo <bluestonechina@gmail.com> 2010
# YunQiang Su <wzssyqa@gmail.com>, 2012

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

SCONS=scons 
POD2MAN=pod2man
PROGS=genpyt idngram_merge slminfo slmseg tslminfo getWordFreq ids2ngram \
      mmseg slmbuild slmprune slmthread tslmendian tslmpack

%:
	dh $@ --with python2

override_dh_auto_clean:
	dh_auto_clean
	scons -c .
	rm -rf .sconf_temp

override_dh_auto_build:
	$(SCONS)  --prefix=/usr --libdir=/usr/lib/${DEB_HOST_MULTIARCH}/ --libdatadir=/usr/lib/${DEB_HOST_MULTIARCH}
	for p in $(PROGS); do $(POD2MAN) --section 1 doc/$$p.pod > doc/$$p.1; done
	
override_dh_auto_install:
	$(SCONS) install --install-sandbox=debian/tmp
	for p in $(PROGS); do install -D -m 0755 build/$$p $(CURDIR)/debian/tmp/usr/bin/$$p; done

override_dh_install:
	dh_install --fail-missing
	rm -f debian/tmp/python-sunpinyin/usr/share/pyshared/sunpinyin/setup.py

override_dh_strip:
	dh_strip -plibsunpinyin3 --dbg-package=libsunpinyin3-dbg
	dh_strip