summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 8986ae8e586b20ee7feca1aa3b07d5cc3fe521cf (plain)
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
#!/usr/bin/make -f

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

INSTALL_BASE=`pwd`/debian/tmp

configure: configure.in
	libtoolize --copy --force
	aclocal $ACLOCAL_FLAGS
	automake --add-missing
	autoconf
	autoheader

build: build-stamp
build-stamp:
	dh_testdir
	
	# Add here commands to compile the package.
	./configure --prefix=/usr --bindir=/usr/X11R6/bin \
		--datadir=/usr/share --mandir=/usr/X11R6/man


        # because glibc 2.1's utmpx.h is incompatible on sparc
	sed -e 's/#define HAVE_UTMPX_H 1/\/* #undef HAVE_UTMPX_H *\//' config.h > config.h.tmp
	mv config.h.tmp config.h

	# fix rpath issues
	sed < libtool > libtool-2 \
		-e 's/^hardcode_libdir_flag_spec.*$$/hardcode_libdir_flag_spec="-D__LIBTOOL_IS_A_FOOL__ "/' \
		-e '/^archive_cmds="/s/"$$/ \\$$deplibs"/'
	mv libtool-2 libtool
	chmod 755 libtool

	make

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	# Add here commands to clean up after the build process.
	-$(MAKE) -k distclean
	-rm -f `find . -name "*~"`
	-rm -rf `find . -name "\.deps"`
	-rm -rf `find . -name "\.libs"`
	-rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
	-rm -f debian/*substvars

	dh_clean

# Build architecture-independent files here.
binary-indep: build
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build
	dh_testdir -a
	dh_testroot -a
	dh_clean -k -a
	dh_installdirs -a

	# Add here commands to install the files into debian/tmp
	$(MAKE) install DESTDIR=$(INSTALL_BASE) \
	    PREFIX=$(INSTALL_BASE)/usr \
		datadir=$(INSTALL_BASE)/usr/share \
		pkglibdir=$(INSTALL_BASE)/usr/share/Eterm \
		DATADIR=$(INSTALL_BASE)/usr/share \
		themedir=$(INSTALL_BASE)/usr/share/Eterm/themes

	dh_installdocs -a
	dh_installmenu -a
	#dh_installmanpages --verbose -a
	dh_undocumented -a Esetroot.1x
	dh_installchangelogs -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	chown root.root debian/tmp/usr/X11R6/bin/Eterm
	chmod 4755 debian/tmp/usr/X11R6/bin/Eterm
	dh_suidregister 
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -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: build clean binary-indep binary-arch binary