File: rules

package info (click to toggle)
epplets 0.6.cvs.2001102801-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,132 kB
  • ctags: 2,088
  • sloc: ansic: 20,931; sh: 6,622; makefile: 377
file content (132 lines) | stat: -rwxr-xr-x 5,648 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
#!/usr/bin/make -f

export DH_COMPAT=2

vpath build debian/pmt/
vpath install debian/pmt/
cfg = --enable-fsstd=yes --mandir=/usr/share/man --enable-new-remember
pwd := $(shell pwd)

SHELL = /bin/sh -e
INSTALL = /usr/bin/install

build:
	dh_testdir
	test -e ./configure && chmod 755 ./configure
	test -x ./configure && ./configure $(cfg)  || ./autogen.sh $(cfg)
	
	# temp dir
	$(INSTALL) -d debian/pmt
	
	cp libtool debian/pmt/libtool
	sed \
	-e 's/^hardcode_libdir_flag_spec.*$$/hardcode_libdir_flag_spec="-D__LIBTOOL_IS_A_FOOL__ "/' \
	-e '/^archive_cmds="/s/"$$/ \\$$deplibs"/' debian/pmt/libtool > libtool
	
	# the configure script anal, hardcodes $EBIN and $EROOT from the running
	# environment into the Makefile, so we hijack those variables beforehand
	export EBIN=usr/bin; \
	export EROOT=$(pwd)/debian/epplets/usr/share/enlightenment; \
	$(MAKE)
	
	touch debian/pmt/$@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	-$(MAKE) -k clean distclean
	-rm -rf debian/pmt
	dh_clean

install: build
	dh_testdir 
	dh_testroot 
	dh_clean -k
	dh_installdirs 

	# parts shamelessly stolen from the bz2 package

	# bin package, epplets
	$(MAKE) install DESTDIR=$(pwd)/debian/epplets/
	mkdir -p debian/epplets/usr/share/doc/epplets
	test -f COPYING && test -f debian/copyright-info && test -f epplets/Emix-data/Emix.COPYING && echo "Emix:" | cat debian/copyright-info COPYING - epplets/Emix-data/Emix.COPYING > debian/epplets/usr/share/doc/epplets/copyright || touch debian/epplets/usr/share/doc/epplets/copyright
	rm debian/epplets/usr/share/enlightenment/epplet_data/Emix/Emix.COPYING # accounted for above
	mkdir -p debian/epplets/usr/share/man/man1
	test -f epplets/man/epplets.1 && cp -v epplets/man/epplets.1 debian/epplets/usr/share/man/man1/epplets.1 || touch debian/epplets/usr/share/man/man1/epplets.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Areas.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-LoadMeter.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-NetGraph.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Time.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Biff.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Magic.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Pinger.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Toolbox.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Clock.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-MemWatch.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Power.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Pants.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-UrlWatch.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Cpu.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Mixer.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-SD.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Xss.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Disk.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-MoonClock.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-ScreenSave.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/Emix.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Exec.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Mountbox.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-ScreenShoot.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-GtkRc.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Net.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Slides.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Load.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-NetFlame.epplet.1
	dh_link usr/share/man/man1/epplets.1 usr/share/man/man1/E-Sys.epplet.1

	# dev package, libepplet-dev
	$(INSTALL) -d debian/libepplet-dev/usr/lib
	mv -v debian/epplets/usr/lib/libepplet.so debian/epplets/usr/lib/libepplet.a debian/libepplet-dev/usr/lib
	mv -v debian/epplets/usr/include debian/libepplet-dev/usr/include
	mkdir -p debian/libepplet-dev/usr/share/doc/libepplet-dev
	test -f COPYING && test -f debian/copyright-info && cat debian/copyright-info COPYING > debian/libepplet-dev/usr/share/doc/libepplet-dev/copyright || touch debian/libepplet-dev/usr/share/doc/libepplet-dev/copyright

	# lib package, libepplet0
	$(INSTALL) -d debian/libepplet0/usr/lib
	mv -v debian/epplets/usr/lib/libepplet.so.???* debian/libepplet0/usr/lib/
	mv -v debian/epplets/usr/lib/libepplet.so* debian/libepplet0/usr/lib/
	chmod -x debian/libepplet0/usr/lib/*
	mkdir -p debian/libepplet0/usr/share/doc/libepplet0
	test -f COPYING && test -f debian/copyright-info && cat debian/copyright-info COPYING > debian/libepplet0/usr/share/doc/libepplet0/copyright || touch debian/libepplet0/usr/share/doc/libepplet0/copyright
	
	# remove leftovers
	rm -rfv debian/epplets/usr/lib/
	
	touch debian/pmt/$@


binary-arch: build install
	dh_testdir 
	dh_testroot 
	dh_installdocs
	dh_installmenu 
	dh_undocumented
	dh_installchangelogs 
	dh_strip 
	dh_compress 
	dh_fixperms 
	dh_installdeb 
	dh_makeshlibs -V
	# dh_shlibdeps will probably generate a lot of harmless
	# warnings if there is no libepplet0 currently installed
	dh_shlibdeps -ldebian/libepplet0/usr/lib
	dh_gencontrol 
	dh_md5sums 
	dh_builddeb 

binary-indep:

binary: binary-arch

.PHONY: clean binary-indep binary-arch binary