<p dir="ltr"><br>
On Jul 13, 2015 5:12 PM, "Pratik Prajapati" <<a href="mailto:pratik.prajapati12@gmail.com">pratik.prajapati12@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> What's the difference between following 2 methods in package makefile:<br>
><br>
> 1) PKG_INSTALL:=1<br>
><br>
> logs:<br>
> make[2]: Leaving directory `/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/package/libs/toolchain'<br>
> make[2]: Entering directory `/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/package/radvd-2.11'<br>
> make[2]: Leaving directory `/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/package/radvd-2.11'<br>
> make[1]: Leaving directory `/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt'<br>
><br>
> 2) <br>
> define Package/radvd-2.11/install<br>
> $(call Build/Install/Default)<br>
> endef<br>
><br>
> logs:<br>
><br>
> make[3]: Entering directory `/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/build_dir/target-mipsel_mips32_uClibc-0.9.33.2/radvd-2.11'<br>
> make[4]: Entering directory `/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/build_dir/target-mipsel_mips32_uClibc-0.9.33.2/radvd-2.11'<br>
> /bin/mkdir -p '/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/build_dir/target-mipsel_mips32_uClibc-0.9.33.2/radvd-2.11/ipkg-install/usr/sbin'<br>
> /usr/bin/install -c radvd radvdump '/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/build_dir/target-mipsel_mips32_uClibc-0.9.33.2/radvd-2.11/ipkg-install/usr/sbin'<br>
> /bin/mkdir -p '/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/build_dir/target-mipsel_mips32_uClibc-0.9.33.2/radvd-2.11/ipkg-install/usr/share/man/man5'<br>
> /usr/bin/install -c -m 644 radvd.conf.5 '/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/build_dir/target-mipsel_mips32_uClibc-0.9.33.2/radvd-2.11/ipkg-install/usr/share/man/man5'<br>
> /bin/mkdir -p '/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/build_dir/target-mipsel_mips32_uClibc-0.9.33.2/radvd-2.11/ipkg-install/usr/share/man/man8'<br>
> /usr/bin/install -c -m 644 radvd.8 radvdump.8 '/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/build_dir/target-mipsel_mips32_uClibc-0.9.33.2/radvd-2.11/ipkg-install/usr/share/man/man8'<br>
> make[4]: Leaving directory `/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/build_dir/target-mipsel_mips32_uClibc-0.9.33.2/radvd-2.11'<br>
> make[3]: Leaving directory `/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/build_dir/target-mipsel_mips32_uClibc-0.9.33.2/radvd-2.11'<br>
> SHELL= /home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/staging_dir/host/bin/flock /home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/tmp/.root-copy.flock -c 'cp -fpR /home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/staging_dir/target-mipsel_mips32_uClibc-0.9.33.2/root-malta/tmp-radvd-2.11/. /home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/staging_dir/target-mipsel_mips32_uClibc-0.9.33.2/root-malta/'<br>
> rm -rf /home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/staging_dir/target-mipsel_mips32_uClibc-0.9.33.2/root-malta/tmp-radvd-2.11<br>
> touch /home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/staging_dir/target-mipsel_mips32_uClibc-0.9.33.2/root-malta/stamp/.radvd-2.11_installed<br>
> if [ -f /home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/staging_dir/target-mipsel_mips32_uClibc-0.9.33.2/pkginfo/radvd-2.11.default.install.clean ]; then rm -f /home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/staging_dir/target-mipsel_mips32_uClibc-0.9.33.2/pkginfo/radvd-2.11.default.install /home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/staging_dir/target-mipsel_mips32_uClibc-0.9.33.2/pkginfo/radvd-2.11.default.install.clean; fi; echo "radvd-2.11" >> /home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/staging_dir/target-mipsel_mips32_uClibc-0.9.33.2/pkginfo/radvd-2.11.default.install<br>
> make[2]: Leaving directory `/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt/package/radvd-2.11'<br>
> make[1]: Leaving directory `/home/pratik.prajapati/work/openwrt-radvd/openwrt-tip/openwrt'<br>
><br>
><br>
> Using second method I was able to install package but not with 1st method.<br>
> For 1st method following was written here <a href="http://wiki.openwrt.org/doc/devel/packages#dependencytypes">http://wiki.openwrt.org/doc/devel/packages#dependencytypes</a>:<br>
> PKG_INSTALL - Setting it to "1" will call the package's original "make install" with prefix set to PKG_INSTALL_DIR<br>
><br>
> Is I am missing something for 1st method ?<br>
></p>
<p dir="ltr">I am not sure about this one, but package/xx/install is about packaging the pkg in ipkg format, contaning dependency info, service script, uci configs, etc. and it is ipkg content that will be installed to root. many times we refer to PKG_INSTALL_DIR in package/xx/install for constructing .ipkg content and binaries in .ipkg will be stripped by default.</p>
<p dir="ltr">Well, the above is mostly from past experience of packaging in OpenWrt. correct me if it is wrong or there is more to add.</p>
<p dir="ltr">cheers </p>
<p dir="ltr"> yousong</p>