[Olsr-dev] change default install location to /usr/local

Hans-Christoph Steiner (spam-protected)
Thu May 31 21:23:38 CEST 2012


Looking at openwrt/packages/net/olsrd/Makefile, it seems they don't use 'make install' at all, and manually specify the install locations, so this proposed change won't affect that:

define Package/olsrd/install
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_DATA) ./files/olsrd.config $(1)/etc/config/olsrd
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/olsrd $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/olsrd.init $(1)/etc/init.d/olsrd
endef

define Package/olsrd-mod-arprefresh/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/arprefresh/olsrd_arprefresh.so.* $(1)/usr/lib/
endef

define Package/olsrd-mod-dot-draw/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dot_draw/olsrd_dot_draw.so.* $(1)/usr/lib/
endef

define Package/olsrd-mod-bmf/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmf/olsrd_bmf.so.* $(1)/usr/lib/
endef

define Package/olsrd-mod-dyn-gw/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dyn_gw/olsrd_dyn_gw.so.* $(1)/usr/lib/
endef

define Package/olsrd-mod-dyn-gw-plain/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dyn_gw_plain/olsrd_dyn_gw_plain.so.* $(1)/usr/lib/
endef

define Package/olsrd-mod-httpinfo/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/httpinfo/olsrd_httpinfo.so.* $(1)/usr/lib/
endef

define Package/olsrd-mod-mdns/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/mdns/olsrd_mdns.so.* $(1)/usr/lib/
endef

define Package/olsrd-mod-nameservice/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/nameservice/olsrd_nameservice.so.* $(1)/usr/lib/
endef

define Package/olsrd-mod-p2pd/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/p2pd/olsrd_p2pd.so.* $(1)/usr/lib/

On May 31, 2012, at 3:18 PM, Henning Rogge wrote:

> Saverio,
> 
> do you think this changes will make life problematic for the OpenWRT
> OLSR packages? We can adapt the Git-packages in the olsr.org
> repository ourselves, but what is about the other ones?
> 
> Henning
> 
> On Thu, May 31, 2012 at 8:55 PM, Hans-Christoph Steiner
> <(spam-protected)> wrote:
>> 
>> I'm already working on the Debian package, I've pushed a bunch of fixes, so that's covered.  Anyone know about OpenWRT?
>> 
>> .hc
>> 
>> On May 31, 2012, at 2:20 PM, Henning Rogge wrote:
>> 
>>> Must be tested first if this breaks OpenWRT and Debian build mechanisms.
>>> 
>>> Henning
>>> 
>>> On Thu, May 31, 2012 at 8:02 PM, Hans-Christoph Steiner
>>> <(spam-protected)> wrote:
>>>> 
>>>> I would like to include this patch to change the default Linux install location to /usr/local, which is the generally accepted UNIX standard for user-installed programs.  Currently, it installs into /usr, which is set aside for system-installed programs (apt-get, yum, etc.  This patch also includes the standard Makefile variables $DESTDIR, $prefix, and $libdir, for standardized overriding of those locations (i.e. make prefix=/usr).
>>>> 
>>>> Any objections?
>>>> 
>>>> diff --git a/make/Makefile.linux b/make/Makefile.linux
>>>> index e73be7c..02fb99f 100644
>>>> --- a/make/Makefile.linux
>>>> +++ b/make/Makefile.linux
>>>> @@ -3,8 +3,12 @@
>>>>  #
>>>> 
>>>>  ARCH := $(shell uname -m)
>>>> +
>>>>  DESTDIR ?=
>>>> -LIBDIR =       $(DESTDIR)/usr/lib
>>>> +prefix ?= /usr/local
>>>> +libdir ?= $(prefix)/lib
>>>> +
>>>> +LIBDIR =       $(DESTDIR)$(libdir)
>>>> 
>>>>  SRCS +=        $(wildcard src/linux/*.c src/unix/*.c)
>>>>  HDRS +=                $(wildcard src/linux/*.h src/unix/*.h)
>>>> --
>>>> Olsr-dev mailing list
>>>> (spam-protected)
>>>> https://lists.olsr.org/mailman/listinfo/olsr-dev
>>> 
>>> 
>>> 
>>> --
>>> Steven Hawkings about cosmic inflation: "An increase of billions of
>>> billions of percent in a tiny fraction of a second. Of course, that
>>> was before the present government."
>> 
> 
> 
> 
> -- 
> Steven Hawkings about cosmic inflation: "An increase of billions of
> billions of percent in a tiny fraction of a second. Of course, that
> was before the present government."





More information about the Olsr-dev mailing list