packages: use $(LN) macro, make symlinks relative

Signed-off-by: Nicolas Thill <nico@openwrt.org>

SVN-Revision: 45250
This commit is contained in:
Nicolas Thill 2015-04-03 00:07:43 +00:00
parent 6a5a7db085
commit fe46689f10
9 changed files with 17 additions and 17 deletions

View File

@ -127,12 +127,12 @@ define Package/base-files/install
mkdir -p $(1)/etc/rc.d
mkdir -p $(1)/overlay
mkdir -p $(1)/lib/firmware
$(if $(LIB_SUFFIX),-ln -s lib $(1)/lib$(LIB_SUFFIX))
$(if $(LIB_SUFFIX),-$(LN) lib $(1)/lib$(LIB_SUFFIX))
mkdir -p $(1)/mnt
mkdir -p $(1)/proc
mkdir -p $(1)/tmp
mkdir -p $(1)/usr/lib
$(if $(LIB_SUFFIX),-ln -s lib $(1)/usr/lib$(LIB_SUFFIX))
$(if $(LIB_SUFFIX),-$(LN) lib $(1)/usr/lib$(LIB_SUFFIX))
mkdir -p $(1)/usr/bin
mkdir -p $(1)/sys
mkdir -p $(1)/www

View File

@ -81,7 +81,7 @@ define Package/kexec-tools/install
# make a link for compatability with other distros
$(INSTALL_DIR) $(1)/sbin
ln -s /usr/sbin/kexec $(1)/sbin/kexec
$(LN) ../usr/sbin/kexec $(1)/sbin/kexec
endef
$(eval $(call BuildPackage,kexec-tools))

View File

@ -66,7 +66,7 @@ endef
define Package/uboot-envtools/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
ln -s fw_printenv $(1)/usr/sbin/fw_setenv
$(LN) fw_printenv $(1)/usr/sbin/fw_setenv
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
ifneq ($(CONFIG_TARGET_ar71xx),)

View File

@ -33,7 +33,7 @@ endef
# Linux sources directory
define Build/Prepare
$(RM) -r $(PKG_BUILD_DIR)
ln -s $(LINUX_DIR)/tools/perf $(PKG_BUILD_DIR)
$(LN) $(LINUX_DIR)/tools/perf $(PKG_BUILD_DIR)
endef
# MAKE_FLAGS should be passed again upon cleaning because Perf's makefile

View File

@ -39,7 +39,7 @@ define Build/InstallDev
$(PKG_INSTALL_DIR)/usr/include/* \
$(1)/usr/include/
( cd $(1)/lib ; ln -s libbsd.so.$(PKG_VERSION) libbsd.so )
( cd $(1)/lib ; $(LN) libbsd.so.$(PKG_VERSION) libbsd.so )
endef
define Package/libbsd/install
@ -50,7 +50,7 @@ define Package/libbsd/install
$(PKG_INSTALL_DIR)/lib/libbsd.so* \
$(1)/lib/
( cd $(1)/lib ; ln -s libbsd.so.$(PKG_VERSION) libbsd.so )
( cd $(1)/lib ; $(LN) libbsd.so.$(PKG_VERSION) libbsd.so )
endef
$(eval $(call BuildPackage,libbsd))

View File

@ -64,7 +64,7 @@ endef
define Package/comgt/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/comgt $(1)/usr/bin/
ln -s comgt $(1)/usr/bin/gcom
$(LN) comgt $(1)/usr/bin/gcom
$(INSTALL_DIR) $(1)/etc/chatscripts
$(INSTALL_DATA) ./files/3g.chat $(1)/etc/chatscripts/3g.chat
$(INSTALL_DATA) ./files/evdo.chat $(1)/etc/chatscripts/evdo.chat

View File

@ -40,7 +40,7 @@ define Package/ca-certificates/install
while [ -h "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ]; do \
let "SUFFIX += 1" ; \
done ; \
ln -s "$$$$CERTFILE" "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ; \
$(LN) "$$$$CERTFILE" "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ; \
done
endef

View File

@ -64,7 +64,7 @@ define Package/fstools/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{mount_root,jffs2reset,snapshot_tool} $(1)/sbin/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libfstools.so $(1)/lib/
$(INSTALL_BIN) ./files/snapshot $(1)/sbin/
ln -s /sbin/jffs2reset $(1)/sbin/jffs2mark
$(LN) jffs2reset $(1)/sbin/jffs2mark
endef
define Package/block-mount/install
@ -76,8 +76,8 @@ define Package/block-mount/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/block $(1)/sbin/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblkid-tiny.so $(1)/lib/
ln -s /sbin/block $(1)/usr/sbin/swapon
ln -s /sbin/block $(1)/usr/sbin/swapoff
$(LN) ../../sbin/block $(1)/usr/sbin/swapon
$(LN) ../../sbin/block $(1)/usr/sbin/swapoff
endef

View File

@ -36,11 +36,11 @@ define Package/ubox/install
$(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib
ln -s /sbin/kmodloader $(1)/usr/sbin/rmmod
ln -s /sbin/kmodloader $(1)/usr/sbin/insmod
ln -s /sbin/kmodloader $(1)/usr/sbin/lsmod
ln -s /sbin/kmodloader $(1)/usr/sbin/modinfo
ln -s /sbin/kmodloader $(1)/usr/sbin/modprobe
$(LN) ../../sbin/kmodloader $(1)/usr/sbin/rmmod
$(LN) ../../sbin/kmodloader $(1)/usr/sbin/insmod
$(LN) ../../sbin/kmodloader $(1)/usr/sbin/lsmod
$(LN) ../../sbin/kmodloader $(1)/usr/sbin/modinfo
$(LN) ../../sbin/kmodloader $(1)/usr/sbin/modprobe
endef
$(eval $(call BuildPackage,ubox))