1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
15 CFLAGS = -g
16 CXXFLAGS = -g
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19 CFLAGS += -O0
20 CXXFLAGS += -O0
21 else
22 CFLAGS += -O2
23 CXXFLAGS += -O2
24 endif
25 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
26 INSTALL_PROGRAM += -s
27 endif
29 builddir/config.status: configure
30 dh_testdir
31 mkdir -p builddir
32 cd builddir \
33 && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
34 ../configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
35 --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
37 build: builddir/config.status
38 dh_testdir
39 cd builddir && $(MAKE)
41 clean:
42 dh_testdir
43 rm -rf builddir
44 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
45 cp -f /usr/share/misc/config.sub config.sub
46 endif
47 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
48 cp -f /usr/share/misc/config.guess config.guess
49 endif
50 rm -f po/.intltool-merge-cache
51 rm -f po/*.gmo po/messages
52 dh_clean
54 install: build
55 dh_testdir
56 dh_testroot
57 dh_clean -k
58 dh_installdirs
59 cd builddir && $(MAKE) install DESTDIR=$(CURDIR)/debian/inkscape
60 install -o root -g root -m 644 $(CURDIR)/debian/inkscape.xpm $(CURDIR)/debian/inkscape/usr/share/pixmaps/inkscape.xpm
61 install -o root -g root -m 644 $(CURDIR)/debian/inkscape.applications $(CURDIR)/debian/inkscape/usr/share/application-registry/inkscape.applications
64 # Build architecture-independent files here.
65 binary-indep: build install
66 # We have nothing to do by default.
68 # Build architecture-dependent files here.
69 binary-arch: build install
70 dh_testdir
71 dh_testroot
72 dh_installchangelogs ChangeLog
73 dh_installdocs
74 # dh_installexamples
75 # dh_install
76 dh_installmenu
77 # dh_installdebconf
78 # dh_installlogrotate
79 # dh_installemacsen
80 # dh_installpam
81 dh_installmime
82 # dh_installinit
83 # dh_installcron
84 # dh_installinfo
85 # dh_installman
86 dh_link
87 dh_strip
88 dh_compress
89 dh_fixperms
90 # dh_perl
91 # dh_python
92 # dh_makeshlibs
93 dh_installdeb
94 dh_shlibdeps
95 dh_gencontrol
96 dh_md5sums
97 dh_builddeb
99 binary: binary-indep binary-arch
101 .PHONY: build clean binary-indep binary-arch binary install