fixed some debian packaging stuff
[monky] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12
13 # These are used for cross-compiling and for saving the configure script
14 # from having to guess our platform (since we know it already)
15 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
16 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
17
18 CFLAGS = -Wall -g
19
20 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
21         CFLAGS += -O0
22 else
23         CFLAGS += -O2
24 endif
25
26 config.status:
27         dh_testdir
28         ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-double-buffer   --enable-own-window --enable-proc-uptime --enable-mpd --enable-xft --enable-seti
29
30
31 build: build-stamp
32
33 build-stamp: config.status
34         dh_testdir
35
36         $(MAKE)
37 #docbook-to-man debian/conky.sgml > conky.1
38
39         touch build-stamp
40
41 clean:
42         dh_testdir
43         dh_testroot
44         rm -f build-stamp configure-stamp
45         -$(MAKE) clean
46         -$(MAKE) distclean
47
48         dh_clean 
49
50 install: build
51         dh_testdir
52         dh_testroot
53         dh_clean -k 
54         dh_installdirs
55
56         $(MAKE) install DESTDIR=$(CURDIR)/debian/conky
57
58
59 # Build architecture-independent files here.
60 binary-indep: build install
61 # We have nothing to do by default.
62
63 # Build architecture-dependent files here.
64 binary-arch: build install
65         dh_testdir
66         dh_testroot
67         dh_installchangelogs ChangeLog
68         dh_installdocs AUTHORS README TODO doc/docs.html doc/variables.html doc/config_settings.html
69         dh_installexamples doc/conkyrc.sample
70         dh_installmenu
71         dh_installman doc/conky.1
72         dh_link
73         dh_strip
74         dh_compress
75         dh_fixperms
76         dh_installdeb
77         dh_shlibdeps
78         dh_gencontrol
79         dh_md5sums
80         dh_builddeb
81
82 binary: binary-indep binary-arch
83 .PHONY: build clean binary-indep binary-arch binary install configure