File: rules

package info (click to toggle)
haskell-doc 19991028-1
  • links: PTS
  • area: main
  • in suites: potato, woody
  • size: 1,672 kB
  • ctags: 620
  • sloc: haskell: 2,123; makefile: 158; sh: 31
file content (73 lines) | stat: -rwxr-xr-x 2,109 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
#! /usr/bin/make -f
# -*- Makefile -*-

# Written by Antti-Juhani Kaijanaho <ajk@debian.org>.  Use, distribute
# and modify as you please.

install         := install -o root -g root
install_exec    := $(install) -m 0755 -s
install_dir     := $(install) -m 0755 -d
install_nonex   := $(install) -m 0644
install_script  := $(install) -m 0755
install_zipped  := false
install_symlink := ln -s
GZIP            := gzip -9

package    := haskell-doc
builddir   := $(shell pwd)
rootdir    := $(builddir)/debian/tmp
docdir     := $(rootdir)/usr/share/doc/$(package)

build: debian/build.stamp
debian/build.stamp:
	$(MAKE) all
	touch $@

binary: binary-arch binary-indep

binary-arch: debian/binary-arch.stamp
debian/binary-arch.stamp:
	touch $@

binary-indep: debian/binary-indep.stamp
debian/binary-indep.stamp: debian/build.stamp
	$(checkdir)
#	Create the filesystem
	$(RM) -r $(rootdir)
	$(install_dir) $(rootdir)
	$(install_dir) $(rootdir)/DEBIAN
	$(install_dir) $(docdir)
#	Install copyright file.
	$(install_nonex) debian/copyright $(docdir)
#	Install the change logs.
	$(install_nonex) debian/changelog $(docdir)/changelog.Debian
	$(install_nonex) ChangeLog $(docdir)/changelog
	$(GZIP) $(docdir)/changelog $(docdir)/changelog.Debian
#	Install the installation scripts
	$(install_script) debian/prerm debian/postinst $(rootdir)/DEBIAN
#	Install the doc-base support files
	$(install_dir) $(rootdir)/usr/share/doc-base/
	$(install_nonex) debian/haskell98-lang debian/haskell98-lib \
	  debian/haskell98-tut $(rootdir)/usr/share/doc-base/
#	Install the system.
	$(install_nonex) README $(docdir)
	$(MAKE) prefix=$(rootdir) docdir=$(docdir) install
#	$(install_symlink) haskell98-report/h98.gif $(docdir)
	chmod -R 644 $(docdir)
	chmod -R a+X $(docdir)
#	Generate the binary control file.
	dpkg-gencontrol -isp
#	Fix permissions.
	chown -R root.root $(rootdir)
	chmod -R g-ws $(rootdir)
#	Genearate the deb.
	dpkg --build $(rootdir) ..

define checkdir
	test -d haskell98-report -a -f debian/rules
endef

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