File: rules

package info (click to toggle)
gdome2 0.8.1+debian-6
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 4,548 kB
  • ctags: 1,957
  • sloc: ansic: 23,268; sh: 6,687; makefile: 482; xml: 476
file content (82 lines) | stat: -rwxr-xr-x 2,141 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
#!/usr/bin/make -f
# GNU copyright 1997 to 1999 by Joey Hess.

CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif

configure: configure-stamp
configure-stamp:
	dh_testdir
	cp /usr/share/misc/config.sub /usr/share/misc/config.guess .
	libtoolize -c -f
	autoreconf -f -i
	./configure --prefix=/usr \
		    --mandir=\$${prefix}/share/man \
		    --infodir=\$${prefix}/share/info \
		    --with-html-dir=\$${prefix}/share/doc/libgdome2-dev 
	touch configure-stamp

build-arch: build
build-indep: build

build: build-stamp
build-stamp: configure
	dh_testdir
	dh_prep
	$(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f gdomeConf.sh config.sub config.guess \
	  Makefile config.log config.status configure config.h.in \
	  INSTALL missing install-sh depcomp ltmain.sh aclocal.m4 mkinstalldirs
	find . -name Makefile.in -print0 | xargs -0r -- rm
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_installdirs -A
	$(MAKE) install prefix=$(CURDIR)/debian/libgdome2-dev/usr
	for file in debian/libgdome2-dev/usr/lib/*.la; do \
		sed -i "/dependency_libs/ s/'.*'/''/" $$file ; \
	done	
	mv debian/libgdome2-dev/usr/lib/*.so.* debian/libgdome2-0/usr/lib
	ln -sf libgdome.so.0 debian/libgdome2-dev/usr/lib/libgdome.so
	rm -rf debian/libgdome2-dev/usr/share/doc/libgdome2-dev/html
	mv debian/libgdome2-dev/usr/share/doc/libgdome2-dev/gdome2-* \
	   debian/libgdome2-dev/usr/share/doc/libgdome2-dev/html
	ln -sf book1.html debian/libgdome2-dev/usr/share/doc/libgdome2-dev/html/index.html

binary: binary-indep binary-arch
binary-indep: install
binary-arch: install
	dh_testdir
	dh_testroot
	dh_installdocs -A README MAINTAINERS
	dh_installexamples test/example?.c test/example?.xml
	dh_installchangelogs ChangeLog
	dh_link
	dh_lintian
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_shlibdeps
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

.PHONY: build clean binary-indep binary-arch binary install configure