File: rules

package info (click to toggle)
wl 2.14.0-12
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 5,876 kB
  • ctags: 3,839
  • sloc: lisp: 48,168; sh: 166; makefile: 139
file content (72 lines) | stat: -rwxr-xr-x 2,637 bytes parent folder | download | duplicates (2)
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
#! /usr/bin/make -f

#export DH_VERBOSE=1

PACKAGE=`cat debian/PACKAGE`
PKGSNAME=wl
EMACS=emacs

pre-build: pre-build-stamp
pre-build-stamp:
	dh_testdir
	grep '^Package: ' debian/control | head -1 | sed -e "s/^Package: //" > debian/PACKAGE

	sed -e "s/@PACKAGE@/$(PACKAGE)/g" debian/README.Debian.in > debian/README.Debian
	sed -e "s/@PACKAGE@/$(PACKAGE)/g" debian/dirs.in > debian/dirs
	sed -e "s/@PACKAGE@/$(PACKAGE)/g" debian/emacsen-install.in > debian/emacsen-install
	sed -e "s/@PACKAGE@/$(PACKAGE)/g" debian/emacsen-remove.in > debian/emacsen-remove
	sed -e "s/@PACKAGE@/$(PACKAGE)/g" debian/emacsen-startup.in > debian/emacsen-startup
	sed -e "s/@PACKAGE@/$(PACKAGE)/g" debian/preinst.in > debian/preinst
	touch $@

build: pre-build build-stamp
build-stamp:
	dh_testdir
	$(EMACS) -q -no-site-file -batch -eval '(progn (set-language-environment "Japanese")'"(prefer-coding-system 'iso-2022-jp))" -l WL-MK -eval '(wl-texinfo-format)'
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp pre-build-stamp
	rm -f doc/*.info debian/PACKAGE debian/README.Debian debian/dirs debian/emacsen-install debian/emacsen-remove debian/emacsen-startup debian/preinst
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	cp -r WL-* NEWS* wl elmo utils debian/$(PACKAGE)/usr/share/emacs/site-lisp/$(PKGSNAME)/
	cp -r etc/icons/* debian/$(PACKAGE)/usr/share/pixmaps/$(PKGSNAME)/
	cp etc/ja.Emacs debian/$(PACKAGE)/etc/X11/Xresources/wanderlust.ja
	mv debian/$(PACKAGE)/usr/share/emacs/site-lisp/$(PKGSNAME)/wl/ChangeLog debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/changelog.wl
	mv debian/$(PACKAGE)/usr/share/emacs/site-lisp/$(PKGSNAME)/elmo/ChangeLog debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/changelog.elmo
	mv debian/$(PACKAGE)/usr/share/emacs/site-lisp/$(PKGSNAME)/utils/ChangeLog debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/changelog.utils

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples samples/*
	dh_installemacsen --priority 65
	dh_installinfo
	dh_installchangelogs ChangeLog
	dh_link usr/share/pixmaps/$(PKGSNAME) usr/share/emacs/site-lisp/$(PKGSNAME)/etc/icons
	dh_link usr/share/emacs/site-lisp/$(PKGSNAME)/NEWS /usr/share/doc/$(PACKAGE)/NEWS
	dh_link usr/share/emacs/site-lisp/$(PKGSNAME)/NEWS.ja /usr/share/doc/$(PACKAGE)/NEWS.ja
	find debian/$(PACKAGE) -name CVS -prune -exec rm -rf {} \;
	find debian/$(PACKAGE) -name .cvsignore -prune -exec rm -rf {} \;

	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: build install

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