File: rules

package info (click to toggle)
libgeda 20061020-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,116 kB
  • ctags: 1,519
  • sloc: ansic: 23,461; sh: 8,889; makefile: 135
file content (98 lines) | stat: -rwxr-xr-x 2,806 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
#!/usr/bin/make -f

UPSTREAM_VERSION := $(shell dpkg-parsechangelog | grep Version: | cut -f 2 -d ' ' | cut -f 1 -d '-')
NEXT_VERSION := $(shell expr $(UPSTREAM_VERSION) + 1)

build: build-stamp
build-stamp:
	dh_testdir
	./configure --prefix=/usr --with-rcdir=/etc/gEDA --infodir=/usr/share/info

# Patch the generated libtool to avoid passing -rpath when linking,
# and to explicitly link libraries against the libraries they
# depend on.
	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 CFLAGS="-O2 -g -Wall"

	touch build-stamp

clean:
	dh_testdir
	rm -f build-stamp

	# Add here commands to clean up after the build process.
	-$(MAKE) distclean

	dh_clean

# Build architecture-independent files here. Includes the info directory.
binary-indep: #build
	#dh_testdir
	#dh_testroot
	#dh_clean -k -i
	#dh_installdirs -i

	## now install the libraries in the library package
	#$(MAKE) install DESTDIR=`pwd`/debian/libgeda-doc

	## Remove everything except the info files
	#rm -rf debian/libgeda-doc/usr/bin
	#rm -rf debian/libgeda-doc/usr/include
	#rm -rf debian/libgeda-doc/usr/lib
	## Remove info dir file
	#rm -rf debian/libgeda-doc/usr/share/info/dir*
	## Remove postscript file
	#rm -rf debian/libgeda-doc/usr/share/gEDA

	#dh_installdocs -i
	#dh_installchangelogs ChangeLog -i
	#dh_strip -i
	#dh_compress -i
	#dh_fixperms -i
	#dh_installdeb -i
	#dh_makeshlibs -V -i
	#dh_shlibdeps -i
	#dh_gencontrol -i
	#dh_md5sums -i
	#dh_builddeb -i

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

	# now install the libraries in the library package
	$(MAKE) install DESTDIR=`pwd`/debian/libgeda20

	# move the development stuff to the -dev package
	mv debian/libgeda20/usr/include debian/libgeda-dev/usr
	# mv debian/libgeda20/usr/bin debian/libgeda-dev/usr
	mv debian/libgeda20/usr/lib/libgeda.so debian/libgeda-dev/usr/lib
	mv debian/libgeda20/usr/lib/libgeda.a debian/libgeda-dev/usr/lib
	mv debian/libgeda20/usr/lib/libgeda.la debian/libgeda-dev/usr/lib
	mv debian/libgeda20/usr/lib/pkgconfig debian/libgeda-dev/usr/lib
	rm -rf debian/libgeda20/usr/share/info

	dh_installdocs -a
	dh_installchangelogs ChangeLog -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_makeshlibs -a -V'libgeda20 (>= $(UPSTREAM_VERSION)), libgeda20 (<< $(NEXT_VERSION))'
	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