lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | |
| 2 | include $(COMMON_BASE_MK) |
| 3 | |
| 4 | NAME=dbus |
| 5 | SRC_DIR=dbus-1.8.20 |
| 6 | SRC_TAR=dbus-1.8.20.tar.gz |
| 7 | INSTALL_DIR=$(LIB_DIR)/$(NAME)/install |
| 8 | BUILD_DIR=build |
| 9 | GEN_MAKEFILE=$(SRC_DIR)/Makefile |
| 10 | |
| 11 | CONFIG_OPTS = --target=arm-buildroot-linux-uclibcgnueabi --host=arm-buildroot-linux-uclibcgnueabi --build=x86_64-unknown-linux-gnu |
| 12 | #CONFIG_OPTS += --exec-prefix=/usr |
| 13 | CONFIG_OPTS += --sysconfdir=/etc_rw_mbb/etc_rw |
| 14 | CONFIG_OPTS += --localstatedir=/var |
| 15 | CONFIG_OPTS += --program-prefix= |
| 16 | CONFIG_OPTS += --disable-gtk-doc |
| 17 | CONFIG_OPTS += --disable-gtk-doc-html |
| 18 | CONFIG_OPTS += --disable-doc |
| 19 | CONFIG_OPTS += --disable-docs |
| 20 | CONFIG_OPTS += --disable-documentation |
| 21 | CONFIG_OPTS += --with-xmlto=no |
| 22 | CONFIG_OPTS += --with-fop=no |
| 23 | CONFIG_OPTS += --disable-dependency-tracking |
| 24 | CONFIG_OPTS += --enable-ipv6 |
| 25 | CONFIG_OPTS += --disable-nls |
| 26 | CONFIG_OPTS += --enable-static |
| 27 | CONFIG_OPTS += --enable-shared |
| 28 | CONFIG_OPTS += --with-dbus-user=dbus |
| 29 | CONFIG_OPTS += --disable-tests |
| 30 | CONFIG_OPTS += --disable-asserts |
| 31 | CONFIG_OPTS += --enable-abstract-sockets |
| 32 | CONFIG_OPTS += --disable-selinux |
| 33 | CONFIG_OPTS += --disable-xml-docs |
| 34 | CONFIG_OPTS += --disable-doxygen-docs |
| 35 | CONFIG_OPTS += --disable-dnotify |
| 36 | CONFIG_OPTS += --with-xml=expat |
| 37 | CONFIG_OPTS += --with-system-socket=/var/run/dbus/system_bus_socket |
| 38 | CONFIG_OPTS += --with-system-pid-file=/var/run/messagebus.pid |
| 39 | CONFIG_OPTS += --disable-selinux |
| 40 | CONFIG_OPTS += --disable-libaudit |
| 41 | CONFIG_OPTS += --without-x |
| 42 | CONFIG_OPTS += --disable-systemd |
| 43 | |
| 44 | |
| 45 | export ac_cv_have_abstract_sockets=yes |
| 46 | |
| 47 | export CFLAGS := -I$(LIB_DIR)/expat/install/include |
| 48 | export LIBS := -lexpat |
| 49 | export LDFLAGS := -L$(LIB_DIR)/expat/install/lib |
| 50 | export PKG_CONFIG_PATH=$(CROSS_COMPILE_SYSROOT)/usr/lib/pkgconfig:$(LIB_DIR)/expat/install/lib/pkgconfig |
| 51 | |
| 52 | all: $(GEN_MAKEFILE) |
| 53 | make -C $(SRC_DIR) all |
| 54 | make -C $(SRC_DIR) install DESTDIR=$(INSTALL_DIR) |
| 55 | |
| 56 | $(GEN_MAKEFILE): |
| 57 | mkdir -p $(BUILD_DIR) |
| 58 | sha256sum -c $(NAME).sig |
| 59 | tar xf $(TOPDIR_AP)/downloads/$(SRC_TAR) |
| 60 | cd $(SRC_DIR); ./configure --prefix=/ $(CONFIG_OPTS) |
| 61 | |
| 62 | clean: |
| 63 | -make -C $(SRC_DIR) distclean |
| 64 | -rm -fr $(BUILD_DIR) $(INSTALL_DIR) $(SRC_DIR) |
| 65 | |
| 66 | romfs: |
| 67 | cd $(INSTALL_DIR)/lib; \ |
| 68 | for i in *.so*; do \ |
| 69 | if [ -L $$i ]; then \ |
| 70 | $(ROMFSINST) -s `find $$i -printf %l` /lib/$$i; \ |
| 71 | elif [ -f $$i ]; then \ |
| 72 | $(ROMFSINST) /lib/$$i; \ |
| 73 | fi; \ |
| 74 | done |
| 75 | $(ROMFSINST) $(INSTALL_DIR)/bin/dbus-cleanup-sockets /bin/dbus-cleanup-sockets |
| 76 | $(ROMFSINST) $(INSTALL_DIR)/bin/dbus-daemon /bin/dbus-daemon |
| 77 | $(ROMFSINST) $(INSTALL_DIR)/bin/dbus-launch /bin/dbus-launch |
| 78 | $(ROMFSINST) $(INSTALL_DIR)/bin/dbus-monitor /bin/dbus-monitor |
| 79 | $(ROMFSINST) $(INSTALL_DIR)/bin/dbus-run-session /bin/dbus-run-session |
| 80 | $(ROMFSINST) $(INSTALL_DIR)/bin/dbus-send /bin/dbus-send |
| 81 | $(ROMFSINST) $(INSTALL_DIR)/bin/dbus-uuidgen /bin/dbus-uuidgen |
| 82 | |
| 83 | populate_sdk: |
| 84 | cp -afvp $(INSTALL_DIR)/include/* $(CROSS_COMPILE_SYSROOT)/usr/include/ |
| 85 | cp -afvp $(INSTALL_DIR)/lib/* $(CROSS_COMPILE_SYSROOT)/usr/lib/ |
| 86 | cp -afvp $(INSTALL_DIR)/bin/* $(CROSS_COMPILE_SYSROOT)/usr/bin/ |
| 87 | |