File: rules

package info (click to toggle)
prcs 1.3.1-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,304 kB
  • ctags: 3,395
  • sloc: cpp: 17,388; ansic: 8,305; sh: 2,621; lisp: 1,816; perl: 649; lex: 354; makefile: 208; pascal: 85
file content (143 lines) | stat: -rwxr-xr-x 4,024 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#!/usr/bin/make -f
# -*- Makefile -*-
#
# File: rules
# Description: debian/rules file for the prcs package
# Author: Rafael Laboissiere <rafael@icp.inpg.fr>
#         (with help from Samuel Tardieu <sam@debian.org>)
# Created on: Thu Nov  5 15:42:22 CET 1998
# $Id: rules,v 1.5 2002/02/12 11:00:40 rlaboiss Exp $

package		= prcs

# The following scheme for definitions was stollen from the Debian
# octave package by Dirk Eddelbuetel <dirk@debian.org>
debbase		:= $(shell pwd)/debian
debtmp		:= $(debbase)/tmp
debusr 		:= $(debtmp)/usr
debbin 		:= $(debusr)/bin
debshr 		:= /usr/share
debman		:= $(debshr)/man
debinf		:= $(debshr)/info
deblsp		:= /usr/share/emacs/site-lisp/$(package)
debema		:= $(debusr)/lib/emacsen-common/packages
debest		:= $(debtmp)/etc/emacs/site-start.d/
contribdir	:= contrib

patch: patch-stamp
patch-stamp:
	dh_testdir
	if test `dpkg --print-architecture` = hppa \
           || dpkg --compare-versions `g++ --version` ge 3.0 ; then \
	  if [ ! -e patch-stamp ] ; then \
            patch -p1 < $(debbase)/prcs-1.3.1gcc3.diffs ; \
            touch patch-stamp ; \
          fi ; \
        fi

build: build-stamp
build-stamp: patch
	dh_testdir

	./configure --prefix=/usr --disable-environment --disable-debug
# Use EMACS=no on the command line to avoid useless compilation of
# .elc files
	make EMACS=no
	pod2man $(contribdir)/prcs-synch > $(debbase)/man/prcs-synch.1
	pod2man --section=1 --center="PRCS" --date=2001-10-28 \
          $(debbase)/man/prcsutils.pod > $(debbase)/man/prcs-utils.1
	( cd $(contribdir) ; \
          for p in rprcs visualtree prcsutils ; do \
	    tar xfz $$p.tar.gz ; \
          done ; \
          rm -f prcsutils/prcsutils.prj ; \
          perl -pi -e \
               's|\./(prcs_tree.pl)|prcs_tree_info|;s|(/.*)+/(xvcg)|$$2|' \
               visualtree/prcs_tree_draw )
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp

	if [ -f Makefile ]; then make distclean; fi

	( cd $(debbase)/man ; rm -f prcs-synch.1 prcs-utils.1 )
	for p in rprcs visualtree prcsutils ; \
          do rm -rf $(contribdir)/$$p ; \
        done

	if [ -e patch-stamp ] ; then \
          patch -p1 -R < $(debbase)/prcs-1.3.1gcc3.diffs ; \
          rm -f patch-stamp ; \
        fi

	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	make install EMACS=no DESTDIR=$(debtmp) lispdir=$(deblsp) \
	  mandir=$(debman) infodir=$(debinf)
	( cd $(debtmp)/$(deblsp) ; rm -f prcs-ediff.el* *.elc )
	chmod +x $(debbase)/fix-perl-path.pl
	( cd $(contribdir) ; \
	  for i in *-command ; do \
            install -c --mode=0755 $$i $(debbin)/prcs-$$i ; \
          done ; \
          for i in prcs-callback prcs-clean prcs-emerge prcs-ediff \
                   prcs-synch visualtree/prcs_tree_info.pl \
                   visualtree/prcs_tree_draw prcsutils/prcs*; do \
            install -c --mode=0755 $$i $(debbin)/`basename $$i .pl` ; \
            $(debbase)/fix-perl-path.pl $(debbin)/`basename $$i .pl` ; \
	  done ;\
          for i in rprcs/rprcs prcs-javadoc ; do \
            install -c --mode=0755 $$i $(debbin) ; \
          done )

	dh_installman -A
	dh_movefiles -i

# Do this hack until Bug#17111 is fixed - R.L.
	( cd $(debtmp) ; rm -rf etc usr/lib usr/share/emacs )
	touch install-stamp

binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -i
	dh_installemacsen -i
	dh_installchangelogs -i emacs/1.60.log
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_perl -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -a
	dh_installchangelogs -a ChangeLog
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_makeshlibs -a
	dh_md5sums -a
	dh_builddeb -a

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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