File: rules

package info (click to toggle)
gramadoir 0.7-6
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 12,628 kB
  • sloc: perl: 11,207; sh: 2,973; xml: 462; lisp: 196; makefile: 94; yacc: 63; lex: 62; ansic: 26; sed: 16
file content (63 lines) | stat: -rwxr-xr-x 2,078 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
#!/usr/bin/make -f
# -*- makefile -*-
#

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

# The magic debhelper  rule
%:
	dh $@ --with autoreconf,elpa

include /usr/share/dpkg/pkg-info.mk
export DEB_VERSION_UPSTREAM

ELPA_NAME=gramadoir
export DH_VERBOSE=1
DESTDIR:=`pwd`/debian/tmp/
PACKAGE:=gramadoir
VERSION:=0.7
GRAMADOIR_GA_VERSION:=0.70
GRAMADOIR_GA_DIR:=gramadoir-ga-0.60
LINGUA_DIR=Lingua-GA-Gramadoir-0.70
GRAM_PKG:=gramadoir
PERL_PKG:=liblingua-ga-gramadoir-perl

execute_after_dh_auto_clean:
	find . -name '*.hash' -delete 
	rm -f Lingua-GA-Gramadoir-0.70/MYMETA.* Lingua-GA-Gramadoir-0.70/Makefile
	rm -rf Lingua-GA-Gramadoir-0.70/blib
	if test -f gramadoir.el.orig ; then ( rm gramadoir.el; mv gramadoir.el.orig gramadoir.el ); fi

execute_after_dh_auto_configure:
	cp gramadoir.el gramadoir.el.orig
	iconv --from-code=iso-8859-1 --to-code=utf-8 gramadoir.el.orig > gramadoir.el
	# ( cd $(GRAMADOIR_GA_DIR) &&  ./configure  && $(MAKE) )
	( cd $(LINGUA_DIR) && perl Makefile.PL INSTALLDIRS=vendor )

override_dh_auto_test:
	$(MAKE) -C $(LINGUA_DIR) test

override_dh_auto_build:
	$(MAKE) -C $(LINGUA_DIR) 

override_dh_auto_install:
	# FOR THE MOMENT
	$(MAKE) -C $(LINGUA_DIR) install DESTDIR=`pwd`/debian/$(PERL_PKG)
	# chmod +x gramadoir.vim
	dh_install -p $(GRAM_PKG) gramadoir.vim usr/share/vim/addons/plugin
	# dh_install -p $(GRAM_PKG) gramadoir.dtd usr/share/xml/gramadoir
	# dh_install -p $(GRAM_PKG) gramadoir.el  usr/share/emacs/site-lisp/gramadoir
	dh_install -p $(GRAM_PKG) $(LINGUA_DIR)/blib/script/gram-ga.pl usr/bin
	dh_install -p $(GRAM_PKG) $(LINGUA_DIR)/blib/script/groo-ga.pl usr/bin
	rm -rf debian/$(PERL_PKG)/usr/bin
	dh_installexamples -p $(GRAM_PKG) OOo/gramadoir.sxw
	# Drop extensions
	mv debian/gramadoir/usr/bin/gram-ga.pl debian/gramadoir/usr/bin/gram-ga
	mv debian/gramadoir/usr/bin/groo-ga.pl debian/gramadoir/usr/bin/groo-ga
	# 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
	dh_installemacsen
	dh_installchangelogs ChangeLog