kumquat-buildroot/package/olsr/0001-configurable-ldconfig.patch

34 lines
1.1 KiB
Diff
Raw Normal View History

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
Make ldconfig configurable
In a cross-compilation set up, running /sbin/ldconfig is useless, so
we make the path to ldconfig configurable through the environment/make
command line. This allows to pass LDCONFIG=/bin/true when doing
cross-compilation.
[Gustavo: update patch for olsr 0.6.4]
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
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
diff -Nura olsrd-0.6.4.orig/make/Makefile.linux olsrd-0.6.4/make/Makefile.linux
--- olsrd-0.6.4.orig/make/Makefile.linux 2013-01-29 09:00:18.041356389 -0300
+++ olsrd-0.6.4/make/Makefile.linux 2013-01-29 09:01:51.598226624 -0300
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
@@ -3,6 +3,7 @@
#
ARCH := $(shell uname -m)
+LDCONFIG ?= /sbin/ldconfig
DESTDIR ?=
prefix ?= /usr/local
@@ -26,9 +27,9 @@
PLUGIN_SONAME ?= lib$(PLUGIN_NAME).so
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
PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER)
INSTALL_LIB = install -D -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \
- /sbin/ldconfig -n $(LIBDIR)
+ $(LDCONFIG) -n $(LIBDIR)
UNINSTALL_LIB = rm -f $(LIBDIR)/$(PLUGIN_FULLNAME); \
- /sbin/ldconfig -n $(LIBDIR)
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
+ $(LDCONFIG) -n $(LIBDIR)
ifdef OLSRD_PLUGIN
GENERATE_PIC = true