"Steven J. Hill" | af9a0cc | 2007-01-14 23:21:36 +0000 | [diff] [blame] | 1 | ############################################################# |
| 2 | # |
| 3 | # hal |
| 4 | # |
| 5 | ############################################################# |
Ulf Samuelsson | e1621a4 | 2007-07-11 14:06:06 +0000 | [diff] [blame] | 6 | HAL_VERSION:=0.5.8 |
| 7 | HAL_SOURCE:=hal-$(HAL_VERSION).tar.gz |
"Steven J. Hill" | af9a0cc | 2007-01-14 23:21:36 +0000 | [diff] [blame] | 8 | HAL_SITE:=http://people.freedesktop.org/~david/dist/ |
Ulf Samuelsson | e1621a4 | 2007-07-11 14:06:06 +0000 | [diff] [blame] | 9 | HAL_DIR:=$(BUILD_DIR)/hal-$(HAL_VERSION) |
"Steven J. Hill" | af9a0cc | 2007-01-14 23:21:36 +0000 | [diff] [blame] | 10 | HAL_CAT:=$(ZCAT) |
| 11 | HAL_BINARY:=hald/hald |
| 12 | HAL_TARGET_BINARY:=usr/sbin/hald |
| 13 | |
Ulf Samuelsson | a2e5113 | 2007-08-11 22:26:56 +0000 | [diff] [blame] | 14 | GLIB_CFLAGS:=-I$(STAGING_DIR)/usr/include/glib-2.0 \ |
"Steven J. Hill" | af9a0cc | 2007-01-14 23:21:36 +0000 | [diff] [blame] | 15 | -I$(STAGING_DIR)/lib/glib/include |
| 16 | GLIB_LIBS:=$(STAGING_DIR)/lib/libglib-2.0.so \ |
| 17 | $(STAGING_DIR)/lib/libgmodule-2.0.so \ |
| 18 | $(STAGING_DIR)/lib/libgobject-2.0.so \ |
| 19 | $(STAGING_DIR)/lib/libgthread-2.0.so |
| 20 | DBUS_GLIB_LIBS:=$(STAGING_DIR)/usr/lib/libdbus-glib-1.so |
| 21 | |
| 22 | $(DL_DIR)/$(HAL_SOURCE): |
| 23 | $(WGET) -P $(DL_DIR) $(HAL_SITE)/$(HAL_SOURCE) |
| 24 | |
| 25 | hal-source: $(DL_DIR)/$(HAL_SOURCE) |
| 26 | |
| 27 | $(HAL_DIR)/.unpacked: $(DL_DIR)/$(HAL_SOURCE) |
| 28 | $(HAL_CAT) $(DL_DIR)/$(HAL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - |
| 29 | toolchain/patch-kernel.sh $(HAL_DIR) package/hal/ \*.patch |
| 30 | touch $(HAL_DIR)/.unpacked |
| 31 | |
| 32 | $(HAL_DIR)/.configured: $(HAL_DIR)/.unpacked /usr/bin/pkg-config |
| 33 | (cd $(HAL_DIR); rm -rf config.cache; \ |
| 34 | $(TARGET_CONFIGURE_OPTS) \ |
Bernhard Reutner-Fischer | 74d518d | 2007-06-27 12:01:27 +0000 | [diff] [blame] | 35 | $(TARGET_CONFIGURE_ARGS) \ |
"Steven J. Hill" | af9a0cc | 2007-01-14 23:21:36 +0000 | [diff] [blame] | 36 | CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/lib/glib-2.0/include" \ |
"Steven J. Hill" | af9a0cc | 2007-01-14 23:21:36 +0000 | [diff] [blame] | 37 | GLIB_CFLAGS="$(GLIB_CFLAGS)" \ |
| 38 | GLIB_LIBS="$(GLIB_LIBS)" \ |
| 39 | DBUS_CFLAGS="-I$(STAGING_DIR)/usr/include/dbus-1.0 -I$(STAGING_DIR)/usr/lib/dbus-1.0/include" \ |
| 40 | DBUS_LIBS="$(STAGING_DIR)/usr/lib/libdbus-1.so" \ |
| 41 | VOLUME_ID_CFLAGS="$(TARGET_CFLAGS)" \ |
| 42 | VOLUME_ID_LIBS="$(STAGING_DIR)/usr/lib/libvolume_id.so" \ |
| 43 | PKG_CONFIG=/usr/bin/pkg-config \ |
| 44 | ac_cv_path_LIBUSB_CONFIG= \ |
| 45 | ./configure \ |
| 46 | --target=$(GNU_TARGET_NAME) \ |
| 47 | --host=$(GNU_TARGET_NAME) \ |
| 48 | --build=$(GNU_HOST_NAME) \ |
| 49 | --prefix=/usr \ |
| 50 | --datadir=/usr/share \ |
| 51 | --sysconfdir=/etc \ |
| 52 | --localstatedir=/var \ |
| 53 | --with-hwdata=$(TARGET_DIR)/usr/share/hwdata \ |
| 54 | --disable-policy-kit \ |
| 55 | --disable-gtk-doc \ |
| 56 | --disable-static \ |
| 57 | --disable-acpi-acpid \ |
| 58 | --disable-acpi-proc \ |
| 59 | ); |
| 60 | touch $(HAL_DIR)/.configured |
| 61 | |
| 62 | $(HAL_DIR)/hald/hald: $(HAL_DIR)/.configured |
| 63 | $(MAKE) STAGING_DIR="$(STAGING_DIR)" DESTDIR="$(TARGET_DIR)" DBUS_GLIB_LIBS="$(DBUS_GLIB_LIBS)" -C $(HAL_DIR) |
| 64 | |
| 65 | $(TARGET_DIR)/$(HAL_TARGET_BINARY): $(HAL_DIR)/hald/hald |
| 66 | $(MAKE) STAGING_DIR="$(STAGING_DIR)" DESTDIR="$(TARGET_DIR)" -C $(HAL_DIR) install |
| 67 | rm -rf $(TARGET_DIR)/usr/share/locale |
| 68 | rm -rf $(TARGET_DIR)/usr/share/doc |
| 69 | rm -rf $(TARGET_DIR)/usr/share/gtk-doc |
| 70 | rm -rf $(TARGET_DIR)/usr/share/hal/device-manager |
| 71 | rm -rf $(TARGET_DIR)/usr/lib/pkgconfig |
Ulf Samuelsson | a2e5113 | 2007-08-11 22:26:56 +0000 | [diff] [blame] | 72 | # remove _everything_ in $(TARGET_DIR)/usr/include? |
Ulf Samuelsson | 488f5d7 | 2007-08-12 23:33:44 +0000 | [diff] [blame^] | 73 | # rm -rf $(TARGET_DIR)/usr/include |
"Steven J. Hill" | af9a0cc | 2007-01-14 23:21:36 +0000 | [diff] [blame] | 74 | rm -rf $(TARGET_DIR)/usr/lib/libhal*.so |
| 75 | rm -rf $(TARGET_DIR)/usr/lib/libhal*.la |
| 76 | rm -rf $(TARGET_DIR)/usr/lib/hal |
| 77 | rm -rf $(TARGET_DIR)/etc/PolicyKit |
"Steven J. Hill" | 6b00c90 | 2007-05-09 22:48:41 +0000 | [diff] [blame] | 78 | $(INSTALL) -m 0755 -D package/hal/S98haldaemon $(TARGET_DIR)/etc/init.d |
"Steven J. Hill" | af9a0cc | 2007-01-14 23:21:36 +0000 | [diff] [blame] | 79 | rm -rf $(TARGET_DIR)/etc/rc.d |
| 80 | for file in hald-addon-acpi* hald-addon-cpufreq \ |
| 81 | hald-addon-keyboard hald-addon-pmu \ |
| 82 | hald-probe-pc-floppy hald-probe-printer \ |
| 83 | hald-probe-serial hald-probe-smbios \ |
| 84 | hal-storage-eject hal-storage-closetray \ |
| 85 | hal-system-power-pmu hald-probe-input \ |
| 86 | hald-probe-hiddev hald-addon-hid-ups; do \ |
| 87 | rm -f $(TARGET_DIR)/usr/libexec/$$file; \ |
| 88 | done |
| 89 | -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libhal* |
| 90 | |
| 91 | hal: uclibc dbus-glib hwdata udev-volume_id $(TARGET_DIR)/$(HAL_TARGET_BINARY) |
| 92 | |
| 93 | hal-clean: |
| 94 | rm -f $(TARGET_DIR)/etc/dbus-1/system.d/hal.conf |
| 95 | rm -rf $(TARGET_DIR)/etc/hal $(TARGET_DIR)/usr/share/hal |
| 96 | rm -f $(TARGET_DIR)/etc/init.d/S98haldaemon |
| 97 | rm -f $(TARGET_DIR)/etc/udev/rules.d/90-hal.rules |
| 98 | rm -f $(TARGET_DIR)/usr/bin/hal-* $(TARGET_DIR)/usr/bin/lshal |
| 99 | rm -f $(TARGET_DIR)/usr/sbin/hald |
| 100 | rm -f $(TARGET_DIR)/usr/libexec/hald-* $(TARGET_DIR)/usr/libexec/hal-* |
| 101 | rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/libexec |
| 102 | rm -f $(TARGET_DIR)/usr/lib/libhal.so.1* |
| 103 | rm -f $(TARGET_DIR)/usr/lib/libhal-storage.so.1* |
| 104 | -$(MAKE) -C $(HAL_DIR) clean |
| 105 | |
| 106 | hal-dirclean: |
| 107 | rm -rf $(HAL_DIR) |
| 108 | |
| 109 | ############################################################# |
| 110 | # |
| 111 | # Toplevel Makefile options |
| 112 | # |
| 113 | ############################################################# |
| 114 | ifeq ($(strip $(BR2_PACKAGE_HAL)),y) |
| 115 | TARGETS+=hal |
| 116 | endif |