File: rules

package info (click to toggle)
gramadoir 0.6-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,544 kB
  • ctags: 11
  • sloc: makefile: 64; sh: 43
file content (88 lines) | stat: -rwxr-xr-x 2,721 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
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
#!/usr/bin/make -f
# -*- makefile -*-
#

# turn around bug in dpkg-parsechangelog
export LC_ALL=C
export DH_COMPAT=5

PACKAGE=gramadoir
VERSION=0.6

GRAMADOIR_GA_VERSION=0.60
GRAMADOIR_GA_DIR=$(BUILD_TREE)/gramadoir-ga-0.60
LINGUA_DIR=$(GRAMADOIR_GA_DIR)/Lingua-GA-Gramadoir

GRAM_PKG=gramadoir
PERL_PKG=liblingua-ga-gramadoir-perl

# The DBS rules
TAR_DIR=$(PACKAGE)-$(VERSION)
include /usr/share/dbs/dbs-build.mk
# convenient way to set architecture specification strings
# the ifeq condition is here to allow them to be overridden
# from the command line
ifeq (,$(DEB_BUILD_GNU_TYPE))
 include /usr/share/dbs/dpkg-arch.mk
endif

INSTALLDIR:=`pwd`/debian/$(PACKAGE)/usr

${STAMP_DIR}/configure-stamp: $(patched)
	dh_testdir
	mv build-tree/gramadoir-ga-0.60 build-tree/gramadoir-0.6
	( cd $(BUILD_TREE) && ./configure --prefix=/usr \
	  --libexecdir=/usr/lib/gramadoir )
	touch $@

build: $(STAMP_DIR)/build-stamp
$(STAMP_DIR)/build-stamp: ${STAMP_DIR}/configure-stamp $(patched)
	dh_testdir
	( cd $(GRAMADOIR_GA_DIR) &&  ./configure  && $(MAKE) )
	( cd $(LINGUA_DIR) && perl Makefile.PL )
	$(MAKE) -C $(LINGUA_DIR) 
	$(MAKE) -C $(LINGUA_DIR) test
	# FOR THE MOMENT
	$(MAKE) -C $(LINGUA_DIR) install PREFIX=`pwd`/debian/tmp/usr
	touch $@

binary-indep: build
	dh_testdir
	dh_testroot
	dh_installdirs
	# make -C $(BUILD_TREE) install PREFIX=$(INSTALLDIR) \
	 libexecdir=$(INSTALLDIR)/lib/gramadoir
	# chmod +x build-tree/*/gramadoir.vim
	dh_install -p $(GRAM_PKG) build-tree/*/gramadoir.vim usr/share/vim/addons
	dh_install -p $(GRAM_PKG) build-tree/*/gramadoir.dtd usr/share/xml/gramadoir
	dh_install -p $(GRAM_PKG) build-tree/*/gramadoir.el  usr/share/emacs/site-lisp/gramadoir
	dh_install -p $(GRAM_PKG) build-tree/*/gramadoir-ga-*/Lingua-GA-Gramadoir/blib/script/gram-ga.pl usr/bin
	dh_install -p $(GRAM_PKG) build-tree/*/gramadoir-ga-*/Lingua-GA-Gramadoir/blib/script/groo-ga.pl usr/bin
	dh_install -p $(PERL_PKG) debian/tmp/usr/local/lib/perl/5.8.8/auto/Lingua usr/share/perl5/auto
	dh_install -p $(PERL_PKG) debian/tmp/usr/local/share/perl/5.8.8/Lingua usr/share/perl5
	dh_installexamples -p $(GRAM_PKG) build-tree/*/OOo/gramadoir.sxw
	dh_installman -p $(GRAM_PKG) debian/tmp/usr/local/man/man1/gram-ga.pl.1p
	dh_installman -p $(GRAM_PKG) debian/tmp/usr/local/man/man1/groo-ga.pl.1p
	dh_installman -p $(PERL_PKG) debian/tmp/usr/local/man/man3/Lingua::GA::Gramadoir.3pm

	dh_installemacsen
	dh_installchangelogs $(BUILD_TREE)/ChangeLog
	dh_installdocs $(BUILD_TREE)/README 
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

clean:
	dh_testdir
	dh_testroot
	rm -rf $(STAMP_DIR) $(SOURCE_DIR)
	dh_clean

binary:	binary-indep 

.PHONY: binary binary-indep clean