File: rules

package info (click to toggle)
ekg2 1%3A0.4~pre%2B20120506.1-16
  • links: PTS
  • area: main
  • in suites: buster
  • size: 6,860 kB
  • sloc: ansic: 78,587; xml: 3,439; perl: 1,908; pascal: 841; makefile: 658; python: 532; sh: 239; ruby: 76; php: 72; sql: 44; sed: 9
file content (94 lines) | stat: -rwxr-xr-x 2,963 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
89
90
91
92
93
94
#!/usr/bin/make -f
# ekg2 package rules file
# Copyright 2002-2012 Marcin Owsiany <porridge@debian.org>

ARCHLIB := $(shell perl -MConfig -e 'print substr($$Config{vendorarch}, 1)')

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with python2

# Remember to update README.Debian as well...
override_dh_auto_configure:
	dh_auto_configure --verbose -- \
		--enable-autoresponder \
		--enable-gg \
		--enable-gpg \
		--enable-gtk \
		--enable-icq \
		--enable-irc \
		--enable-jabber \
		--enable-jogger \
		--enable-logs \
		--enable-logsqlite \
		--enable-mail \
		--enable-ncurses \
		--enable-nntp \
		--enable-perl \
		--enable-polchat \
		--enable-python \
		--enable-rivchat \
		--enable-rss \
		--enable-sim \
		--enable-sms \
		--with-aspell \
		--with-expat \
		--with-gnutls \
		--with-gpgme \
		--with-gpm \
		--with-gtk \
		--with-libgadu \
		--with-ncurses \
		--with-openssl \
		--with-perl \
		--with-python \
		--with-sqlite3 \
		--with-zlib \
		--libdir=\$${prefix}/lib
# Reasons for disabling some features are in README.Debian
# Remember to update README.Debian as well...

override_dh_auto_build:
	@echo 'Building with MAKEFLAGS=$(MAKEFLAGS) and CFLAGS=$(CFLAGS)'
	dh_auto_build -- PERL_MM_OPT=INSTALLDIRS=vendor
	cd docs/ && XSLTRANSFORMER='xsltproc --nonet' sh generate-ekg2book.sh pl generate
	cd docs/ && XSLTRANSFORMER='xsltproc --nonet' sh generate-ekg2book.sh en generate
# dh_installman gets confused with the ".en" part and either chooses wrong directory or extension
	cp docs/ekg2.en.1 docs/ekg2.1
ifneq (,$(findstring ekg2-api-docs, $(shell dh_listpackages)))
	cd docs/ && ./generate-doc.sh
endif

override_dh_auto_clean:
	cd docs && sh generate-ekg2book.sh pl clean
	cd docs && sh generate-ekg2book.sh en clean
	rm -rf docs/doxygen
	rm -f docs/ekg2.1
	rm -f debian/ekg2-scripting-perl.install
	dh_auto_clean

override_dh_strip:
	dh_strip --dbgsym-migration='ekg2-dbg (<< 1:0.4~pre+20120506.1-13~)'

override_dh_auto_install:
	perl_install_args="DESTDIR=$(CURDIR)/debian/tmp INSTALLDIRS=vendor" $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp

override_dh_install:
	sed -e 's,@ARCHLIB@,$(ARCHLIB),g' $(CURDIR)/debian/ekg2-scripting-perl.install.in > $(CURDIR)/debian/ekg2-scripting-perl.install
	find debian/tmp/usr/lib*/ -name "*.la" -delete
	dh_install

override_dh_installdocs-arch:
	dh_installdocs --link-doc=ekg2-core -pekg2 -pekg2-gnupg -pekg2-jabber \
	  -pekg2-scripting-python -pekg2-scripting-perl
	dh_installdocs --remaining-packages -X.md5
	cp -a docs/ekg2book/book    $(CURDIR)/debian/ekg2-core/usr/share/doc/ekg2-core/book-pl
	cp -a docs/ekg2book-en/book $(CURDIR)/debian/ekg2-core/usr/share/doc/ekg2-core/book-en

override_dh_installdocs-indep:
	dh_installdocs
ifneq (,$(findstring ekg2-api-docs, $(shell dh_listpackages)))
	cp -a docs/doxygen          $(CURDIR)/debian/ekg2-api-docs/usr/share/doc/ekg2-api-docs/
endif
	find  $(CURDIR)/debian/ekg2-api-docs/usr/share/doc/ekg2-api-docs/ -name "*.md5" -delete