4 # Uncomment this to turn on verbose mode.
7 # These are used for cross-compiling and for saving the configure script
8 # from having to guess our platform (since we know it already)
9 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
10 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
11 DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
12 DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
15 LDFLAGS = -Wl,--as-needed
17 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
23 ifeq ($(DEB_HOST_ARCH_OS),linux)
24 LINUX_CONF_ARGS_STD=--enable-wlan
25 LINUX_CONF_ARGS_ALL=--enable-wlan --enable-ibm
28 ifeq ($(DEB_HOST_ARCH_CPU),i386)
29 ENABLE_NVIDIA=--enable-nvidia
32 ifeq ($(DEB_HOST_ARCH_CPU),amd64)
33 ENABLE_NVIDIA=--enable-nvidia
36 COMMON_CONFIGURE_FLAGS = --host=$(DEB_HOST_GNU_TYPE) \
37 --build=$(DEB_BUILD_GNU_TYPE) \
38 --prefix=/usr --sysconfdir=/etc \
39 --mandir=\$${prefix}/share/man \
40 --infodir=\$${prefix}/share/info \
43 configure: config-stamp
49 AUTOMAKE=automake ./autogen.sh
51 ln -sf /usr/share/misc/config.sub .
52 ln -sf /usr/share/misc/config.guess .
54 mkdir build-std build-cli build-all
56 #DML# cd build-std && CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
57 #DML# ../configure $(COMMON_CONFIGURE_FLAGS) $(LINUX_CONF_ARGS_STD)
59 #DML# cd build-cli && CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
60 #DML# ../configure $(COMMON_CONFIGURE_FLAGS) \
61 #DML# --disable-lua --disable-double-buffer --disable-x11 \
62 #DML# --disable-xdamage --disable-own-window --disable-xft \
63 #DML# --disable-hddtemp --disable-alsa --disable-portmon \
64 #DML# --enable-ncurses
66 cd build-all && CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
67 ../configure $(COMMON_CONFIGURE_FLAGS) \
68 --enable-imlib2=no --enable-rss --enable-weather-xoap \
69 --enable-eve --enable-lua=no --enable-lua-cairo=no --enable-lua-imlib2=no \
70 --disable-static --enable-argb \
71 $(LINUX_CONF_ARGS_ALL) $(ENABLE_NVIDIA)
77 build-stamp: config-stamp
80 #DML# cd build-std && $(MAKE)
81 #DML# cd build-cli && $(MAKE)
82 cd build-all && $(MAKE)
90 rm -f build-stamp config-stamp
92 rm -f configure.ac configure config.h.in src/config.h.in \
93 src/defconfig.h compile install-sh missing ltmain.sh depcomp \
94 Makefile.in doc/Makefile.in src/Makefile.in \
95 data/Makefile.in lua/Makefile.in \
96 aclocal.m4 m4/libtool.m4 m4/ltversion.m4 \
97 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4
99 rm -rf build-std build-cli build-all
100 rm -f config.guess config.sub
109 #DML# cd build-std && $(MAKE) install DESTDIR=$(CURDIR)/debian/conky-std
110 #DML# cd build-cli && $(MAKE) install DESTDIR=$(CURDIR)/debian/conky-cli
111 cd build-all && $(MAKE) install DESTDIR=$(CURDIR)/debian/conky-all
112 mkdir -p debian/conky-all/usr/share/icons/hicolor/scalable/apps/
113 cp -p debian/conkylogo64.png debian/conky-all/usr/share/icons/hicolor/scalable/apps/conky.png
114 mkdir -p debian/conky-all/usr/share/icons/hicolor/48x48/apps/
115 cp -p debian/conkylogo48.png debian/conky-all/usr/share/icons/hicolor/48x48/apps/conky.png
116 mkdir -p debian/conky-all/usr/share/applications/hildon/
117 cp -p debian/conky.desktop debian/conky-all/usr/share/applications/hildon/conky.desktop
118 mkdir -p debian/conky-all/usr/bin/
119 cp -p debian/conky.sh debian/conky-all/usr/bin/
121 # Clean up cruft left upstream
122 rm -rf debian/conky-std/usr/lib debian/conky-cli/usr/lib \
123 debian/conky-all/usr/lib/conky/*.la \
124 debian/conky-all/usr/lib/conky/*.so.?
126 binary-indep: build install
128 binary-arch: build install
131 dh_installchangelogs ChangeLog
134 dh_installman -a doc/conky.1
147 binary: binary-arch binary-indep
149 .PHONY: configure build clean install binary binary-indep binary-arch