packages: Fix dbus. Closes #2562, thanks loswillios
[openwrt/svn-archive/archive.git] / utils / dbus / Makefile
1 #
2 # Copyright (C) 2007 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.2
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:=0552a9b54beb4a044951b7cdbc8fc855
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 --without-x \
77 --with-xml="expat" \
78 --with-dbus-user=root \
79 --with-dbus-daemondir="/usr/sbin" \
80 --with-system-socket="/var/run/dbus/system_bus_socket" \
81 --with-system-pid-file="/var/run/dbus.pid" \
82
83 CONFIGURE_VARS+= \
84 ac_cv_have_abstract_sockets="yes" \
85
86
87 define Build/Compile
88 $(MAKE) -C $(PKG_BUILD_DIR) \
89 DESTDIR="$(PKG_INSTALL_DIR)" \
90 all install
91 endef
92
93 define Build/InstallDev
94 mkdir -p $(1)/usr/include
95 $(CP) $(PKG_INSTALL_DIR)/usr/include/dbus-1.0 \
96 $(1)/usr/include/
97 mkdir -p $(1)/usr/lib
98 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.{a,so*} \
99 $(1)/usr/lib/
100 $(CP) $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0 \
101 $(1)/usr/lib/
102 mkdir -p $(1)/usr/lib/pkgconfig
103 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/dbus-1.pc \
104 $(1)/usr/lib/pkgconfig/
105 endef
106
107 define Package/dbus/conffiles
108 /etc/dbus-1/session.conf
109 /etc/dbus-1/system.conf
110 endef
111
112 define Package/dbus/install
113 $(INSTALL_DIR) $(1)/etc
114 $(CP) $(PKG_INSTALL_DIR)/etc/dbus-1 $(1)/etc/
115 $(INSTALL_DIR) $(1)/usr/lib
116 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.so.* $(1)/usr/lib/
117 $(INSTALL_DIR) $(1)/usr/sbin
118 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dbus-daemon $(1)/usr/sbin/
119 $(INSTALL_DIR) $(1)/etc/init.d
120 $(INSTALL_BIN) ./files/dbus.init $(1)/etc/init.d/dbus
121 endef
122
123
124 define Package/dbus-utils/install
125 $(INSTALL_DIR) $(1)/usr/bin
126 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dbus-* $(1)/usr/bin/
127 endef
128
129
130 $(eval $(call BuildPackage,dbus))
131 $(eval $(call BuildPackage,dbus-utils))
132