File: rules

package info (click to toggle)
mecab 0.80-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 416 kB
  • ctags: 7
  • sloc: makefile: 27
file content (39 lines) | stat: -rwxr-xr-x 1,235 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
36
37
38
39
#!/usr/bin/make -f
# -*- Makefile -*-

SUBDIRS    = src man doc
VERSION    = $(shell dpkg-parsechangelog|awk '/^Version: /{print $$2}')
LIBPACKAGE = $(shell dh_listpackages|egrep 'lib.*[0-9]')
LIBFILES   = debian/$(LIBPACKAGE).files

DEB_TAR_SRCDIR := mecab-$(shell echo $(VERSION)|cut -f1 -d-)

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/rules/tarball.mk

DEB_CONFIGURE_LIBEXECDIR  = /usr/lib
DEB_CONFIGURE_EXTRA_FLAGS = --with-perl5=/usr/bin/perl
DEB_MAKE_INVOKE          += SUBDIRS='$(SUBDIRS)'
DEB_MAKE_INSTALL_TARGET  += SUBDIRS='$(SUBDIRS)'
DEB_DH_MAKESHLIBS_ARGS   += -V"$(LIBPACKAGE) (>= $(VERSION))"

binary-post-install/mecab::
	dh_movefiles -p$(cdbs_curpkg)
	cp -p $(DEB_BUILDDIR)/dic/{dicrc,ipa2mecab.pl} debian/$(cdbs_curpkg)/usr/share/doc/mecab/ipadic/

binary-post-install/mecab-utils::
	dh_movefiles -p$(cdbs_curpkg)

binary-post-install/libmecab-dev::
	dh_movefiles -p$(cdbs_curpkg)

binary-post-install/$(LIBPACKAGE):: $(LIBFILES)
	dh_movefiles -p$(cdbs_curpkg)

$(LIBFILES): debian/control debian/rules debian/libmecab.files.in
	cp -p debian/libmecab.files.in $@

clean::
	-rm -f $(LIBFILES)