[packages] dbus fixes:
[openwrt/svn-archive/archive.git] / utils / dbus / Makefile
1 #
2 # Copyright (C) 2007-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=dbus
12 PKG_VERSION:=1.0.3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus/
17 PKG_MD5SUM:=ce328423db5743fe9006d39113b5324d
18
19 include $(INCLUDE_DIR)/package.mk
20
21
22 define Package/dbus/Default
23 SECTION:=utils
24 CATEGORY:=Utilities
25 TITLE:=Simple interprocess messaging system
26 URL:=http://dbus.freedesktop.org/
27 endef
28
29 define Package/dbus/Default/description
30 D-Bus is a message bus system, a simple way for applications to talk to one
31 another. In addition to interprocess communication, D-Bus helps coordinate
32 process lifecycle; it makes it simple and reliable to code a "single instance"
33 application or daemon, and to launch applications and daemons on demand when
34 their services are needed.
35 endef
36
37
38 define Package/dbus
39 $(call Package/dbus/Default)
40 TITLE+= (daemon)
41 DEPENDS:= +libexpat
42 endef
43
44 define Package/dbus/Description
45 $(call Package/dbus/Default/description)
46 This package contains the D-Bus daemon.
47 endef
48
49
50 define Package/dbus-utils
51 $(call Package/dbus/Default)
52 TITLE+= (utilities)
53 DEPENDS:= dbus
54 endef
55
56 define Package/dbus-utils/Description
57 $(call Package/dbus/Default/description)
58 This package contains D-Bus utilities.
59 endef
60
61
62 CONFIGURE_ARGS += \
63 --enable-shared \
64 --enable-static \
65 --disable-abstract-sockets \
66 --disable-ansi \
67 --disable-asserts \
68 --disable-console-owner-file \
69 --disable-dnotify \
70 --disable-doxygen-docs \
71 --disable-gcov \
72 --disable-selinux \
73 --disable-tests \
74 --disable-verbose-mode \
75 --disable-xml-docs \
76 --with-xml="expat" \
77 --with-dbus-user=root \
78 --with-dbus-daemondir="/usr/sbin" \
79 --with-system-socket="/var/run/dbus/system_bus_socket" \
80 --with-system-pid-file="/var/run/dbus.pid" \
81
82 # --without-x \
83
84 CONFIGURE_VARS+= \
85 ac_cv_have_abstract_sockets="yes" \
86
87
88 define Build/Compile
89 $(MAKE) -C $(PKG_BUILD_DIR) \
90 DESTDIR="$(PKG_INSTALL_DIR)" \
91 all install
92 endef
93
94 define Build/InstallDev
95 mkdir -p $(1)/usr/include
96 $(CP) $(PKG_INSTALL_DIR)/usr/include/dbus-1.0 \
97 $(1)/usr/include/
98 mkdir -p $(1)/usr/lib
99 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.{a,so*} \
100 $(1)/usr/lib/
101 $(CP) $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0 \
102 $(1)/usr/lib/
103 mkdir -p $(1)/usr/lib/pkgconfig
104 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/dbus-1.pc \
105 $(1)/usr/lib/pkgconfig/
106 endef
107
108 define Package/dbus/conffiles
109 /etc/dbus-1/session.conf
110 /etc/dbus-1/system.conf
111 endef
112
113 define Package/dbus/install
114 $(INSTALL_DIR) $(1)/etc
115 $(CP) $(PKG_INSTALL_DIR)/etc/dbus-1 $(1)/etc/
116 $(INSTALL_DIR) $(1)/usr/lib
117 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.so.* $(1)/usr/lib/
118 $(INSTALL_DIR) $(1)/usr/sbin
119 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dbus-daemon $(1)/usr/sbin/
120 $(INSTALL_DIR) $(1)/etc/init.d
121 $(INSTALL_BIN) ./files/dbus.init $(1)/etc/init.d/dbus
122 endef
123
124
125 define Package/dbus-utils/install
126 $(INSTALL_DIR) $(1)/usr/bin
127 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dbus-* $(1)/usr/bin/
128 endef
129
130
131 $(eval $(call BuildPackage,dbus))
132 $(eval $(call BuildPackage,dbus-utils))
133