File: rules.old

package info (click to toggle)
gramadoir 0.7-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 12,604 kB
  • ctags: 198
  • sloc: perl: 11,207; sh: 3,016; xml: 462; lisp: 196; makefile: 148; yacc: 63; lex: 62; ansic: 26; sed: 16
file content (89 lines) | stat: -rwxr-xr-x 2,523 bytes parent folder | download | duplicates (5)
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
89
#!/usr/bin/make -f
# -*- makefile -*-
#

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

export DH_VERBOSE=1

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
	cp -f /usr/share/misc/config.{guess,sub} $(BUILD_TREE)/
	( 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 INSTALLDIRS=vendor )
	$(MAKE) -C $(LINGUA_DIR) 
	$(MAKE) -C $(LINGUA_DIR) test
	# FOR THE MOMENT
	$(MAKE) -C $(LINGUA_DIR) install PREFIX=`pwd`/debian/$(PERL_PKG)/usr
	touch $@

binary-indep: build
	dh_testdir
	dh_testroot
	dh_installdirs
	# 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
	rm -rf debian/$(PERL_PKG)/usr/bin
	dh_installexamples -p $(GRAM_PKG) build-tree/*/OOo/gramadoir.sxw

	# Move the tangled man pages
	mkdir -p debian/$(GRAM_PKG)/usr/share/man
	mv debian/$(PERL_PKG)/usr/share/man/man1 debian/$(GRAM_PKG)/usr/share/man
	rmdir debian/$(PERL_PKG)/usr/share/perl5/auto

	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