File: rules

package info (click to toggle)
python-oss 0.0.0.20010624-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 388 kB
  • ctags: 206
  • sloc: ansic: 1,351; makefile: 63; sh: 14; python: 8
file content (50 lines) | stat: -rwxr-xr-x 1,500 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
#!/usr/bin/make -f

PACKAGE:=python-oss
INSTDIR:=debian/inst.$(PACKAGE)
DOCDIR:=$(INSTDIR)/usr/share/doc/$(PACKAGE)

build:
	test -e debian/control
	$(MAKE) all ossmodule.html ossmodule.txt

clean:
	test -e debian/control
	test root = "`whoami`" || (echo need root priviledges; exit 1)
	-python setup.py clean --all
	-$(MAKE) clean
	rm -f debian/files debian/substvars
	rm -rf $(INSTDIR)

install:
	test -e debian/control
	test root = "`whoami`" || (echo need root priviledges; exit 1)
	rm -f debian/substvars
	rm -rf $(INSTDIR)
	python setup.py install --prefix=$(INSTDIR)/usr
	chmod -R go-w $(INSTDIR)

binary-indep: build install

binary-arch: build install
	test -e debian/control
	test root = "`whoami`" || (echo need root priviledges; exit 1)
	install -d -m0755 $(DOCDIR)
	install -m0644 README ossmodule.txt ossmodule.html $(DOCDIR)
	install -m0644 debian/copyright $(DOCDIR)/copyright
	install -m0644 debian/changelog $(DOCDIR)/changelog.Debian
	gzip -9f $(DOCDIR)/README $(DOCDIR)/ossmodule.* \
		$(DOCDIR)/changelog.Debian
	find $(INSTDIR)/usr/lib -name '*.so' -print0 \
	| xargs -0 --no-run-if-empty \
		strip --remove-section=.comment \
			--remove-section=.note --strip-unneeded
	install -d -m0755 $(INSTDIR)/DEBIAN
	install -m0755 debian/postinst debian/prerm \
		$(INSTDIR)/DEBIAN
	dpkg-shlibdeps `find $(INSTDIR)/usr/lib -name '*.so'`
	dpkg-gencontrol -isp -P$(INSTDIR)
	dpkg --build $(INSTDIR) ..

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