File: rules

package info (click to toggle)
erc 2.91.cvs.20020404-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 496 kB
  • ctags: 765
  • sloc: lisp: 7,852; makefile: 52; sh: 47; perl: 33
file content (77 lines) | stat: -rwxr-xr-x 2,771 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
#! /usr/bin/make -f
## Written by Gergely Nagy <algernon@debian.org>
## This is under GPL v2.

PACKAGE		= erc
PKGDIR		= debian/${PACKAGE}
SOURCES		= erc-bbdb.el erc-button.el erc-complete.el erc-fill.el \
		erc-ibuffer.el erc-imenu.el erc-list.el erc-match.el \
		erc-menu.el erc-nets.el erc-notify.el erc-replace.el \
		erc-ring.el erc-speak.el erc-speedbar.el erc-track.el \
		erc.el format-spec.el
LISPDIR		= /usr/share/emacs/site-lisp/erc

build: ;

clean: 
	test -e debian/control 
	rm -rf debian/erc debian/files

install: build
	test -e debian/control
	install -d ${PKGDIR}${LISPDIR} ${PKGDIR}/etc/emacs/site-start.d
	install -m 0644 ${SOURCES} ${PKGDIR}${LISPDIR}

binary-erc: install
	test -e debian/control && test "x`whoami`" = "xroot"
## Install debian-specific stuff
# Some directories
	install -d ${PKGDIR}/usr/share/doc/${PACKAGE} \
		${PKGDIR}/usr/lib/emacsen-common/packages/install \
		${PKGDIR}/usr/lib/emacsen-common/packages/remove
# The changelog..
	install -m 0644 debian/changelog \
			${PKGDIR}/usr/share/doc/${PACKAGE}/changelog.Debian
	install -m 0644 ChangeLog ${PKGDIR}/usr/share/doc/${PACKAGE}/changelog
# ..the copyright file..
	install -m 0644 debian/copyright ${PKGDIR}/usr/share/doc/${PACKAGE}/
# ..some documentation
	install -m 0644 CREDITS HISTORY ${PKGDIR}/usr/share/doc/${PACKAGE}/
# the emacs-install scripts
	install -m 0755 debian/scripts/install \
		${PKGDIR}/usr/lib/emacsen-common/packages/install/${PACKAGE}
	install -m 0755 debian/scripts/remove \
		${PKGDIR}/usr/lib/emacsen-common/packages/remove/${PACKAGE}
# Install an autoload script
	install -m 0644 debian/scripts/startup.${PACKAGE} \
		${PKGDIR}/etc/emacs/site-start.d/50${PACKAGE}.el
## Compress stuff
	gzip -9f ${PKGDIR}/usr/share/doc/${PACKAGE}/changelog.Debian \
		 ${PKGDIR}/usr/share/doc/${PACKAGE}/changelog
## Fix permissions
	find ${PKGDIR} -print0 2>/dev/null | xargs -0r chown \
						   --no-dereference 0.0
	find ${PKGDIR} ! -type l -print 0 2>/dev/null | xargs -0r \
		chmod go=rX,u+rw,a-s
## Install stuff to DEBIAN/
	install -d ${PKGDIR}/DEBIAN
	install -m 0755 debian/maint/postinst debian/maint/prerm \
		${PKGDIR}/DEBIAN/
# Install conffile list
	install -m 0644 debian/maint/conffiles ${PKGDIR}/DEBIAN/conffiles
## Install READMEs
	install -m 0644 debian/README.erc-speak debian/README.Debian \
		${PKGDIR}/usr/share/doc/${PACKAGE}/
## Generate DEBIAN/md5sums
	cd ${PKGDIR} >/dev/null ;\
	 find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums
## Generate DEBIAN/control
	dpkg-gencontrol -isp -p${PACKAGE} -P${PKGDIR}
## Build the binary package
	dpkg --build ${PKGDIR} ..

binary-indep: binary-erc
binary-arch: ;
binary: binary-indep binary-arch

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