File: rules

package info (click to toggle)
gpsmanshp 1.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 288 kB
  • ctags: 200
  • sloc: ansic: 1,186; makefile: 81; sh: 3
file content (55 lines) | stat: -rwxr-xr-x 1,822 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
#!/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.html doc/GPSManSHP_1.html doc/GPSManSHP_2.html \
	doc/GPSManSHP_3.html doc/GPSManSHP_4.html doc/backgr.gif \
	doc/blank.gif doc/gpsman-logo-small.gif \
	doc/newarr.gif doc/newearr.gif doc/next.gif doc/previous.gif \
	doc/up.gif
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
	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
.PHONY: build clean binary-arch binary install