File: rules

package info (click to toggle)
gramadoir 0.4-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 988 kB
  • ctags: 7
  • sloc: makefile: 50; sh: 43
file content (70 lines) | stat: -rwxr-xr-x 1,676 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
#!/usr/bin/make -f
# -*- makefile -*-
#

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

PACKAGE=gramadoir
VERSION=0.4
# VERSION=$(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | sed 's/^Version: *//')

# 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
	( 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
	$(MAKE) -C $(BUILD_TREE)
	touch $@

binary-indep:

binary-arch: 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 build-tree/*/gramadoir.vim usr/share/vim/addons
	dh_install build-tree/*/gramadoir.dtd usr/share/xml/gramadoir
	dh_install build-tree/*/gramadoir.el  usr/share/emacs/site-lisp/gramadoir
	dh_installemacsen
	dh_installchangelogs $(BUILD_TREE)/ChangeLog
	dh_installman debian/gr.1
	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 binary-arch

.PHONY: binary binary-arch binary-indep clean