4362c568bba6d0ec688d42bc17c7129c49fd6d1b
[packages.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-daemondir="/usr/sbin" \
79         --with-system-socket="/var/run/dbus/system_bus_socket" \
80         --with-system-pid-file="/var/run/dbus.pid" \
81
82 CONFIGURE_VARS+= \
83         ac_cv_have_abstract_sockets="yes" \
84
85
86 define Build/Compile
87         $(MAKE) -C $(PKG_BUILD_DIR) \
88                 DESTDIR="$(PKG_INSTALL_DIR)" \
89                 all install
90 endef
91
92 define Build/InstallDev
93         mkdir -p $(1)/usr/include
94         $(CP)   $(PKG_INSTALL_DIR)/usr/include/dbus-1.0 \
95                 $(1)/usr/include/
96         mkdir -p $(1)/usr/lib
97         $(CP)   $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.{a,so*} \
98                 $(1)/usr/lib/
99         $(CP)   $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0 \
100                 $(1)/usr/lib/
101         mkdir -p $(1)/usr/lib/pkgconfig
102         $(CP)   $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/dbus-1.pc \
103                 $(1)/usr/lib/pkgconfig/
104 endef
105
106 define Build/UninstallDev
107         rm -rf  $(STAGING_DIR)/usr/include/dbus-1.0 \
108                 $(STAGING_DIR)/usr/lib/libdbus-1.{a,so*} \
109                 $(STAGING_DIR)/usr/lib/dbus-1.0 \
110                 $(STAGING_DIR)/usr/lib/pkgconfig/dbus-1.pc
111 endef
112
113
114 define Package/dbus/conffiles
115 /etc/dbus-1/session.conf
116 /etc/dbus-1/system.conf
117 endef
118
119 define Package/dbus/install
120         $(INSTALL_DIR) $(1)/etc
121         $(CP) $(PKG_INSTALL_DIR)/etc/dbus-1 $(1)/etc/
122         $(INSTALL_DIR) $(1)/usr/lib
123         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.so.* $(1)/usr/lib/
124         $(INSTALL_DIR) $(1)/usr/sbin
125         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dbus-daemon $(1)/usr/sbin/
126         $(INSTALL_DIR) $(1)/etc/init.d
127         $(INSTALL_BIN) ./files/dbus.init $(1)/etc/init.d/
128 endef
129
130
131 define Package/dbus-utils/install
132         $(INSTALL_DIR) $(1)/usr/bin
133         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dbus-* $(1)/usr/bin/
134 endef
135
136
137 $(eval $(call BuildPackage,dbus))
138 $(eval $(call BuildPackage,dbus-utils))
139