kumquat-buildroot/package/olsr/olsr.mk

52 lines
1.8 KiB
Makefile
Raw Normal View History

################################################################################
2007-09-19 23:27:49 +02:00
#
# olsr
#
################################################################################
2007-09-19 23:27:49 +02:00
OLSR_VERSION_MAJOR = 0.9
OLSR_VERSION = $(OLSR_VERSION_MAJOR).0.2
OLSR_SOURCE = olsrd-$(OLSR_VERSION).tar.bz2
OLSR_SITE = http://www.olsr.org/releases/$(OLSR_VERSION_MAJOR)
OLSR_PLUGINS = arprefresh bmf dot_draw dyn_gw dyn_gw_plain httpinfo jsoninfo \
mdns nameservice p2pd pgraph secure txtinfo watchdog
# Doesn't really need quagga but not very useful without it
OLSR_PLUGINS += $(if $(BR2_PACKAGE_QUAGGA),quagga)
OLSR_LICENSE = BSD-3c, LGPLv2.1+
OLSR_LICENSE_FILES = license.txt lib/pud/nmealib/LICENSE
OLSR_DEPENDENCIES = host-flex host-bison
2007-09-19 23:27:49 +02:00
define OLSR_BUILD_CMDS
olsr: rework build and install procedure This commit reworks the build and install steps of the olsr package, to fix a number of problems and do minor improvements: 1. The build step was doing "make <foo>" for each plugin. Unfortunately, inside olsr build system, doing "make <foo>" for a plugin triggers a clean of the plugin directory, a build, and then an installation of the plugin. This installation fails because DESTDIR is not passed at the install step. This leads to build issues like http://autobuild.buildroot.org/results/a9fed78cd0b3991763a797c38387edd4157fbdb9/build-end.log. To fix this, we call make in each plugin's directory, which is what "make <foo>" was doing internally. 2. The install step was manually installing the olsrd binary. We now instead use the install_bin make target that comes in olsr's build system. 3. The install step was manually installing the olsr plugins. We now instead use the install make target available in each plugin's makefile. 4. We use 'install' to install the init script, which avoids the manual creation of /etc/init.d. 5. We use 'install' to install the sample configuration file. 6. We remove the useless strip commands. 7. We add a patch that allows us to pass LDCONFIG=/bin/true to avoid ldconfig being called during the installation process. 8. We remove commands from the clean step that were in fact uninstallation commands. We don't bother re-adding those commands in an uninstallation step, since it is now generally accepted that the uninstall step is quite useless and should be deprecated. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-01-27 06:35:12 +01:00
$(TARGET_CONFIGURE_OPTS) $(MAKE) ARCH=$(KERNEL_ARCH) -C $(@D) olsrd
for p in $(OLSR_PLUGINS) ; do \
$(TARGET_CONFIGURE_OPTS) $(MAKE) ARCH=$(KERNEL_ARCH) -C $(@D)/lib/$$p ; \
done
endef
define OLSR_INSTALL_TARGET_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) \
prefix="/usr" install_bin
olsr: rework build and install procedure This commit reworks the build and install steps of the olsr package, to fix a number of problems and do minor improvements: 1. The build step was doing "make <foo>" for each plugin. Unfortunately, inside olsr build system, doing "make <foo>" for a plugin triggers a clean of the plugin directory, a build, and then an installation of the plugin. This installation fails because DESTDIR is not passed at the install step. This leads to build issues like http://autobuild.buildroot.org/results/a9fed78cd0b3991763a797c38387edd4157fbdb9/build-end.log. To fix this, we call make in each plugin's directory, which is what "make <foo>" was doing internally. 2. The install step was manually installing the olsrd binary. We now instead use the install_bin make target that comes in olsr's build system. 3. The install step was manually installing the olsr plugins. We now instead use the install make target available in each plugin's makefile. 4. We use 'install' to install the init script, which avoids the manual creation of /etc/init.d. 5. We use 'install' to install the sample configuration file. 6. We remove the useless strip commands. 7. We add a patch that allows us to pass LDCONFIG=/bin/true to avoid ldconfig being called during the installation process. 8. We remove commands from the clean step that were in fact uninstallation commands. We don't bother re-adding those commands in an uninstallation step, since it is now generally accepted that the uninstall step is quite useless and should be deprecated. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-01-27 06:35:12 +01:00
for p in $(OLSR_PLUGINS) ; do \
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib/$$p \
LDCONFIG=/bin/true DESTDIR=$(TARGET_DIR) \
prefix="/usr" install ; \
olsr: rework build and install procedure This commit reworks the build and install steps of the olsr package, to fix a number of problems and do minor improvements: 1. The build step was doing "make <foo>" for each plugin. Unfortunately, inside olsr build system, doing "make <foo>" for a plugin triggers a clean of the plugin directory, a build, and then an installation of the plugin. This installation fails because DESTDIR is not passed at the install step. This leads to build issues like http://autobuild.buildroot.org/results/a9fed78cd0b3991763a797c38387edd4157fbdb9/build-end.log. To fix this, we call make in each plugin's directory, which is what "make <foo>" was doing internally. 2. The install step was manually installing the olsrd binary. We now instead use the install_bin make target that comes in olsr's build system. 3. The install step was manually installing the olsr plugins. We now instead use the install make target available in each plugin's makefile. 4. We use 'install' to install the init script, which avoids the manual creation of /etc/init.d. 5. We use 'install' to install the sample configuration file. 6. We remove the useless strip commands. 7. We add a patch that allows us to pass LDCONFIG=/bin/true to avoid ldconfig being called during the installation process. 8. We remove commands from the clean step that were in fact uninstallation commands. We don't bother re-adding those commands in an uninstallation step, since it is now generally accepted that the uninstall step is quite useless and should be deprecated. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-01-27 06:35:12 +01:00
done
$(INSTALL) -D -m 0644 $(@D)/files/olsrd.conf.default.lq \
$(TARGET_DIR)/etc/olsrd/olsrd.conf
endef
define OLSR_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/olsr/S50olsr \
$(TARGET_DIR)/etc/init.d/S50olsr
endef
define OLSR_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/olsr/olsr.service \
$(TARGET_DIR)/usr/lib/systemd/system/olsr.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -sf ../../../../usr/lib/systemd/system/olsr.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/olsr.service
endef
$(eval $(generic-package))