Clean properly files resulting from package compilation
[virtuoso-debian.git] / debian / rules
bloba80144eeab09ac127d2160421c804ad1ac8a4009
1 #!/usr/bin/make -f
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
6 # These are used for cross-compiling and for saving the configure script
7 # from having to guess our platform (since we know it already)
8 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
9 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
10 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
11 CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
12 else
13 CROSS= --build $(DEB_BUILD_GNU_TYPE)
14 endif
16 config: config-stamp
17 config-stamp: configure
18 dh_testdir
19 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
20 cp -f /usr/share/misc/config.sub config.sub
21 endif
22 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
23 cp -f /usr/share/misc/config.guess config.guess
24 endif
25 ./configure $(CROSS) \
26 --prefix=/usr \
27 --mandir=\$${prefix}/share/man \
28 --infodir=\$${prefix}/share/info \
29 --localstatedir=/var \
30 --with-layout=debian \
31 --program-transform-name="s/isql/isql-v/" \
32 --with-readline \
33 CFLAGS="$(CFLAGS)" \
34 LDFLAGS="-Wl,-z,defs -Wl,--no-undefined -Wl,--as-needed"
35 touch $@
37 build: build-stamp
38 build-stamp: config
39 dh_testdir
40 $(MAKE)
41 $(MAKE) -C binsrc/VirtuosoClient.Net -f Makefile.mono
42 #docbook-to-man debian/virtuoso.sgml > virtuoso.1
43 touch $@
45 clean:
46 dh_testdir
47 dh_testroot
48 rm -f config-stamp build-stamp
49 $(MAKE) -C binsrc/VirtuosoClient.Net -f Makefile.mono clean
50 [ ! -f Makefile ] || $(MAKE) distclean
51 rm -f config.sub config.guess config.log config.cache config.nice
52 rm -f binsrc/config/ccdefs
53 rm -f $$(find . -name "*.log")
54 rm -f binsrc/tutorial/make_tutorial_dav_vad.xml
55 rm -f binsrc/tutorial/make_tutorial_vad.output
56 rm -f binsrc/tutorial/make_tutorial_fs_vad.xml
57 rm -f appsrc/ODS-Wiki/version.base
58 rm -f appsrc/ODS-Wiki/version.curr
59 dh_clean
61 install: build
62 dh_testdir
63 dh_testroot
64 dh_clean -k
65 dh_installdirs
66 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
67 mv $(CURDIR)/debian/tmp/usr/lib/jdbc-2.0/* $(CURDIR)/debian/libvirtuoso-java/usr/share/java/
68 mv $(CURDIR)/debian/tmp/usr/lib/jdbc-3.0/* $(CURDIR)/debian/libvirtuoso-java/usr/share/java/
69 mv $(CURDIR)/debian/tmp/usr/lib/jena/* $(CURDIR)/debian/libvirtuoso-java/usr/share/java/
70 mv $(CURDIR)/debian/tmp/usr/lib/sesame/* $(CURDIR)/debian/libvirtuoso-java/usr/share/java/
71 dh_installcligac
73 # Build architecture-independent files here.
74 binary-indep: build install
76 # Build architecture-dependent files here.
77 binary-arch: build install
78 dh_testdir
79 dh_testroot
80 dh_installchangelogs ChangeLog
81 dh_installdocs
82 dh_installexamples
83 dh_install
84 # dh_installmenu
85 # dh_installdebconf
86 # dh_installlogrotate
87 # dh_installemacsen
88 # dh_installpam
89 # dh_installmime
90 # dh_python
91 # dh_installinit
92 # dh_installcron
93 # dh_installinfo
94 dh_installman
95 dh_link
96 dh_strip
97 dh_compress
98 dh_fixperms
99 # dh_perl
100 dh_makeshlibs
101 dh_installdeb
102 dh_shlibdeps
103 dh_makeclilibs
104 dh_clideps -d
105 dh_gencontrol
106 dh_md5sums
107 dh_builddeb
109 binary: binary-indep binary-arch
110 .PHONY: config build clean binary-indep binary-arch binary install