File: rules

package info (click to toggle)
eperl 2.2.14-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,164 kB
  • ctags: 348
  • sloc: ansic: 4,680; sh: 1,425; perl: 551; makefile: 378
file content (90 lines) | stat: -rwxr-xr-x 1,995 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
#!/usr/bin/make -f

SHELL = /bin/sh

ifndef PERL
PERL = /usr/bin/perl
endif

TMP     = `pwd`/debian/`dh_listpackages`
package = eperl

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatibility version to use.
export DH_COMPAT=2

build: build-stamp
build-stamp:
	dh_testdir
	# File etc/shtool comes from a patch and must be set executable
	chmod a+x etc/shtool
	./configure --prefix=/usr
	#  Remove unneded library flags
	perl -pi -e 's/ -l\S*db\S*//g' Makefile config.status config_sc.h
	$(MAKE)

	#$(MAKE) test
	mv Makefile Makefile.stand-alone

	$(PERL) Makefile.PL INSTALLDIRS=vendor
	$(MAKE) OPTIMIZE="-O2 -g -Wall" LD_RUN_PATH=
	#$(MAKE) test
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	-$(MAKE) distclean
	rm -f Makefile.stand-alone
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs usr/lib/cgi-bin

	# Install eperl binary
	$(MAKE) -f Makefile.stand-alone install prefix=$(TMP)/usr
	# ... and perl modules
	$(MAKE) install PREFIX=$(TMP)/usr
	find $(TMP) -type d -empty | xargs -r rmdir -p --ignore-fail-on-non-empty
	rm -rf $(TMP)/usr/lib/eperl

# Build architecture-independent files here.
binary-indep: build
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
#	dh_installdebconf
	dh_installdocs ANNOUNCE CREDITS KNOWN.BUGS NEWS PORTING \
		README VERSIONS ChangeLog.* contrib/utils/
	dh_installexamples eg/*
	dh_installmenu
#	dh_installinit
#	dh_installcron
#	dh_installmanpages
#	dh_undocumented
	dh_installchangelogs ChangeLog
	dh_link usr/bin/eperl usr/lib/cgi-bin/nph-eperl
	dh_strip
	dh_compress
	dh_fixperms
#	dh_makeshlibs
	dh_installdeb
	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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