File: rules

package info (click to toggle)
gpsmanshp 1.2.1-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 244 kB
  • sloc: ansic: 1,186; makefile: 76; sh: 14
file content (56 lines) | stat: -rwxr-xr-x 1,703 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
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.

CFLAGS = -fpic -g
TMPROOT = debian/tmp
DOCDIR = $(TMPROOT)/usr/share/doc/gpsmanshp
HTMLDOCS = doc/GPSManSHP.pdf
TCLVERSION = 8.4
INSTALLDIR = $(TMPROOT)/usr/lib/tcl$(TCLVERSION)

build: 
	$(MAKE) -f Makefile8.4.4

clean:
	$(MAKE) -f Makefile8.4.4 clean
	rm -rf debian/tmp debian/files
	rm -f debian/*~
	rm -f debian/substvars

install: build
	rm -rf $(TMPROOT) debian/files
	mkdir -p $(INSTALLDIR)
	mkdir -p $(DOCDIR)/html
	install -m 644 gpsmanshp.so $(INSTALLDIR) 
#	echo "pkg_mkIndex -lazy -verbose . gpsmanshp.so" | tclsh$(TCLVERSION)
#	$(MAKE) install INSTALLDIR=$(INSTALLDIR)


# Build architecture-dependent files here.
binary-arch: install
	cp $(HTMLDOCS) $(DOCDIR)/html
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	strip --remove-section=.note --remove-section=.comment $(INSTALLDIR)/gpsmanshp.so
endif
	cp debian/copyright $(DOCDIR)
	cp debian/changelog $(DOCDIR)/changelog.Debian
	gzip -9 $(DOCDIR)/changelog.Debian
	chown -R root.root $(INSTALLDIR)
	chown -R root.root $(DOCDIR)
	chmod 644 $(DOCDIR)/* $(DOCDIR)/html/*
	chmod 755 $(DOCDIR)/html
	mkdir $(TMPROOT)/DEBIAN
	cp debian/postinst $(TMPROOT)/DEBIAN/postinst
	chmod 755 $(TMPROOT)/DEBIAN/postinst
	cp debian/prerm $(TMPROOT)/DEBIAN/prerm
	chmod 755 $(TMPROOT)/DEBIAN/prerm
	dpkg-shlibdeps $(INSTALLDIR)/gpsmanshp.so
	dpkg-gencontrol -isp
	(cd $(TMPROOT) ; md5sum usr/lib/tcl$(TCLVERSION)/gpsmanshp.so > DEBIAN/md5sums ; md5sum usr/share/doc/gpsmanshp/* >>  DEBIAN/md5sums ; md5sum usr/share/doc/gpsmanshp/html/*  >>  DEBIAN/md5sums )
	dpkg-deb --build $(TMPROOT) ..

binary: binary-arch

binary-indep: build install

.PHONY: build clean binary-arch binary install